From ae087de19fc930995b350a4587e7341e70fbfb09 Mon Sep 17 00:00:00 2001 From: Kirill Pet Date: Sat, 21 Dec 2024 16:18:59 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D1=83?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20swiper?= =?UTF-8?q?-reviews-img?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/main.js | 29 ++++++++------- index.html | 92 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 105 insertions(+), 16 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index 8ffba6c..0957456 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -40,19 +40,24 @@ const reviewsSwiper = new Swiper('.reviews-swiper', { } }) -let reviewsSwiperImg = new Swiper(".swiper-reviews-img", { - autoplay: { - delay: 2500, - disableOnInteraction: false, - }, - pagination: { - el: ".swiper-pagination", - clickable: true, - renderBullet: function (index, className) { - return '' + ""; +let swiperReviews = document.querySelectorAll('.swiper-reviews-img'); +let reviewsSwiperImgs = {}; +swiperReviews.forEach((review, index) => { + let newClass = `swiper-reviews-img-${index}`; + review.classList.add(newClass); + + reviewsSwiperImgs[index] = new Swiper(`.${newClass}`, { + pagination: { + el: ".swiper-pagination", + clickable: true, + renderBullet: function (index, className) { + return '' + ""; + }, }, - }, -}); + }); +}) + + const projectsSwiper = new Swiper('.projects-swiper', { direction: 'horizontal', diff --git a/index.html b/index.html index 0dde58a..f0ef5da 100644 --- a/index.html +++ b/index.html @@ -837,7 +837,28 @@ - +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
@@ -866,7 +887,28 @@
- +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
@@ -895,7 +937,28 @@
- +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
@@ -924,7 +987,28 @@
- +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+