templates/pages/fiche-thematique.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block style %}
  3.     {{ parent() }}
  4.     {% include "css/une-page-thematique-critical-css.html.twig" %}
  5.     {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'evenementavenir_css'} %}
  6.     {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'splide_css'} %}
  7.     {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'articles_css'} %}
  8.     {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'previews_css'} %}
  9.     {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'preview_thematique_css'} %}
  10.     {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'sns_icons_css'} %}
  11.     {% if content.main_content|length > 0 %}
  12.         {% for content in content.main_content %}
  13.             {% if content.type == "fiche_thematique_section" %}
  14.                 {% if content.content|length > 0 %}
  15.                     {% for child_content in content.content %}
  16.                         {% if child_content.type == "media" %}
  17.                             {% if child_content.select == "youtube_link" %}
  18.                                 {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'youtube_css'} %}
  19.                             {% endif %}
  20.                         {% endif %}
  21.                         {% if child_content.type == "citation" %}
  22.                             {% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'citation_css'} %}
  23.                         {% endif %}
  24.                     {% endfor %}
  25.                 {% endif %}
  26.             {% endif %}
  27.         {% endfor %}
  28.     {% endif %}
  29.     {% if content.header_img is defined and content.header_img is not empty %}
  30.         <link rel="preload" fetchpriority="high" as="image" href="{{ content.header_img.formats['1000x.webp'] }}" type="image/webp">
  31.     {% endif %}
  32. {% endblock %}
  33. {% block content %}
  34.     {% if content.color is defined and content.color is not empty %}
  35.         {% set background_color = content.color %}
  36.     {% else %}
  37.         {% set background_color = "#354161" %}
  38.     {% endif %}
  39.     {% if content.fil_ariane %}
  40.         {% include "blocks/breadcrumb-normal.html.twig" %}
  41.     {% endif %}
  42.     <div class="main-container w100 plr-1em">
  43.         <div class="content fdc fiche-thematique">
  44.             <div class="{% if content.header_img is defined and content.header_img is not empty %}main-title{% else %}small-main-title{% endif %} dflex aic jcc prelative br8">
  45.                 {% if content.header_img is defined and content.header_img is not empty %}
  46.                     {# pas de loading=lazy ici car c'est le LPC (largest painted content) qui apparaît dès l'arrivée sur le site #}
  47.                     <img src="{{ content.header_img.formats['1000x.webp'] }}" srcset="{{ content.header_img.formats['300x.webp'] }} 300w, {{ content.header_img.formats['600x.webp'] }} 600w, {{ content.header_img.formats['1000x.webp'] }} 1000w" sizes="1000px" alt="{{ content.header_img | copyright_or_description_or_title }}" width="{{ content.header_img.fileVersion.properties.width }}" height="{{ content.header_img.fileVersion.properties.height }}">
  48.                 {% endif %}
  49.                 <div class="zi1">
  50.                     <h1 class="center{% if content.header_img is defined and content.header_img is not empty %} cwhite fiche-thematique-title{% endif %}">{{ content.page_title }}</h1>
  51.                 </div>
  52.                 {% if content.header_img is defined and content.header_img is not empty %}
  53.                     <div class="background-color" style="background: {{ background_color }}"></div>
  54.                 {% endif %}
  55.             </div>
  56.             <div class="dflex jcsb lh28 fwwrap">
  57.                 <div>
  58.                     {% if content.header_img is defined and content.header_img is not empty and content.header_img.credits is defined and content.header_img.credits is not empty  %}
  59.                         <div class="cgrey fs12 lh16 credit mt-8px">&copy; Crédit Photo
  60.                             {{ content.header_img.credits }}</div>
  61.                     {% endif %}
  62.                     <div class="date cgrey">
  63.                         {% if authored is defined and authored is not empty %}
  64.                             Publié le
  65.                             {{ authored|format_datetime('short', 'none') }}
  66.                         {% endif %}
  67.                     </div>
  68.                 </div>
  69.                 <div class="taright">
  70.                     {% include "articles-blocks/share-buttons.html.twig" with {url: content.url} %}
  71.                 </div>
  72.             </div>
  73.             <div class="blocks w100 dflex fiche-thematique jcsb mt-20px">
  74.                 <div class="main-content mb-40px pr-1em w100">
  75.                     {% if content.chapo is defined and content.chapo is not empty %}
  76.                         <div class="mt-20px fw500 fs20 text cgrey">{{ content.chapo|raw }}</div>
  77.                     {% endif %}
  78.                     {% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
  79.                         {% for data in content.main_content %}
  80.                             {% if data.type == "fiche_thematique_section" %}
  81.                                 {% include "articles-blocks/articles-content.html.twig" with {h2_in_list : true, main_h2_title: data.main_title, mobile_gray_theme: "thematique-mobile-gray"} %}
  82.                             {% endif %}
  83.                         {% endfor %}
  84.                     {% endif %}
  85.                 </div>
  86.                 {% include "pages/aside-fiche-thematique.html.twig" %}
  87.             </div>
  88.             {% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
  89.                 {% for data in content.main_content %}
  90.                     {% if data.type == "linked_with" %}
  91.                         {% include "articles-blocks/linked-with.html.twig" %}
  92.                     {% endif %}
  93.                 {% endfor %}
  94.             {% endif %}
  95.             <section class="evenementsavenir fiche-thematique mt-40px mb-40px prelative">
  96.                 <h2 class="fs30 lh36 fw400">Découvrez nos derniers événements</h2>
  97.                 {{ render(controller('App\\Controller\\Website\\ArticlesController::getIncomingEvents')) }}
  98.             </section>
  99.         </div>
  100.     </div>
  101. {% endblock %}
  102. {% block javascripts %}
  103.     {% if content.main_content|length > 0 %}
  104.         {% for content in content.main_content %}
  105.             {% if content.type == "fiche_thematique_section" %}
  106.                 {% if content.content|length > 0 %}
  107.                     {% for child_content in content.content %}
  108.                         {% if child_content.type == "media" %}
  109.                             {% if child_content.select == "youtube_link" %}
  110.                                 {{ encore_entry_script_tags('lite-youtube') }}
  111.                                 {{ encore_entry_script_tags('youtube_defer') }}
  112.                             {% endif %}
  113.                         {% endif %}
  114.                         {% if child_content.type == "photo_report" %}
  115.                             {{ encore_entry_script_tags('splide') }}
  116.                         {% endif %}
  117.                     {% endfor %}
  118.                 {% endif %}
  119.             {% endif %}
  120.         {% endfor %}
  121.     {% endif %}
  122.     {{ encore_entry_script_tags('open_fiche_them_section') }}
  123.     {{ encore_entry_script_tags('splide') }}
  124.     {{ parent() }}
  125. {% endblock %}