home.html.twig 907 B

1234567891011121314151617181920212223242526
  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. <div class="full">
  10. {% set options = { items: {'@page.self': '/projets'}, 'limit': 1 } %}
  11. {% set my_collection = page.collection(options) %}
  12. <div class="enter">
  13. {{content}}
  14. </div>
  15. {% for p in my_collection %}
  16. {% for image in p.media.images|randomize|slice(0,1) %}
  17. {{ image.html }}
  18. {% endfor %}
  19. {% endfor %}
  20. </div>
  21. {% endblock %}