{% if data.articles is defined and data.articles is not empty and data.articles|length > 0 %}
<section class="linked-with mb-40px">
{% if data.title is defined and data.title is not empty %}
<h2 class="fs50 mt-20px fw500">
{{ data.title }}
</h2>
{% endif %}
<div class="articles-container mt-20px linked-with-thematique evenementsavenir w100">
<div class="splide-photo splide" aria-label="En lien avec">
<div class="splide__arrows">
<button class="splide__arrow splide__arrow--prev">
{{ source('svg/left-arrow-icon.html.twig') }}
</button>
<button class="splide__arrow splide__arrow--next">
{{ source('svg/right-arrow-icon.html.twig') }}
</button>
</div>
<div class="splide__track">
<ul class="splide__list mb-3p5em">
{% for i, article in data.articles %}
{% if article.content is defined and article.content is not empty %}
<li class="splide__slide">
{% set image = article.content.header_img %}
{% set title = article.title %}
{% set url = article.routePath %}
{% set chapo = '' %}
{% if article.content is defined and article.content.chapo is defined and article.content.chapo is not null %}
{% set chapo = article.content.chapo %}
{% elseif article.content is defined and article.content.desc is defined and article.content.desc is not null %}
{% set chapo = article.content.desc %}
{% endif %}
{% set publish_date = article.published %}
{% set type = article.typeTranslation %}
<div class="preview-container fiche-thematique-nouvelles-ressources dflex fdc">
<div class="img-cont br8">
{% if image is defined and image is not empty and image.url is defined %}
<img src="{{ image.url }}" class="br8" loading="lazy">
{% else %}
{% include "blocks/previews/img/default-image.html.twig" %}
{% endif %}
<span class="pabsolute rubrique cwhite fs24">{{ type }}</span>
</div>
<div class="bottom-cont dflex fdc jcsb h100">
<div class="bottom-left-block">
<a href="{{ url }}" class="fw500 lh28 fs24 cblue nodeco title" title="{{ title }}">{{ title }}</a>
{% if chapo is defined and chapo is not empty %}
<div class="fs20 lh24 mt-8px cblue chapo" title="{{ chapo|striptags }}">{{ chapo|raw }}</div>
{% endif %}
</div>
<div class="bottom-right-block dflex fdc mt-20px">
{% if published_date is defined and published_date is not empty %}
<span class="publish-date">
{{ published_date }}
</span>
{% endif %}
<a href={{ url }} class="fw500 lh28 fs24 cwhite nodeco know-more mt-12px">Je lis la suite</a>
</div>
</div>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</section>
{% endif %}