{% set hits = get_evenements_a_venir() %}
{% if hits|length > 0 %}
<div class="dflex fwwrap evenementsavenir-preview-container mt-40px">
<div class="splide-photo splide events" aria-label="En lien avec">
<div class="splide__arrows">
<button class="splide__arrow splide__arrow--prev">
{{ source('svg/left-arrow-icon.html.twig') }}
</button>
<button class="splide__arrow splide__arrow--next">
{{ source('svg/right-arrow-icon.html.twig') }}
</button>
</div>
<div class="splide__track">
<ul class="splide__list mb-3p5em">
{% for i, hit in hits %}
{% set type = hit.template %}
{% set url = sulu_content_path(hit.routePath) %}
{% if hit.published is defined and hit.published is not empty %}
{% set published = hit.published %}
{% endif %}
{% if hit.excerptCategories is defined and hit.excerptCategories|length > 0 %}
{% set categories = hit.excerptCategories %}
{% endif %}
{% if hit.title is defined and hit.title is not empty %}
{% set title = hit.title %}
{% endif %}
{% if hit.chapo is defined and hit.chapo is not empty %}
{% set chapo = hit.chapo %}
{% endif %}
{% if hit.changed is defined and hit.changed is not empty %}
{% set changed = hit.changed %}
{% endif %}
{% if hit.header_img is defined and hit.header_img is not empty %}
{% set img = sulu_resolve_media(hit.header_img.id, 'fr') %}
{% endif %}
{% if hit.date is defined and hit.date is not empty %}
{% set date = hit.date %}
{% endif %}
{% if hit.time is defined and hit.time is not empty %}
{% set time = hit.time %}
{% endif %}
{% if hit.price is defined and hit.price is not empty %}
{% set price = hit.price %}
{% endif %}
{% if hit.event_type is defined and hit.event_type is not empty %}
{% set event_type = hit.event_type %}
{% endif %}
{% if hit.chapo is defined and hit.chapo is not empty %}
{% set chapo = hit.chapo %}
{% endif %}
{% set title_lines = "" %}
{% if i > 0 %}
{% set title_lines = "fourlines" %}
{% endif %}
<li class="splide__slide dflex jcc">
<div class="preview-container agenda br8 dflex">
{% include "blocks/previews-from-controller/preview-agenda-logic.html.twig" %}
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="bgblue pabsolute w100 evenement-css"></div>
{% else %}
<span class="fw500 fs20 preview-h3 lh28">
Aucun évènements à venir prévus.
</span>
{% endif %}