Initial commit
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
const buildSwiper = new Swiper('.ux-build-swiper', {
|
||||
slidesPerView: 'auto',
|
||||
centeredSlides: true,
|
||||
loop: true,
|
||||
spaceBetween: 30,
|
||||
speed: 800,
|
||||
|
||||
autoplay: {
|
||||
delay: 2500,
|
||||
disableOnInteraction: false,
|
||||
pauseOnMouseEnter: true,
|
||||
},
|
||||
|
||||
navigation: {
|
||||
nextEl: '.build-next',
|
||||
prevEl: '.build-prev',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
// Counter Animation
|
||||
const counters = document.querySelectorAll('.ux-counter');
|
||||
|
||||
counters.forEach(counter => {
|
||||
const update = () => {
|
||||
const target = +counter.getAttribute('data-count');
|
||||
const count = +counter.innerText;
|
||||
|
||||
const inc = target / 50;
|
||||
|
||||
if (count < target) {
|
||||
counter.innerText = Math.ceil(count + inc);
|
||||
setTimeout(update, 30);
|
||||
} else {
|
||||
counter.innerText = target + '+';
|
||||
}
|
||||
};
|
||||
|
||||
update();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
const workSwiper = new Swiper('.ux-work-swiper', {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 25,
|
||||
loop: true,
|
||||
loopAdditionalSlides: 3, // 👈 important
|
||||
speed: 4000,
|
||||
|
||||
autoplay: {
|
||||
delay: 0,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
|
||||
navigation: {
|
||||
nextEl: '.work-next',
|
||||
prevEl: '.work-prev',
|
||||
},
|
||||
|
||||
breakpoints: {
|
||||
0: { slidesPerView: 1.2 },
|
||||
576: { slidesPerView: 2 },
|
||||
768: { slidesPerView: 3 },
|
||||
1200: { slidesPerView: 3 }
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user