other_projets.html.twig 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <div class="other_projets">
  2. <h3>Les autres projets <span class="{{page.parent.title|lower}}">{{page.parent.title|lower}}s</span></h3>
  3. {% set collection_random = page.parent.collection|slice(1,4) %}
  4. {% for item in collection_random %}
  5. {% if item.title == page.title == false %}
  6. <div class="card">
  7. <div class="card-images">
  8. <a href="{{item.url}}">
  9. {% for image in item.media.images|slice(0,1) %}
  10. {{ image.html }}
  11. {% endfor %}
  12. </a>
  13. </div>
  14. <div class="card-header">
  15. {% if item.header.title %}
  16. {% include 'partials/blog/title.html.twig' with { 'page': item } %}
  17. {% endif %}
  18. {% if item.header.taxonomy.tag %}
  19. <!-- <span>&#x2022;</span> -->
  20. {% include 'partials/blog/taxonomy.html.twig' with { 'page': item } %}
  21. {% endif %}
  22. {% if item.header.date %}
  23. <!-- <span>&#x2022;</span> -->
  24. {% include 'partials/blog/date.html.twig' with { 'page': item } %}
  25. {% endif %}
  26. </div>
  27. </div>
  28. {% endif %}
  29. {% endfor %}
  30. </div>