agenda.twig 1.0 KB

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