2021-04-30 04:51:13 +09:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2022-02-20 04:18:25 +09:00
|
|
|
{% import '/cards/macros/note/factory.html.twig' as NoteFactory %}
|
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() }}
|
2022-02-08 23:12:59 +09:00
|
|
|
<link rel="stylesheet" href="{{ asset('assets/default_theme/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-02-16 12:01:25 +09:00
|
|
|
<header class="feed-header">
|
2022-01-24 04:46:47 +09:00
|
|
|
{% set current_path = app.request.get('_route') %}
|
2022-02-16 12:01:25 +09:00
|
|
|
{% if notes_feed_title is defined %}
|
|
|
|
{{ notes_feed_title.getHtml() }}
|
2021-08-09 21:25:08 +09:00
|
|
|
{% endif %}
|
2022-02-10 03:49:34 +09:00
|
|
|
<nav class="feed-actions" title="{{ 'Actions that change how the feed behaves' | trans }}">
|
|
|
|
<details class="feed-actions-details" role="group">
|
2022-01-18 01:32:41 +09:00
|
|
|
<summary>
|
|
|
|
{{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
|
|
|
|
</summary>
|
2022-02-10 03:49:34 +09:00
|
|
|
<menu class="feed-actions-details-dropdown" role="toolbar">
|
2022-01-27 09:54:27 +09:00
|
|
|
{% for block in handle_event('AddFeedActions', app.request, notes is defined and notes is not empty) %}
|
|
|
|
{{ block | raw }}
|
|
|
|
{% endfor %}
|
|
|
|
</menu>
|
2022-01-18 01:32:41 +09:00
|
|
|
</details>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if notes is not empty %}
|
2022-01-20 08:54:45 +09:00
|
|
|
{# Backwards compatibility with hAtom 0.1 #}
|
2022-02-10 03:49:34 +09:00
|
|
|
<section class="feed h-feed hfeed notes" role="feed" aria-busy="false" title="{{ 'Feed content' | trans }}">
|
2022-01-20 08:54:45 +09:00
|
|
|
{% for conversation in notes %}
|
|
|
|
{% block current_note %}
|
|
|
|
{% if conversation is instanceof('array') %}
|
2022-02-20 04:18:25 +09:00
|
|
|
{% set args = { 'type': 'vanilla_full', 'note': conversation['note'], 'replies': conversation['replies'] | default, 'extra': { 'depth': 0 } } %}
|
|
|
|
{{ NoteFactory.constructor(args) }}
|
|
|
|
{# {% else %}
|
|
|
|
{% set args = { 'type': 'vanilla_full', 'note': conversation, 'extra': { 'depth': 0 } } %}
|
|
|
|
{{ NoteFactory.constructor(args) }}#}
|
2022-01-20 08:54:45 +09:00
|
|
|
{% endif %}
|
2022-02-10 03:49:34 +09:00
|
|
|
<hr class="hr-replies-end" role="separator" aria-label="{{ 'Marks the end of previous conversation\'s initial note' | trans }}">
|
2022-01-20 08:54:45 +09:00
|
|
|
{% 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 %}
|