2021-04-30 04:51:13 +09:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2021-11-07 10:32:06 +09:00
|
|
|
{% import '/cards/note/view.html.twig' as noteView %}
|
2020-03-13 02:59:13 +09:00
|
|
|
|
2021-09-23 00:46:58 +09:00
|
|
|
{% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %}
|
2020-07-27 00:05:07 +09:00
|
|
|
|
2021-10-06 06:44:22 +09:00
|
|
|
{% block stylesheets %}
|
|
|
|
{{ parent() }}
|
2021-10-06 08:45:37 +09:00
|
|
|
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
|
2021-10-06 06:44:22 +09:00
|
|
|
{% endblock stylesheets %}
|
|
|
|
|
2020-07-27 00:05:07 +09:00
|
|
|
{% block body %}
|
2022-01-17 00:11:34 +09:00
|
|
|
{% for block in handle_event('BeforeFeed', app.request) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
|
2022-01-17 11:51:20 +09:00
|
|
|
{% if notes is defined %}
|
2022-01-18 01:32:41 +09:00
|
|
|
<header class="feed-header">
|
2022-01-24 04:46:47 +09:00
|
|
|
{% set current_path = app.request.get('_route') %}
|
2022-01-18 01:32:41 +09:00
|
|
|
{% if page_title is defined %}
|
2022-01-24 04:46:47 +09:00
|
|
|
{% if current_path starts with 'feed_' %}
|
|
|
|
<h1 class="section-title">{{ page_title | trans }}</h1>
|
|
|
|
{% else %}
|
|
|
|
<span class="section-title">{{ page_title | trans }}</span>
|
|
|
|
{% endif %}
|
2022-01-18 01:32:41 +09:00
|
|
|
{% else %}
|
2022-01-23 04:16:35 +09:00
|
|
|
<span class="section-title">{{ 'Notes' | trans }}</span>
|
2021-08-09 21:25:08 +09:00
|
|
|
{% endif %}
|
2022-01-18 01:32:41 +09:00
|
|
|
<nav class="feed-actions">
|
|
|
|
<details class="feed-actions-details">
|
|
|
|
<summary>
|
|
|
|
{{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
|
|
|
|
</summary>
|
|
|
|
<div class="feed-actions-details-dropdown">
|
|
|
|
<menu>
|
|
|
|
{% for block in handle_event('AddFeedActions', app.request, notes is defined and notes is not empty) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
</menu>
|
|
|
|
</div>
|
|
|
|
</details>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if notes is not empty %}
|
2022-01-20 08:54:45 +09:00
|
|
|
{# Backwards compatibility with hAtom 0.1 #}
|
|
|
|
<section class="feed h-feed hfeed notes" tabindex="0" role="feed">
|
|
|
|
{% for conversation in notes %}
|
|
|
|
{% block current_note %}
|
|
|
|
{% if conversation is instanceof('array') %}
|
|
|
|
{{ noteView.macro_note(conversation['note'], conversation['replies']) }}
|
|
|
|
{% else %}
|
|
|
|
{{ noteView.macro_note(conversation) }}
|
|
|
|
{% endif %}
|
|
|
|
<hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
|
|
|
|
{% endblock current_note %}
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
2022-01-23 04:16:35 +09:00
|
|
|
{% else %}
|
|
|
|
<section class="feed h-feed hfeed notes" tabindex="0" role="feed">
|
|
|
|
<span>{% trans %}No notes here...{% endtrans %}</span>
|
|
|
|
</section>
|
2022-01-18 01:32:41 +09:00
|
|
|
{% endif %}
|
2022-01-17 11:51:20 +09:00
|
|
|
{% endif %}
|
2021-11-26 22:05:23 +09:00
|
|
|
{% endblock body %}
|