<section class="flex flex-col gap-3 adjusted-marg-y-sm">
<div class="flex flex-row justify-between items-center">
<h2 class="h4">Mentionnés dans l'article</h2>
</div>
<div class="relative flex flex-col gap-3" x-data="initSlider" x-init="
calcPageSize();
$nextTick(() => {
scrollTo(0);
calcActive();
})
" @resize.window.debounce="calcPageSize(); $nextTick(() => calcActive())" role="group" aria-roledescription="Carousel" aria-label="">
<div class="relative w-full overflow-x-hidden">
<div class="relative flex flex-nowrap gap-4 w-full overflow-auto js_slides snap" @scroll.debounce="calcActive" aria-label="Slides">
<div class="overflow-hidden h-full js_slide w-[150px] md:w-[177px] 2xl:w-[250px] 3xl:w-[321px] shrink-0">
<a href="#" class="relative group flex flex-col justify-between">
<div class="absolute z-10 top-4 left-4 bg-black text-white px-3 py-1 rounded-full text-body-sm font-semibold">
BEST SELLER
</div>
<div class="relative aspect-square bg-gray-100">
<img src="/img/product/img.png" alt="Nom du produit sur 2 lignes maximum sinon tronquée" class="w-full h-full object-cover aspect-[5/6]">
<div class="hidden md:flex absolute z-10 bottom-2.5 right-2.5">
<button type="button" aria-label="Ajouter au Panier" class=" btn btn-dark btn-solid btn-size-md btn-only-icon">
<svg class=" shrink-0" width="24" height="24" stroke="currentColor" stroke-width="1.5" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M13.0212 8.57397V4.82397C13.0212 3.09808 11.6221 1.69897 9.89624 1.69897C8.17035 1.69897 6.77124 3.09808 6.77124 4.82397V8.57397M10 10.0457V12.5457M10 12.5457V15.0457M10 12.5457H12.5M10 12.5457H7.5M16.2346 6.91333L17.2872 16.9133C17.3455 17.4669 16.9115 17.949 16.3549 17.949H3.4376C2.88101 17.949 2.44698 17.4669 2.50525 16.9133L3.55788 6.91333C3.60811 6.4362 4.01046 6.07397 4.49023 6.07397H15.3022C15.782 6.07397 16.1844 6.4362 16.2346 6.91333ZM7.08374 8.57397C7.08374 8.74656 6.94383 8.88647 6.77124 8.88647C6.59865 8.88647 6.45874 8.74656 6.45874 8.57397C6.45874 8.40139 6.59865 8.26147 6.77124 8.26147C6.94383 8.26147 7.08374 8.40139 7.08374 8.57397ZM13.3337 8.57397C13.3337 8.74656 13.1938 8.88647 13.0212 8.88647C12.8486 8.88647 12.7087 8.74656 12.7087 8.57397C12.7087 8.40139 12.8486 8.26147 13.0212 8.26147C13.1938 8.26147 13.3337 8.40139 13.3337 8.57397Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg>
</button>
</div>
</div>
<div class="flex flex-col justify-between">
<div class="flex flex-col justify-between gap-2 py-2">
<h3 class="text-body-base group-hover:text-brand-700 font-bold line-clamp-2">Nom du produit sur 2 lignes maximum sinon tronquée</h3>
<div class="flex items-center space-x-0.5">
<svg class="text-black shrink-0" width="12" height="12" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M11.4807 3.50102C11.6729 3.03905 12.3273 3.03905 12.5195 3.50102L14.6454 8.61248C14.7264 8.80724 14.9096 8.94031 15.1199 8.95716L20.6381 9.39956C21.1369 9.43954 21.3391 10.062 20.9591 10.3875L16.7548 13.9889C16.5946 14.1261 16.5246 14.3414 16.5736 14.5466L17.858 19.9315C17.9741 20.4182 17.4447 20.8028 17.0177 20.542L12.2933 17.6564C12.1133 17.5465 11.8869 17.5465 11.7069 17.6564L6.98251 20.542C6.55551 20.8028 6.02606 20.4182 6.14215 19.9315L7.42664 14.5466C7.47558 14.3414 7.40562 14.1261 7.24543 13.9889L3.04111 10.3875C2.66112 10.062 2.86335 9.43954 3.36209 9.39956L8.88034 8.95716C9.0906 8.94031 9.27375 8.80724 9.35476 8.61248L11.4807 3.50102Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg> <svg class="text-black shrink-0" width="12" height="12" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M11.4807 3.50102C11.6729 3.03905 12.3273 3.03905 12.5195 3.50102L14.6454 8.61248C14.7264 8.80724 14.9096 8.94031 15.1199 8.95716L20.6381 9.39956C21.1369 9.43954 21.3391 10.062 20.9591 10.3875L16.7548 13.9889C16.5946 14.1261 16.5246 14.3414 16.5736 14.5466L17.858 19.9315C17.9741 20.4182 17.4447 20.8028 17.0177 20.542L12.2933 17.6564C12.1133 17.5465 11.8869 17.5465 11.7069 17.6564L6.98251 20.542C6.55551 20.8028 6.02606 20.4182 6.14215 19.9315L7.42664 14.5466C7.47558 14.3414 7.40562 14.1261 7.24543 13.9889L3.04111 10.3875C2.66112 10.062 2.86335 9.43954 3.36209 9.39956L8.88034 8.95716C9.0906 8.94031 9.27375 8.80724 9.35476 8.61248L11.4807 3.50102Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg> <svg class="text-black shrink-0" width="12" height="12" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M11.4807 3.50102C11.6729 3.03905 12.3273 3.03905 12.5195 3.50102L14.6454 8.61248C14.7264 8.80724 14.9096 8.94031 15.1199 8.95716L20.6381 9.39956C21.1369 9.43954 21.3391 10.062 20.9591 10.3875L16.7548 13.9889C16.5946 14.1261 16.5246 14.3414 16.5736 14.5466L17.858 19.9315C17.9741 20.4182 17.4447 20.8028 17.0177 20.542L12.2933 17.6564C12.1133 17.5465 11.8869 17.5465 11.7069 17.6564L6.98251 20.542C6.55551 20.8028 6.02606 20.4182 6.14215 19.9315L7.42664 14.5466C7.47558 14.3414 7.40562 14.1261 7.24543 13.9889L3.04111 10.3875C2.66112 10.062 2.86335 9.43954 3.36209 9.39956L8.88034 8.95716C9.0906 8.94031 9.27375 8.80724 9.35476 8.61248L11.4807 3.50102Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg> <svg class="text-black shrink-0" width="12" height="12" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M11.4807 3.50102C11.6729 3.03905 12.3273 3.03905 12.5195 3.50102L14.6454 8.61248C14.7264 8.80724 14.9096 8.94031 15.1199 8.95716L20.6381 9.39956C21.1369 9.43954 21.3391 10.062 20.9591 10.3875L16.7548 13.9889C16.5946 14.1261 16.5246 14.3414 16.5736 14.5466L17.858 19.9315C17.9741 20.4182 17.4447 20.8028 17.0177 20.542L12.2933 17.6564C12.1133 17.5465 11.8869 17.5465 11.7069 17.6564L6.98251 20.542C6.55551 20.8028 6.02606 20.4182 6.14215 19.9315L7.42664 14.5466C7.47558 14.3414 7.40562 14.1261 7.24543 13.9889L3.04111 10.3875C2.66112 10.062 2.86335 9.43954 3.36209 9.39956L8.88034 8.95716C9.0906 8.94031 9.27375 8.80724 9.35476 8.61248L11.4807 3.50102Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg> <svg class="text-black shrink-0" width="12" height="12" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M11.4807 3.50102C11.6729 3.03905 12.3273 3.03905 12.5195 3.50102L14.6454 8.61248C14.7264 8.80724 14.9096 8.94031 15.1199 8.95716L20.6381 9.39956C21.1369 9.43954 21.3391 10.062 20.9591 10.3875L16.7548 13.9889C16.5946 14.1261 16.5246 14.3414 16.5736 14.5466L17.858 19.9315C17.9741 20.4182 17.4447 20.8028 17.0177 20.542L12.2933 17.6564C12.1133 17.5465 11.8869 17.5465 11.7069 17.6564L6.98251 20.542C6.55551 20.8028 6.02606 20.4182 6.14215 19.9315L7.42664 14.5466C7.47558 14.3414 7.40562 14.1261 7.24543 13.9889L3.04111 10.3875C2.66112 10.062 2.86335 9.43954 3.36209 9.39956L8.88034 8.95716C9.0906 8.94031 9.27375 8.80724 9.35476 8.61248L11.4807 3.50102Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg> <span class="text-body-sm">0 | 0 avis</span>
</div>
<div class="h6">14,90€</div>
</div>
</div>
</a>
</div>
<div class="overflow-hidden h-full js_slide w-[150px] md:w-[177px] 2xl:w-[250px] 3xl:w-[321px] shrink-0">
<a href="#" class="relative group flex flex-col justify-between">
<div class="absolute z-10 top-4 left-4 bg-black text-white px-3 py-1 rounded-full text-body-sm font-semibold">
BEST SELLER
</div>
<div class="relative aspect-square bg-gray-100">
<img src="/img/product/img.png" alt="Nom du produit sur 2 lignes maximum sinon tronquée" class="w-full h-full object-cover aspect-[5/6]">
<div class="hidden md:flex absolute z-10 bottom-2.5 right-2.5">
<button type="button" aria-label="Ajouter au Panier" class=" btn btn-dark btn-solid btn-size-md btn-only-icon">
<svg class=" shrink-0" width="24" height="24" stroke="currentColor" stroke-width="1.5" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M13.0212 8.57397V4.82397C13.0212 3.09808 11.6221 1.69897 9.89624 1.69897C8.17035 1.69897 6.77124 3.09808 6.77124 4.82397V8.57397M10 10.0457V12.5457M10 12.5457V15.0457M10 12.5457H12.5M10 12.5457H7.5M16.2346 6.91333L17.2872 16.9133C17.3455 17.4669 16.9115 17.949 16.3549 17.949H3.4376C2.88101 17.949 2.44698 17.4669 2.50525 16.9133L3.55788 6.91333C3.60811 6.4362 4.01046 6.07397 4.49023 6.07397H15.3022C15.782 6.07397 16.1844 6.4362 16.2346 6.91333ZM7.08374 8.57397C7.08374 8.74656 6.94383 8.88647 6.77124 8.88647C6.59865 8.88647 6.45874 8.74656 6.45874 8.57397C6.45874 8.40139 6.59865 8.26147 6.77124 8.26147C6.94383 8.26147 7.08374 8.40139 7.08374 8.57397ZM13.3337 8.57397C13.3337 8.74656 13.1938 8.88647 13.0212 8.88647C12.8486 8.88647 12.7087 8.74656 12.7087 8.57397C12.7087 8.40139 12.8486 8.26147 13.0212 8.26147C13.1938 8.26147 13.3337 8.40139 13.3337 8.57397Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg>
</button>
</div>
</div>
<div class="flex flex-col justify-between">
<div class="flex flex-col justify-between gap-2 py-2">
<h3 class="text-body-base group-hover:text-brand-700 font-bold line-clamp-2">Nom du produit sur 2 lignes maximum sinon tronquée</h3>
<div class="flex items-center space-x-0.5">
<svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <span class="text-body-sm">5 | 2 avis</span>
</div>
<div class="h6">16,90€</div>
</div>
</div>
</a>
</div>
<div class="overflow-hidden h-full js_slide w-[150px] md:w-[177px] 2xl:w-[250px] 3xl:w-[321px] shrink-0">
<a href="#" class="relative group flex flex-col justify-between">
<div class="absolute z-10 top-4 left-4 bg-black text-white px-3 py-1 rounded-full text-body-sm font-semibold">
BEST SELLER
</div>
<div class="relative aspect-square bg-gray-100">
<img src="/img/product/img.png" alt="Nom du produit sur 2 lignes maximum sinon tronquée" class="w-full h-full object-cover aspect-[5/6]">
<div class="hidden md:flex absolute z-10 bottom-2.5 right-2.5">
<button type="button" aria-label="Ajouter au Panier" class=" btn btn-dark btn-solid btn-size-md btn-only-icon">
<svg class=" shrink-0" width="24" height="24" stroke="currentColor" stroke-width="1.5" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M13.0212 8.57397V4.82397C13.0212 3.09808 11.6221 1.69897 9.89624 1.69897C8.17035 1.69897 6.77124 3.09808 6.77124 4.82397V8.57397M10 10.0457V12.5457M10 12.5457V15.0457M10 12.5457H12.5M10 12.5457H7.5M16.2346 6.91333L17.2872 16.9133C17.3455 17.4669 16.9115 17.949 16.3549 17.949H3.4376C2.88101 17.949 2.44698 17.4669 2.50525 16.9133L3.55788 6.91333C3.60811 6.4362 4.01046 6.07397 4.49023 6.07397H15.3022C15.782 6.07397 16.1844 6.4362 16.2346 6.91333ZM7.08374 8.57397C7.08374 8.74656 6.94383 8.88647 6.77124 8.88647C6.59865 8.88647 6.45874 8.74656 6.45874 8.57397C6.45874 8.40139 6.59865 8.26147 6.77124 8.26147C6.94383 8.26147 7.08374 8.40139 7.08374 8.57397ZM13.3337 8.57397C13.3337 8.74656 13.1938 8.88647 13.0212 8.88647C12.8486 8.88647 12.7087 8.74656 12.7087 8.57397C12.7087 8.40139 12.8486 8.26147 13.0212 8.26147C13.1938 8.26147 13.3337 8.40139 13.3337 8.57397Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg>
</button>
</div>
</div>
<div class="flex flex-col justify-between">
<div class="flex flex-col justify-between gap-2 py-2">
<h3 class="text-body-base group-hover:text-brand-700 font-bold line-clamp-2">Nom du produit sur 2 lignes maximum sinon tronquée</h3>
<div class="flex items-center space-x-0.5">
<svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7881 3.213C11.2364 2.13505 12.7635 2.13505 13.2118 3.213L15.2938 8.21871L20.6979 8.65196C21.8616 8.74525 22.3335 10.1975 21.4469 10.957L17.3295 14.484L18.5874 19.7575C18.8583 20.8931 17.6229 21.7906 16.6266 21.1821L11.9999 18.3561L7.37329 21.1821C6.37697 21.7906 5.14158 20.8931 5.41246 19.7575L6.67038 14.484L2.55303 10.957C1.66639 10.1975 2.13826 8.74525 3.302 8.65196L8.70609 8.21871L10.7881 3.213Z" fill="currentColor" />
</svg> <svg class="text-black shrink-0" width="12" height="12" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M11.4807 3.50102C11.6729 3.03905 12.3273 3.03905 12.5195 3.50102L14.6454 8.61248C14.7264 8.80724 14.9096 8.94031 15.1199 8.95716L20.6381 9.39956C21.1369 9.43954 21.3391 10.062 20.9591 10.3875L16.7548 13.9889C16.5946 14.1261 16.5246 14.3414 16.5736 14.5466L17.858 19.9315C17.9741 20.4182 17.4447 20.8028 17.0177 20.542L12.2933 17.6564C12.1133 17.5465 11.8869 17.5465 11.7069 17.6564L6.98251 20.542C6.55551 20.8028 6.02606 20.4182 6.14215 19.9315L7.42664 14.5466C7.47558 14.3414 7.40562 14.1261 7.24543 13.9889L3.04111 10.3875C2.66112 10.062 2.86335 9.43954 3.36209 9.39956L8.88034 8.95716C9.0906 8.94031 9.27375 8.80724 9.35476 8.61248L11.4807 3.50102Z" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg> <span class="text-body-sm">4.7 | 39 avis</span>
</div>
<div class="h6">14,90€</div>
</div>
</div>
</a>
</div>
<div x-bind:class="{
'js_dummy_slide w-full': pageFillers > 0
}"></div>
</div>
</div>
<div :class="{hidden: itemCount / pageSize <= 1}" class="md:hidden relative w-full min-h-14">
<div class="absolute left-1/2 transform -translate-x-1/2 h-full flex justify-center items-center max-md:adjusted-marg-x-xs">
<div class="flex items-center ">
<div role="tablist" aria-label="Navigation du slider" class="flex flex-wrap justify-center gap-3">
<template x-for="(index, i) in Math.ceil(itemCount / pageSize)" :key="i">
<button class="shrink-0 block h-1 bg-black rounded-full shadow cursor-pointer transition-all duration-300 ease-in-out" role="tab" :id="'tab-' + (index-1)" :aria-controls="'slide-' + (index-1)" :aria-selected="Math.floor(active/pageSize) === index-1" :tabindex="Math.floor(active/pageSize) === index-1 ? 0 : -1" :class="{
'bg-opacity-100 w-22': Math.floor(active/pageSize) === index-1,
'bg-opacity-40 w-6': Math.floor(active/pageSize) !== index-1
}" @click="scrollTo((index-1)*pageSize);">
<span class="sr-only" x-text="'Aller au groupe de slides ' + index"></span>
</button>
</template>
</div>
</div>
</div>
<div class="flex justify-end py-3">
<div class="flex flex-row gap-4">
<button type="button" :class="{ 'opacity-25 pointer-events-none' : active === 0 }" @click="scrollPrevious" :disabled="active === 0" aria-label="Voir le slide précédent" class=" btn btn-dark btn-subtle btn-border btn-size-sm btn-only-icon">
<svg class=" shrink-0" width="24" height="24" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M10.5 19.5L3 12M3 12L10.5 4.5M3 12H21" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg>
</button>
<button type="button" :class="{ 'opacity-25 pointer-events-none' : active >= itemCount - pageSize }" @click="scrollNext" :disabled="active >= itemCount - pageSize" aria-label="Voir le slide suivant" class=" btn btn-dark btn-subtle btn-border btn-size-sm btn-only-icon">
<svg class=" shrink-0" width="24" height="24" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3" stroke="currentColor" stroke-width="1.5" fill="none" />
</svg>
</button>
</div>
</div>
</div>
</div>
</section>
<script>
'use strict';
function initSlider() {
return {
active: 0,
itemCount: 0,
getSlider() {
return this.$root.querySelector('.js_slides');
},
pageSize: 4,
pageFillers: 0,
calcPageSize() {
const slider = this.getSlider();
if (slider) {
this.itemCount = slider.querySelectorAll('.js_slide').length;
this.pageSize = Math.round(slider.clientWidth / slider.querySelector('.js_slide').clientWidth);
this.pageFillers = (
this.pageSize * Math.ceil(this.itemCount / this.pageSize)
) - this.itemCount;
}
},
calcActive() {
const slider = this.getSlider();
if (slider) {
const sliderItems = this.itemCount + this.pageFillers;
const calculatedActiveSlide = slider.scrollLeft / (slider.scrollWidth / sliderItems);
this.active = Math.round(calculatedActiveSlide / this.pageSize) * this.pageSize;
}
},
scrollPrevious() {
this.scrollTo(this.active - this.pageSize);
},
scrollNext() {
this.scrollTo(this.active + this.pageSize);
},
scrollTo(idx) {
const slider = this.getSlider();
if (slider) {
const slideWidth = slider.scrollWidth / (this.itemCount + this.pageFillers);
slider.scrollLeft = Math.floor(slideWidth) * idx;
this.active = idx;
}
},
}
}
</script>
<section class="flex flex-col gap-3 adjusted-marg-y-sm">
<div class="flex flex-row justify-between items-center">
<h2 class="h4">Mentionnés dans l'article</h2>
</div>
<div class="relative flex flex-col gap-3"
x-data="initSlider"
x-init="
calcPageSize();
$nextTick(() => {
scrollTo(0);
calcActive();
})
"
@resize.window.debounce="calcPageSize(); $nextTick(() => calcActive())"
role="group"
aria-roledescription="Carousel"
aria-label="{{ title }}"
>
<div class="relative w-full overflow-x-hidden">
<div class="relative flex flex-nowrap gap-4 w-full overflow-auto js_slides snap"
@scroll.debounce="calcActive"
aria-label="Slides"
>
{% for product in products %}
{% render '@product_card--v2' with {
productClass: 'js_slide w-[150px] md:w-[177px] 2xl:w-[250px] 3xl:w-[321px] shrink-0'
}|merge(product) %}
{% endfor %}
{% for i in 0..(maxVisibleSlides - 1) %}
<div x-bind:class="{
'js_dummy_slide w-full': pageFillers > {{ i }}
}"></div>
{% endfor %}
</div>
</div>
{% if products|length > 1 %}
<div :class="{hidden: itemCount / pageSize <= 1}" class="md:hidden relative w-full min-h-14">
<div class="absolute left-1/2 transform -translate-x-1/2 h-full flex justify-center items-center max-md:adjusted-marg-x-xs">
{% render "@slider-pagination" %}
</div>
<div class="flex justify-end py-3">
<div class="flex flex-row gap-4">
{% render "@template-button" with {
color: 'dark',
type: 'subtle',
icon_type: "only-icon",
size: 'sm',
border: true,
label: 'Voir le slide précédent',
icon: {
name: "heroicons--arrow-left-outline",
},
button_attribute: (":class=\"{ 'opacity-25 pointer-events-none' : active === 0 }\" @click=\"scrollPrevious\" :disabled=\"active === 0\"")|replace({'\"': '"'})
} %}
{% render "@template-button" with {
color: 'dark',
type: 'subtle',
icon_type: "only-icon",
size: 'sm',
border: true,
label: 'Voir le slide suivant',
icon: {
name: "heroicons--arrow-right-outline",
},
button_attribute: (":class=\"{ 'opacity-25 pointer-events-none' : active >= itemCount - pageSize }\" @click=\"scrollNext\" :disabled=\"active >= itemCount - pageSize\"")|replace({'\"': '"'})
} %}
</div>
</div>
</div>
{% endif %}
</div>
</section>
<script>
'use strict';
function initSlider() {
return {
active: 0,
itemCount: 0,
getSlider() {
return this.$root.querySelector('.js_slides');
},
pageSize: 4,
pageFillers: 0,
calcPageSize() {
const slider = this.getSlider();
if (slider) {
this.itemCount = slider.querySelectorAll('.js_slide').length;
this.pageSize = Math.round(slider.clientWidth / slider.querySelector('.js_slide').clientWidth);
this.pageFillers = (
this.pageSize * Math.ceil(this.itemCount / this.pageSize)
) - this.itemCount;
}
},
calcActive() {
const slider = this.getSlider();
if (slider) {
const sliderItems = this.itemCount + this.pageFillers;
const calculatedActiveSlide = slider.scrollLeft / (slider.scrollWidth / sliderItems);
this.active = Math.round(calculatedActiveSlide / this.pageSize) * this.pageSize;
}
},
scrollPrevious() {
this.scrollTo(this.active - this.pageSize);
},
scrollNext() {
this.scrollTo(this.active + this.pageSize);
},
scrollTo(idx) {
const slider = this.getSlider();
if (slider) {
const slideWidth = slider.scrollWidth / (this.itemCount + this.pageFillers);
slider.scrollLeft = Math.floor(slideWidth) * idx;
this.active = idx;
}
},
}
}
</script>
{
"includePushCard": false,
"products": [
{
"name": "LE LAIT DEMAQUILLANT",
"description": "Nettoie - Apaise",
"price": 14.9,
"rating": 0,
"reviewCount": 0,
"stock": false,
"imageSrc": "/img/product/img.png",
"isBestSeller": true,
"buttonText": "Ajouter au panier"
},
{
"name": "LE MASQUE PURIFIANT",
"description": "Peau normale à grasse",
"volume": "50ml",
"price": 16.9,
"rating": 5,
"reviewCount": 2,
"imageSrc": "/img/product/img.png",
"isBestSeller": true,
"buttonText": "Ajouter au panier "
},
{
"name": "Gel nettoyant purifiant",
"description": "Peau normale à grasse",
"volume": "200ml",
"price": 14.9,
"rating": 4.7,
"reviewCount": 39,
"imageSrc": "/img/product/img.png",
"isBestSeller": true,
"buttonText": "Ajouter au panier "
}
]
}
No notes defined.