{% if articleContent.contributors is defined and articleContent.contributors is not empty %}
{% set contributors = articleContent.contributors %}
{% endif %}
{% if articleContent.readtime is defined and articleContent.readtime is not empty %}
{% set readtime = articleContent.readtime %}
{% endif %}
{% if articleContent.header_img is defined and articleContent.header_img is not empty %}
{% set img = articleContent.header_img %}
{% 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.template == "analyses" or article.template == "guides_outils" %}
<div class="background-color-blue"></div>
{% endif %}
<p class="fs14 lh20 dflex aic">
{% if article.template == "analyses" %}
Analyse
{% elseif article.template == "guides_outils" %}
Guide / Outil
{% else %}
Article
{% endif %}
</p>
</div>
<div class="preview-content{% if article.template != " articles" %} dflex fdc{% endif %}">
{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
<a href="{{ sulu_content_path(routePath) }}" class="cblue nodeco{% if article.template != " articles" %} reverse{% endif %}">
<div class="fw500 fs20 preview-h3 lh28 mt-8px">{{ 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 title is defined and title is not empty %}
{% if (categories|length == 3 and title|length < 90) or (categories|length == 2 and title|length >= 90) %}
{% set number = 137 %}
{% elseif (categories|length == 3 and title|length > 90) or (categories|length == 2 and 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(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">
{% include "users/contributorDisplay.html.twig" with {author: sulu_resolve_contact(article.author)} %}
</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>