feed.html.twig 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {% extends 'stdgrid.html.twig' %}
  2. {% import '/cards/note/view.html.twig' as noteView %}
  3. {% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %}
  4. {% block stylesheets %}
  5. {{ parent() }}
  6. <link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
  7. {% endblock stylesheets %}
  8. {% block body %}
  9. <header class="feed-header">
  10. <h1>{{ page_title | trans }} {{ 'feed' | trans }}</h1>
  11. <nav class="feed-actions" role=navigation>
  12. {% for block in handle_event('AddFeedActions', app.request) %}
  13. {{ block | raw }}
  14. {% endfor %}
  15. </nav>
  16. </header>
  17. {# Backwards compatibility with hAtom 0.1 #}
  18. <main class="feed" tabindex="0" role="feed">
  19. <div class="h-feed hfeed notes">
  20. {% if notes is defined and notes is not empty %}
  21. {% for conversation in notes %}
  22. {% block current_note %}
  23. {% if conversation is instanceof('array') %}
  24. {{ noteView.macro_note(conversation['note'], conversation['replies']) }}
  25. {% else %}
  26. {{ noteView.macro_note(conversation) }}
  27. {% endif %}
  28. <hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
  29. {% endblock current_note %}
  30. {% endfor %}
  31. {% else %}
  32. <div id="empty-notes"><h1>{% trans %}No notes here.{% endtrans %}</h1></div>
  33. {% endif %}
  34. </div>
  35. </main>
  36. {% endblock body %}