item.html.twig 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {% extends 'partials/base.html.twig' %}
  2. {% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
  3. {% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
  4. {% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
  5. {% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
  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. {% endembed %}
  30. </section>
  31. </section>
  32. {% endblock %}