item.html.twig 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% extends 'partials/base.html.twig' %}
  2. {% set blog = page.find(theme_var('blog-page')|default('/blog')) %}
  3. {% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog]) %}
  4. {% set show_sidebar = header_var('show_sidebar', [page, blog]) %}
  5. {% set show_pagination = header_var('show_pagination', [page, blog]) %}
  6. {% set hero_image_name = page.header.hero_image %}
  7. {% block hero %}
  8. {% if hero_image_name %}
  9. {% set hero_image = page.media[hero_image_name] %}
  10. {% set content %}
  11. <h1>{{ page.title }}</h1>
  12. <h2>{{ page.header.subtitle }}</h2>
  13. {% include 'partials/blog/date.html.twig' %}
  14. {% include 'partials/blog/taxonomy.html.twig' %}
  15. {% endset %}
  16. {% include 'partials/hero.html.twig' with {id: 'blog-hero'} %}
  17. {% endif %}
  18. {% endblock %}
  19. {% block body %}
  20. <section id="body-wrapper" class="section blog-listing">
  21. <section class="container {{ grid_size }}">
  22. {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
  23. {% include 'partials/breadcrumbs.html.twig' %}
  24. {% endif %}
  25. {% embed 'partials/layout.html.twig' %}
  26. {% block item %}
  27. {% include 'partials/blog-item.html.twig' %}
  28. {% endblock %}
  29. {% block sidebar %}
  30. {% include 'partials/sidebar.html.twig' %}
  31. {% endblock %}
  32. {% endembed %}
  33. </section>
  34. </section>
  35. {% endblock %}