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.     {% set associated_category_id = null %}
  43.     {% if content.associated_category is defined and content.associated_category is not empty %}
  44.         {% set associated_category_id = content.associated_category.id %}
  45.     {% endif %}
  46.     <div class="main-container w100 plr-1em">
  47.         <div class="content fdc fiche-thematique">
  48.             <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">
  49.                 {% if content.header_img is defined and content.header_img is not empty %}
  50.                     {# pas de loading=lazy ici car c'est le LPC (largest painted content) qui apparaît dès l'arrivée sur le site #}
  51.                     <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 }}">
  52.                 {% endif %}
  53.                 <div class="zi1">
  54.                     <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>
  55.                 </div>
  56.                 {% if content.header_img is defined and content.header_img is not empty %}
  57.                     <div class="background-color" style="background: {{ background_color }}"></div>
  58.                 {% endif %}
  59.             </div>
  60.             <div class="dflex jcsb lh28 fwwrap">
  61.                 <div>
  62.                     {% 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  %}
  63.                         <div class="cgrey fs12 lh16 credit mt-8px">&copy; Crédit Photo
  64.                             {{ content.header_img.credits }}</div>
  65.                     {% endif %}
  66.                     <div class="date cgrey">
  67.                         {% if authored is defined and authored is not empty %}
  68.                             Publié le
  69.                             {{ authored|format_datetime('short', 'none') }}
  70.                         {% endif %}
  71.                     </div>
  72.                 </div>
  73.                 <div class="taright">
  74.                     {% include "articles-blocks/share-buttons.html.twig" with {url: content.url} %}
  75.                 </div>
  76.             </div>
  77.             {% if content.chapo is defined and content.chapo is not empty %}
  78.                 <div class="mt-20px fw500 fs20 text cgrey lh24">{{ content.chapo|raw }}</div>
  79.             {% endif %}
  80.             <div class="blocks w100 dflex fiche-thematique jcsb">
  81.                 <div class="main-content mb-40px pr-1em w100">
  82.                     {% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
  83.                         {% for data in content.main_content %}
  84.                             {% if data.type == "fiche_thematique_section" %}
  85.                                 {% include "articles-blocks/articles-content.html.twig" with {h2_in_list : true, main_h2_title: data.main_title, mobile_gray_theme: "thematique-mobile-gray"} %}
  86.                             {% endif %}
  87.                         {% endfor %}
  88.                     {% endif %}
  89.                 </div>
  90.                 <section class="evenementsavenir fiche-thematique mt-20px mb-40px prelative">
  91.                     <h2 class="fs30 lh36 fw400">
  92.                         <a href="/actualites/agenda?theme={{ associated_category_id }}" class="nodeco cblue">Agenda</a>
  93.                     </h2>
  94.                     {{ render(controller('App\\Controller\\Website\\ArticlesController::getIncomingEventsForThematiques', {id: associated_category_id})) }}
  95.                 </section>
  96.             </div>
  97.             <div class="dflex blocks fiche-thematique">
  98.                 <div class="thematiques-links-cont">
  99.                     {% include "pages/aside-fiche-thematique.html.twig" %}
  100.                 </div>
  101.                 <section class="evenementsavenir fiche-thematique mt-20px mb-40px prelative">
  102.                     <h2 class="fs30 lh36 fw400">
  103.                         <span>Nouvelles Ressources</span>
  104.                     </h2>
  105.                     {{ render(controller('App\\Controller\\Website\\ArticlesController::getActualitesForThematiques', {id: associated_category_id})) }}
  106.                 </section>
  107.             </div>
  108.             {% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
  109.                 {% for data in content.main_content %}
  110.                     {% if data.type == "linked_with" %}
  111.                         {% include "articles-blocks/linked-with-thematique.html.twig" %}
  112.                     {% endif %}
  113.                 {% endfor %}
  114.             {% endif %}
  115.             {% include "blocks/aside/referents-pqna.html.twig" with {title: content.referents_title } %}
  116.         </div>
  117.     </div>
  118. {% endblock %}
  119. {% block javascripts %}
  120.     {% if content.main_content|length > 0 %}
  121.         {% for content in content.main_content %}
  122.             {% if content.type == "fiche_thematique_section" %}
  123.                 {% if content.content|length > 0 %}
  124.                     {% for child_content in content.content %}
  125.                         {% if child_content.type == "media" %}
  126.                             {% if child_content.select == "youtube_link" %}
  127.                                 {{ encore_entry_script_tags('lite-youtube') }}
  128.                                 {{ encore_entry_script_tags('youtube_defer') }}
  129.                             {% endif %}
  130.                         {% endif %}
  131.                         {% if child_content.type == "photo_report" %}
  132.                             {{ encore_entry_script_tags('splide') }}
  133.                         {% endif %}
  134.                     {% endfor %}
  135.                 {% endif %}
  136.             {% endif %}
  137.         {% endfor %}
  138.     {% endif %}
  139.     {{ encore_entry_script_tags('open_fiche_them_section') }}
  140.     {{ encore_entry_script_tags('splide') }}
  141.     {{ parent() }}
  142. {% endblock %}