{% if articleContentLinkedWith is defined and articleContentLinkedWith is not empty %}
{% set articleContent = articleContentLinkedWith %}
{% else %}
{% if article.content.content is defined and article.content.content is not empty %}
{% set articleContent = article.content.content %}
{% endif %}
{% endif %}
{% if articleContent.header_img is defined and articleContent.header_img is not empty %}
{% set img = articleContent.header_img %}
{% endif %}
{% if article.excerpt.categories is defined and article.excerpt.categories is not empty %}
{% set categories = article.excerpt.categories %}
{% endif %}
{% if articleContent.chapo is defined and articleContent.chapo is not empty %}
{% set chapo = articleContent.chapo %}
{% endif %}
{% if articleContent.contributors is defined and articleContent.contributors is not empty %}
{% set contributors = articleContent.contributors %}
{% endif %}
{% if article.authorFullName is defined and article.authorFullName is not empty %}
{% set author = article.authorFullName %}
{% endif %}
{% if articleContent.readtime is defined and articleContent.readtime is not empty %}
{% set readtime = articleContent.readtime %}
{% endif %}
{% if block.slider_mode is defined and block.slider_mode is not empty %}
<li class="splide__slide">
<div class="preview-container {{ article.type }} br8 dflex fdc">
{% else %}
<div class="preview-container {{ article.type }} br8 dflex fdc{% if i > 2 and cancel is defined and not cancel %} not-visible-mobile-article{% endif %}{% if i > 3 and cancel is defined and not cancel %} not-visible-tablette-article{% endif %}">
{% endif %}
<div class="preview-header">
{% if img is defined and img is not empty %}
{% include "blocks/previews/img/image.html.twig" %}
{% else %}
{% include "blocks/previews/img/default-image.html.twig" %}
{% endif %}
{% if article.type == "analyses" %}
<div class="background-color-blue"></div>
{% elseif article.type == "guides_outils" %}
<div class="background-color-orange"></div>
{% endif %}
<p class="fs14 lh20 dflex aic">
{% if article.type == "analyses" %}
Analyse
{% elseif article.type == "guides_outils" %}
Guide / Outil
{% else %}
Article
{% endif %}
</p>
</div>
<div class="preview-content{% if article.type != " articles" %} dflex fdc{% endif %}">
{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
<a href="{{ sulu_content_path(article.routePath) }}" class="cblue nodeco{% if article.type != " articles" %} reverse{% endif %}">
<div class="fw500 fs20 preview-h3 lh28 mt-8px">{{ article.title }}</div>
</a>
{% if chapo is defined and chapo is not empty %}
{% set number = 0 %}
{% if categories is defined and categories is not empty and article.title is defined and article.title is not empty %}
{% if (categories|length == 3 and article.title|length < 90) or (categories|length == 2 and article.title|length >= 90) %}
{% set number = 137 %}
{% elseif (categories|length == 3 and article.title|length > 90) or (categories|length == 2 and article.title|length > 90) %}
{% set number = 87 %}
{% else %}
{% set number = 192 %}
{% endif %}
{% endif %}
<div class="lh24 preview-chapo">
{{ chapo|slice(0, number)|striptags|raw }}
{% if chapo|length > number %}
...
<a href="{{ sulu_content_path(article.routePath) }}" class="cgrey">Lire la suite</a>
{% endif %}
</div>
{% endif %}
</div>
<div class="mta">
<div class="mt-12px">
<div class="dflex jcsb mt-8px">
<div class="preview-contributors">
{% if article.type == "articles" %}
{% set set_article = true %}
{% endif %}
{% include "users/contributorDisplay.html.twig" with { article: article} %}
</div>
{% if readtime is defined and readtime is not empty %}
<div class="cgrey fs14 lh20">{{ readtime }}
min de lecture
</div>
{% endif %}
</div>
</div>
{% if article.authored is defined and article.authored is not empty %}
<span class="cgrey fs14 lh20">PubliƩ le
{{ article.authored|format_datetime('short', 'none', locale='fr') }}
</span>
{% endif %}
</div>
{% if block.slider_mode is defined and block.slider_mode is not empty %}
</div>
</li>
{% else %}
</div>
{% endif %}