{% extends "layout-snippets.html.twig" %}
{% block snippets %}
<div class="apk-snippet-news uk-position-relative">
<div class="uk-container apk-container-1400">
{% if lastnew|length == 0 %}
<div class="uk-margin-medium-top uk-text-center">
{{ "Aucune article n'est disponible"|trans }}
</div>
{% endif %}
<div uk-grid>
<div class="uk-width-1-2@m">
<div class="uk-position-relative apk-video">
<div class="aspect-ratio">
{{ pimcore_video('content-video') }}
</div>
</div>
</div>
<div class="uk-width-1-2@m">
<h2>{{ pimcore_textarea("content-title",{"nl2br" : true}) }}</h2>
{% for new in lastnew %}
{% if new.Slug %}
{% set link = path('newsDetail', {'slug': new.Slug, 'id': new.id}) %}
{% else %}
{% set link = false %}
{% endif %}
<div uk-grid>
<div class="uk-width-1-3@m">
<div class="uk-cover-container uk-height-small" data-apk-href="{{ link }}">
{{ new.image.thumbnail('global-image').html({'imgAttributes' : {'uk-cover' : null}})|raw }}
</div>
</div>
<div class="uk-width-2-3@m">
<div class="apk-grid-content apk-list-news-content">
<h4 class="uk-margin-remove-top uk-margin-remove-bottom">{{ (new.titre|nl2br)|raw }}</h4>
<h5 class="uk-margin-small-top uk-margin-small-bottom">{{ new.date|date('d-m-Y') }}</h5>
<p class="uk-margin-remove-top uk-margin-remove-bottom">{{ (new.courte_desc|nl2br)|raw }}</p>
<br>
</div>
</div>
</div>
{% endfor %}
<div class="apk-global-link">
{{ pimcore_link("global-btn") }}
</div>
</div>
</div>
</div>
</div>
{% endblock %}