2021-04-30 04:51:13 +09:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2022-02-07 06:37:04 +09:00
|
|
|
{% import '/cards/macros/note.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() }}
|
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-10 03:49:34 +09:00
|
|
|
<header class="feed-header" title="{{ 'Current page main header' | trans }}">
|
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-02-08 23:43:39 +09:00
|
|
|
{% if current_path starts with 'feed_' or 'conversation' in current_path %}
|
2022-02-10 03:49:34 +09:00
|
|
|
<h1 class="section-title" role="heading">{{ page_title | trans }}</h1>
|
2022-01-24 04:46:47 +09:00
|
|
|
{% endif %}
|
2022-01-18 01:32:41 +09:00
|
|
|
{% else %}
|
2022-01-27 11:17:41 +09:00
|
|
|
{% if current_path starts with 'search' %}
|
|
|
|
<h3 class="heading-no-margin">{{ 'Notes found' | trans }}</h3>
|
|
|
|
{% else %}
|
2022-02-08 08:54:29 +09:00
|
|
|
<h1 class="section-title">{{ 'Notes' | trans }}</h1>
|
2022-01-27 11:17:41 +09:00
|
|
|
{% endif %}
|
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-10 03:49:34 +09:00
|
|
|
{{ noteView.note_vanilla(conversation['note'], conversation['replies'], {'depth': 0}) }}
|
2022-01-20 08:54:45 +09:00
|
|
|
{% else %}
|
2022-02-07 06:37:04 +09:00
|
|
|
{{ noteView.note_vanilla(conversation) }}
|
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 %}
|