blog.html.twig 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 body %}
  9. <section id="body-wrapper">
  10. <section>
  11. {% embed 'partials/layout.html.twig' with {blog: page} %}
  12. {% block item %}
  13. <div class="cat-list">
  14. <ul>
  15. {% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'category', children_only: true} %}
  16. </ul>
  17. </div>
  18. <div class="works full-works">
  19. {% for child in collection if child.template == 'item' %}
  20. {% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
  21. {% endfor %}
  22. </div>
  23. {% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
  24. <div id="listing-footer">
  25. {% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
  26. </div>
  27. {% endif %}
  28. {% endblock %}
  29. {% block sidebar %}
  30. {% include 'partials/sidebar.html.twig' %}
  31. {% endblock %}
  32. {% endembed %}
  33. </section>
  34. </section>
  35. {% endblock %}