{# TODO : ce code a été copié depuis le slider des JPO, du coup les btn <-> controlent les 2 slider ! A dissocier #}
<div class="block-jpo-une">
<div class="position-relative">
<div class="overflow-visible">
{% if videosOnpc|length > 3 %}
<span id="jpo-next" class="next-slide-jpo"></span>
<span id="jpo-prev" class="prev-slide-jpo"></span>
{% endif %}
{# Pour l'affichage sur desktop #}
<div class="jpo-une d-none d-md-block d-lg-block mt-4">
{% for video in videosOnpc %}
{% if loop.index == 1 or loop.index == 4 or loop.index == 7 %}
<div class="slide-jpo w-100">
{% endif %}
<article class="jpo position-relative">
<figure class="resize figure-video-onpc">
{% set imgSrc = vich_uploader_asset(video, 'photoFile') %}
{% if imgSrc %}
<img loading="lazy" src="{{ vich_uploader_asset(video, 'photoFile')| imagine_filter('webtv_list') }}" alt="{{ video.titre }}" title="{{ video.titre }}">
{% endif %}
</figure>
<div class="content">
<a href="{{ path('video-promo-fiche', {'slug': video.slug}) }}"><p class="city">{{ video.titre | u.truncate(50, '…', true)}}</p></a>
<small>{{video.createdAt | format_date(pattern='d MMMM Y') }}</small>
</div>
</article>
{% if loop.index == 3 or loop.index == 6 or loop.last %}
</div>
{% endif %}
{% endfor %}
</div>
{# Pour l'affichage sur mobile #}
<div class="jpo-une d-block d-md-none d-lg-none mt-4">
{% for video in videosOnpc %}
<div class="slide-jpo w-100">
<article class="jpo position-relative">
<figure class="resize">
{% set imgSrc = vich_uploader_asset(video, 'photoFile') %}
{% if imgSrc %}
<img loading="lazy" class="resp" src='{{imgSrc}}' alt='{{video.titre}}' width='140' height='140'/>
{% endif %}
</figure>
<div class="content">
<a href="{{ path('video-promo-fiche', {'slug': video.slug}) }}"><p class="city">{{ video.titre | u.truncate(50, '…', true)}}</p></a>
<small>{{video.createdAt | format_date(pattern='d MMMM Y') }}</small>
</div>
</article>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="all-day">
<a href="{{ path('video-onpc-liste')}}" class="btn-gris">Consulter toutes les vidéos</a>
</div>
</div>