templates/pages/archiv.html.twig line 1

Open in your IDE?
  1. {% extends "base_archive.html.twig" %}
  2. {% block content %}
  3. <main id="main" class="main-shifted-right-archiv" style="margin-top: 0">
  4. {# <div class="container">
  5. <div class="title" style="width: 80%">
  6. <h1 style="font-family: Teko Medium, sans-serif; font-size: 70px; letter-spacing: 1.3px"> {{ content.title}} </h1>
  7. </div>
  8. </div>#}
  9. {% set temp_archivBlocks = [] %}
  10. {% for block in content.blocks %}
  11. {% if block.type == "archivBlock" %}
  12. {% set temp_archivBlocks = temp_archivBlocks|merge([block]) %}
  13. {% else %}
  14. {# Check if there are any archivBlocks stored in the temporary storage #}
  15. {% if temp_archivBlocks is not empty %}
  16. {% include 'partials/archivBlock.html.twig' with {
  17. archives: temp_archivBlocks,
  18. tabs_per_row: 4
  19. } %}
  20. {# Reset the temporary storage #}
  21. {% set temp_archivBlocks = [] %}
  22. {% endif %}
  23. {% include 'partials/' ~ block.type ~ '.html.twig' with {
  24. content: block,
  25. view: view.blocks[loop.index0],
  26. } %}
  27. {% endif %}
  28. {% endfor %}
  29. {# After the loop, check if there are any remaining archivBlocks to render #}
  30. {% if temp_archivBlocks is not empty %}
  31. {% include 'partials/archivBlock.html.twig' with {
  32. archives: temp_archivBlocks,
  33. tabs_per_row: 4,
  34. } %}
  35. {% endif %}
  36. </main>
  37. <style>
  38. h2 {
  39. font-size: 70px;
  40. }
  41. </style>
  42. {% endblock %}