archive.html.twig 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% extends 'partials/base.html.twig' %}
  2. {% set blog_image = page.media.images[page.header.hero_image] ?: page.media.images|first %}
  3. {% set collection = page.collection() %}
  4. {% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
  5. {% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
  6. {% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
  7. {% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
  8. {% block hero %}
  9. {% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
  10. {% endblock %}
  11. {% block body %}
  12. <section id="body-wrapper" class="section blog-listing">
  13. <section class="container {{ grid_size }}">
  14. <div class="cat">
  15. {% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag'} %}
  16. </div>
  17. {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
  18. {% include 'partials/breadcrumbs.html.twig' %}
  19. {% endif %}
  20. {% embed 'partials/layout.html.twig' with {blog: page} %}
  21. {% block item %}
  22. {% for child in page.find('/agenda').children %}
  23. {% if child.header.date_end|date("d/m/y") <= "now"|date("d/m/y") %}
  24. {% include 'partials/cal-list-event.html.twig' with {blog: page, page: child} %}
  25. {% endif %}
  26. {% endfor %}
  27. {% endblock %}
  28. {% endembed %}
  29. </section>
  30. </section>
  31. {% endblock %}