style gallery

This commit is contained in:
Julie Blanc 2025-12-19 19:35:22 +01:00
parent 57037fc435
commit 14438b642b
12 changed files with 388 additions and 333 deletions

View file

@ -0,0 +1,31 @@
// Initialize Swiper for product gallery
document.addEventListener('DOMContentLoaded', function() {
const productGallery = document.querySelector('.product-gallery.swiper');
if (productGallery) {
const swiper = new Swiper('.product-gallery.swiper', {
// Enable loop if there are multiple slides
loop: true,
// Let CSS control the width
slidesPerView: 'auto',
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// Pagination dots
pagination: {
el: '.swiper-pagination',
clickable: true,
},
// Keyboard navigation
keyboard: {
enabled: true,
}
});
}
});