{% if articleContent.header_img is defined and articleContent.header_img is not empty %}
{% set img = articleContent.header_img %}
{% endif %}
{% if articleContent.type_appel is defined and articleContent.type_appel is not empty %}
{% set type_appel = articleContent.type_appel %}
{% endif %}
{% if articleContent.limit_date is defined and articleContent.limit_date is not empty %}
{% set limit_date = articleContent.limit_date %}
{% endif %}
{% if articleContent.structure is defined and articleContent.structure is not empty %}
{% set structure = articleContent.structure %}
{% endif %}
{% if articleContent.chapo.value is defined and articleContent.chapo.value is not empty %}
{% set chapo = articleContent.chapo.value %}
{% endif %}
{% if type_appel == "mission"%}
{% set type_appel = "Appel à manifestation d'intérêt" %}
{% else %}
{% set type_appel = "Appel à projet" %}
{% 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 %}
<div class="background-color-blue"></div>
</div>
<div class="preview-content dflex fdc w100">
<a href="{{ sulu_content_path(routePath) }}" class="cblack nodeco">
<div class="fw500 fs20 preview-h3 lh28">{{ title }}</div>
</a>
{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
<div>
{% if structure is defined and structure is not empty %}
<div class="enterprise dflex aife mb-1em mt-1em">
<img src="/resources/img/offres/trunks-icon.svg" alt="Entreprise" width="16" height="16">
{{ structure }}
</div>
{% endif %}
{% if type_appel is defined and type_appel is not empty %}
<div class="type-appel dflex aife mb-1em mt-1em">
<img src="/resources/img/aapami/aapami-icon.svg" alt="Appel" width="15" height="16">
{{ type_appel }}
</div>
{% endif %}
{% if limit_date is defined and limit_date is not empty %}
<div class="timeanddate dflex mb-1em mt-1em">
<div class="time dflex aic">
<img src="/resources/img/aapami/calendar-icon.svg" alt="Date" width="16" height="16">
Date limite de candidature
{{ limit_date|format_datetime("short", "none") }}
</div>
</div>
{% endif %}
</div>
<span class="cgrey fs14 lh20 mta taright">Publié le
{{ article.authored|format_datetime('short', 'none', locale='fr') }}
</span>
</div>