From 48fccdc5e49cc323d52e7a4f7de14942da280aca Mon Sep 17 00:00:00 2001 From: maksim Date: Wed, 9 Jul 2025 02:08:43 +0300 Subject: [PATCH] =?UTF-8?q?Fix=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82?= =?UTF-8?q?=D0=B0=20=D1=81=D0=BB=D0=B0=D0=B9=D0=B4=D0=B5=D1=80=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BE=D0=B9=20=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/cosmopet/static/js/new-front-page.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/wp-content/themes/cosmopet/static/js/new-front-page.js b/wp-content/themes/cosmopet/static/js/new-front-page.js index 2ce80cf..ac80fc2 100644 --- a/wp-content/themes/cosmopet/static/js/new-front-page.js +++ b/wp-content/themes/cosmopet/static/js/new-front-page.js @@ -257,7 +257,7 @@ document.addEventListener('DOMContentLoaded', function() { // Gallery slider - const mosaicSwiper = new Swiper('.mosaic-swiper', { + const mosaicswiper = new Swiper('.mosaic-swiper', { slidesPerView: 'auto', spaceBetween: 20, freeMode: true, @@ -265,21 +265,6 @@ document.addEventListener('DOMContentLoaded', function() { loop: true // Включает бесконечную прокрутку }); - let scrollPosition = 0; - const speed = 0.2; // Очень медленная скорость в пикселях за кадр - - function animate() { - scrollPosition -= speed; - swiper.wrapperEl.style.transform = `translateX(${scrollPosition}px)`; - // Корректировка для бесконечной прокрутки (простая имитация) - if (Math.abs(scrollPosition) > swiper.wrapperEl.scrollWidth / 2) { - scrollPosition = 0; // Сброс позиции для имитации бесконечности - } - requestAnimationFrame(animate); - } - - animate(); - // Quiz const truthContents = document.querySelectorAll('.truth_content'); let currentIndex = 0;