reader.html.twig 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends 'partials/base.html.twig' %}
  2. {% block content %}
  3. {% set class_suffix = page.parent.title|lower %}
  4. <div id="reader" class="content" data-barba="container" data-barba-namespace="reader">
  5. <div id="header-project">
  6. <h2 class="info-project-{{ class_suffix }}">
  7. <span data-text="{{ page.title }}">{{ page.title }}</span>
  8. </h2>
  9. </div>
  10. <a href="{{ page.parent.parent.url }}"><div id="close-project" class="picto" data-src="{{ url('theme://images/pictos/cross.svg') }}" aria-hidden="true"></div></a>
  11. <figure id="cover-image-mobile" class="{{ class_suffix }}">
  12. <img src="{{ url('theme://images/loader/rolling.svg') }}" data-src="{{ page.media.images|first.url }}" alt="{{ page.title }}" class="lazy loader">
  13. </figure>
  14. <div id="info-project" class="info-project-{{ class_suffix }}">
  15. <h2 id="main-project-title">{{ page.title }}</h2>
  16. <div>
  17. {% for tag in page.taxonomy.tag %}
  18. {{ tag }},
  19. {% endfor %}
  20. {{ page.date|date("Y") }}
  21. </div>
  22. </div>
  23. <figure id="cover-image" class="{{ class_suffix }}">
  24. <img src="{{ url('theme://images/loader/rolling.svg') }}" data-src="{{ page.media.images|first.url }}" alt="{{ page.title }}" class="lazy loader">
  25. </figure>
  26. <hr>
  27. <div id="project-description">
  28. {{ page.content|raw }}
  29. </div>
  30. <div id="project-images-grid">
  31. {% for image in page.media.images %}
  32. {% if image != page.media.images | first %}
  33. <figure class="{{ class_suffix }}">
  34. <img src="{{ url('theme://images/loader/rolling.svg') }}" data-src="{{ image.url }}" alt="{{ page.title }}" class="lazy loader project-image">
  35. </figure>
  36. {% endif %}
  37. {% endfor %}
  38. </div>
  39. {% block related_pages %}
  40. {% include 'partials/relatedpages.html.twig' %}
  41. {% endblock %}
  42. {% block carousel %}
  43. {% include 'partials/carousel.html.twig' %}
  44. {% endblock %}
  45. </div>
  46. {% endblock %}