archive.twig 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends "base.twig" %}
  2. {% block content %}
  3. {% include 'components/title_page.twig' %}
  4. {% set now = 'now'|date('Ymd') %}
  5. <section class="row filter">
  6. <ul class="d-flex col flex-wrap">
  7. <li><a href="/agenda">Agenda</a></li>
  8. </ul>
  9. <ul class="cat-list col d-flex flex-wrap">
  10. <li data-filter="*">
  11. Tous
  12. </li>
  13. {% set newArray = [] %}
  14. {% for cat in posts %}
  15. {% set term = cat.categories|last.slug %}
  16. {% set end = cat.informations_fin_event|date("Ymd") %}
  17. {% if term not in newArray and now >= end %}
  18. <li data-filter=".{{cat.categories|last.slug}}" >
  19. {{cat.categories|last.name}}
  20. </li>
  21. {% set newArray = newArray|merge([term]) %}
  22. {% endif %}
  23. {% endfor %}
  24. </ul>
  25. </section>
  26. <div class="paralax archive" data-rellax-speed="-5">
  27. <img src="{{theme.link}}/dist/assets/images/objet_4.svg" alt="objet 4">
  28. </div>
  29. <section class="row grid">
  30. {% for item in posts %}
  31. {% set end = item.informations_fin_event|date("Ymd") %}
  32. {% if now >= end %}
  33. {% include 'components/thumbnails/thumbnails.twig' with { hn : 'h2'} %}
  34. {% endif %}
  35. {% endfor %}
  36. </section>
  37. {% include 'partial/pagination.twig'%}
  38. {% endblock %}