templates/articles-blocks/linked-with-thematique.html.twig line 1

Open in your IDE?
  1. {% if data.articles is defined and data.articles is not empty and data.articles|length > 0 %}
  2.     <section class="linked-with mb-40px">
  3.         {% if data.title is defined and data.title is not empty %}
  4.             <h2 class="fs50 mt-20px fw500">
  5.                 {{ data.title }}
  6.             </h2>
  7.         {% endif %}
  8.         <div class="articles-container mt-20px linked-with-thematique evenementsavenir w100">
  9.             <div class="splide-photo splide" aria-label="En lien avec">
  10.                 <div class="splide__arrows">
  11.                     <button class="splide__arrow splide__arrow--prev">
  12.                         {{ source('svg/left-arrow-icon.html.twig') }}
  13.                     </button>
  14.                     <button class="splide__arrow splide__arrow--next">
  15.                         {{ source('svg/right-arrow-icon.html.twig') }}
  16.                     </button>
  17.                 </div>
  18.                 <div class="splide__track">
  19.                     <ul class="splide__list mb-3p5em">
  20.                         {% for i, article in data.articles %}
  21.                             {% if article.content is defined and article.content is not empty %}
  22.                                 <li class="splide__slide">
  23.                                     {% set image = article.content.header_img %}
  24.                                     {% set title = article.title %}
  25.                                     {% set url = article.routePath %}
  26.                                     {% set chapo = '' %}
  27.                                     {% if article.content is defined and article.content.chapo is defined and article.content.chapo is not null %}
  28.                                         {% set chapo = article.content.chapo %}
  29.                                     {% elseif article.content is defined and article.content.desc is defined and article.content.desc is not null %}
  30.                                         {% set chapo = article.content.desc %}
  31.                                     {% endif %}
  32.                                     {% set publish_date = article.published %}
  33.                                     {% set type = article.typeTranslation %}
  34.                                     <div class="preview-container fiche-thematique-nouvelles-ressources dflex fdc">
  35.                                         <div class="img-cont br8">
  36.                                             {% if image is defined and image is not empty and image.url is defined %}
  37.                                                 <img src="{{ image.url }}" class="br8" loading="lazy">
  38.                                             {% else %}
  39.                                                 {% include "blocks/previews/img/default-image.html.twig" %}
  40.                                             {% endif %}
  41.                                             <span class="pabsolute rubrique cwhite fs24">{{ type }}</span>
  42.                                             
  43.                                         </div>
  44.                                         <div class="bottom-cont dflex fdc jcsb h100">
  45.                                             <div class="bottom-left-block">
  46.                                                 <a href="{{ url }}" class="fw500 lh28 fs24 cblue nodeco title" title="{{ title }}">{{ title }}</a>
  47.                                                 {% if chapo is defined and chapo is not empty %}
  48.                                                     <div class="fs20 lh24 mt-8px cblue chapo" title="{{ chapo|striptags }}">{{ chapo|raw }}</div>
  49.                                                 {% endif %}
  50.                                             </div>
  51.                                             <div class="bottom-right-block dflex fdc mt-20px">
  52.                                                 {% if published_date is defined and published_date is not empty %}
  53.                                                     <span class="publish-date">
  54.                                                         {{ published_date }}
  55.                                                     </span>
  56.                                                 {% endif %}
  57.                                                 <a href={{ url }} class="fw500 lh28 fs24 cwhite nodeco know-more mt-12px">Je lis la suite</a>
  58.                                             </div>
  59.                                         </div>
  60.                                     </div>
  61.                                 </li>
  62.                             {% endif %}
  63.                         {% endfor %}
  64.                     </ul>
  65.                 </div>
  66.             </div>
  67.         </div>
  68.     </section>
  69. {% endif %}