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;