|
|
@ -13,8 +13,6 @@ const gymSwiper = new Swiper('.gym-swiper', { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const reviewsSwiper = new Swiper('.reviews-swiper', { |
|
|
|
const reviewsSwiper = new Swiper('.reviews-swiper', { |
|
|
|
spaceBetween: 24, |
|
|
|
spaceBetween: 24, |
|
|
|
// If we need pagination
|
|
|
|
// If we need pagination
|
|
|
@ -42,7 +40,6 @@ const reviewsSwiper = new Swiper('.reviews-swiper', { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const projectsSwiper = new Swiper('.projects-swiper', { |
|
|
|
const projectsSwiper = new Swiper('.projects-swiper', { |
|
|
|
direction: 'horizontal', |
|
|
|
direction: 'horizontal', |
|
|
|
breakpoints: { |
|
|
|
breakpoints: { |
|
|
@ -79,11 +76,14 @@ itemButtons.forEach((button) => { |
|
|
|
|
|
|
|
|
|
|
|
button.onclick = function name(params, index) { |
|
|
|
button.onclick = function name(params, index) { |
|
|
|
|
|
|
|
|
|
|
|
let activeContent = document.querySelector('.how__content').querySelector('.active'), |
|
|
|
let activeContent = document.querySelector('.how-content__item-block.active'), |
|
|
|
activeButton = document.querySelector('.how__control').querySelector('.active'); |
|
|
|
activeButton = document.querySelector('.how-control__item.active'); |
|
|
|
|
|
|
|
|
|
|
|
if (activeContent.dataset.num == button.dataset.num) return; |
|
|
|
if (activeContent.dataset.num == button.dataset.num) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activeContent.style.height = `${activeContent.offsetHeight}px`; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
activeContent.style.height = '0px'; |
|
|
|
activeContent.style.height = '0px'; |
|
|
|
activeContent.classList.remove('active'); |
|
|
|
activeContent.classList.remove('active'); |
|
|
|
activeButton.classList.remove('active'); |
|
|
|
activeButton.classList.remove('active'); |
|
|
@ -97,9 +97,22 @@ itemButtons.forEach((button) => { |
|
|
|
newActive.style.height = newHeight; |
|
|
|
newActive.style.height = newHeight; |
|
|
|
newActive.classList.add('active'); |
|
|
|
newActive.classList.add('active'); |
|
|
|
newButton.classList.add('active'); |
|
|
|
newButton.classList.add('active'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
newActive.style.height = 'auto'; |
|
|
|
}, 300); |
|
|
|
}, 300); |
|
|
|
|
|
|
|
}, 300); |
|
|
|
|
|
|
|
}, 0); |
|
|
|
}
|
|
|
|
}
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let screenWidth = window.screen.width; |
|
|
|
|
|
|
|
if (screenWidth <= 992) { |
|
|
|
|
|
|
|
howPhone(); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
howPc(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function howPc() { |
|
|
|
function howPc() { |
|
|
|
if (document.querySelector('.how__content').querySelector('.how-content__item-block')) { |
|
|
|
if (document.querySelector('.how__content').querySelector('.how-content__item-block')) { |
|
|
|
return; |
|
|
|
return; |
|
|
@ -113,6 +126,7 @@ function howPc() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
function howPhone() { |
|
|
|
function howPhone() { |
|
|
|
|
|
|
|
|
|
|
|
if (!document.querySelector('.how__content').querySelector('.how-content__item-block')) {
|
|
|
|
if (!document.querySelector('.how__content').querySelector('.how-content__item-block')) {
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -126,7 +140,7 @@ function howPhone() { |
|
|
|
button.after(block); |
|
|
|
button.after(block); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// how end
|
|
|
|
|
|
|
|
|
|
|
|
// resize
|
|
|
|
// resize
|
|
|
|
window.addEventListener('resize', () => { |
|
|
|
window.addEventListener('resize', () => { |
|
|
|