{% if articleContent.pdf_link is defined and articleContent.pdf_link is not empty %}
{% set pdf_link = articleContent.pdf_link %}
{% endif %}
{% if articleContent.newsletter_type is defined and articleContent.newsletter_type is not empty %}
{% set newsletter_type = articleContent.newsletter_type %}
{% endif %}
{% if articleContent.header_img is defined and articleContent.header_img is not empty %}
{% set img = articleContent.header_img %}
{% endif %}
<div class="preview-header dflex aic jcc">
{% 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 %}
<div class="background-color-blue"></div>
{% if pdf_link is defined and pdf_link is not empty %}
<a href="{{ pdf_link.url }}" class="cwhite nodeco dflex aic jcc m0-10">
<h3 class="fw400 fs30 lh35 mt-8px">{{ title }}</h3>
</a>
{% endif %}
</div>
<div class="preview-content">
{% if newsletter_type is defined and newsletter_type is not empty %}
{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
{% endif %}
{% if chapo is defined and chapo is not empty %}
{% if categories is defined and categories is not empty and title is defined and title is not empty %}
{% set number = 0 %}
{% 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 %}
{% if number is not defined or number is empty %}
{% set number = 192 %}
{% endif %}
<div class="lh28 preview-chapo fw500 fs20 mb-1em">
{{ chapo|slice(0, number)|striptags|raw }}
{% if chapo|length > number %}
...
{% endif %}
</div>
{% endif %}
</div>
<div class="mta">
{% 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>