reader.html.twig 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {% extends 'partials/base.html.twig' %}
  2. {% block content %}
  3. <div id="reader" class="content" data-barba="container" data-barba-namespace="reader">
  4. <div id="header-project">
  5. {% switch page.parent.title %}
  6. {% case 'Publique' %}
  7. <h2 class="info-project-publique">
  8. {% case 'Sociale' %}
  9. <h2 class="info-project-sociale">
  10. {% case 'Culturelle' %}
  11. <h2 class="info-project-culturelle">
  12. {% endswitch %}
  13. <span data-text="{{ page.title }}">{{ page.title }}</span></h2>
  14. </div>
  15. <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>
  16. <figure id="cover-image-mobile">
  17. <img src="{{ url('theme://images/loader/rolling.svg') }}" data-src="{{ page.media.images|first.url }}" alt="{{ page.title }}" class="lazy loader">
  18. </figure>
  19. {% switch page.parent.title %}
  20. {% case 'Publique' %}
  21. <div id="info-project" class="info-project-publique">
  22. {% case 'Sociale' %}
  23. <div id="info-project" class="info-project-sociale">
  24. {% case 'Culturelle' %}
  25. <div id="info-project" class="info-project-culturelle">
  26. {% endswitch %}
  27. <h2 id="main-project-title">{{ page.title }}</h2>
  28. <div>
  29. {% for tag in page.taxonomy.tag %}
  30. {{ tag }},
  31. {% endfor %}
  32. {{ page.date|date("Y") }}
  33. </div>
  34. </div>
  35. <figure id="cover-image">
  36. <img src="{{ url('theme://images/loader/rolling.svg') }}" data-src="{{ page.media.images|first.url }}" alt="{{ page.title }}" class="lazy loader">
  37. </figure>
  38. <hr>
  39. <div id="project-description">
  40. {{ page.content|raw }}
  41. </div>
  42. <div id="project-images-grid">
  43. {% for image in page.media.images %}
  44. {% if image != page.media.images | first %}
  45. <figure>
  46. <img src="{{ url('theme://images/loader/rolling.svg') }}" data-src="{{ image.url }}" alt="{{ page.title }}" class="lazy loader project-image">
  47. </figure>
  48. {% endif %}
  49. {% endfor %}
  50. </div>
  51. {% block related_pages %}
  52. {% include 'partials/relatedpages.html.twig' %}
  53. {% endblock %}
  54. {% block carrousel %}
  55. {% include 'partials/carrousel.html.twig' %}
  56. {% endblock %}
  57. </div>
  58. {% endblock %}