projets-index.html.twig 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {% extends 'partials/base.html.twig' %}
  2. {% block content %}
  3. <div class="content" id="projets-index" data-barba="container" data-barba-namespace="projetsindex">
  4. <div id="filter-index">
  5. <p>Consulter les projets d'utilité</p>
  6. <p>
  7. <span id="publique-filter" class="filter-button" onClick="filterCards('publique')">publique</span>,
  8. <span id="sociale-filter" class="filter-button" onClick="filterCards('sociale')">sociale</span>,
  9. <span id="culturelle-filter" class="filter-button" onClick="filterCards('culturelle')">culturelle</span>
  10. </p>
  11. </div>
  12. <hr>
  13. {% for category in taxonomylist.get().category|keys %}
  14. <div class="title-category" onclick="toggleCategory(this)">
  15. <h2>
  16. {{ category }}
  17. </h2>
  18. <div class="picto chevron-category" data-src="{{ url('theme://images/pictos/chevron-down.svg') }}" aria-hidden="true"></div>
  19. </div>
  20. {% set cat = { items: {'@taxonomy': {'category': category} } } %}
  21. {% set pages = page.collection(cat) %}
  22. <div class="projets-grid">
  23. {% for p in pages.order('date', 'desc') %}
  24. {% block project_card %}
  25. {% include 'partials/projet_card.html.twig' %}
  26. {% endblock %}
  27. {% endfor %}
  28. </div>
  29. {% endfor %}
  30. </div>
  31. {% endblock %}