parent
aa44dd8117
commit
d5fee8eb76
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 551 KiB |
After Width: | Height: | Size: 828 B |
@ -0,0 +1 @@ |
||||
import './sliders.js'; |
@ -0,0 +1,47 @@ |
||||
let factsSwiper = null; |
||||
|
||||
let init = false; |
||||
|
||||
function swiperMode() { |
||||
let mobile = window.matchMedia('(min-width: 0px) and (max-width: 992px)'); |
||||
|
||||
if (mobile.matches) { |
||||
if (!init) { |
||||
init = true; |
||||
factsSwiper = new Swiper('.facts .swiper', { |
||||
loop: true, |
||||
slidesPerView: 1, |
||||
spaceBetween: 35, |
||||
breakpoints: { |
||||
320: { |
||||
slidesPerView: 1.2, |
||||
}, |
||||
480: { |
||||
slidesPerView: 1.4, |
||||
}, |
||||
576: { |
||||
slidesPerView: 2, |
||||
}, |
||||
700: { |
||||
slidesPerView: 2.4, |
||||
}, |
||||
}, |
||||
navigation: { |
||||
nextEl: '.facts .button--next', |
||||
prevEl: '.facts .button--prev', |
||||
}, |
||||
}); |
||||
} |
||||
} else { |
||||
if (factsSwiper !== null) factsSwiper.destroy(); |
||||
init = false; |
||||
} |
||||
} |
||||
|
||||
window.addEventListener('load', function () { |
||||
swiperMode(); |
||||
}); |
||||
|
||||
window.addEventListener('resize', function () { |
||||
swiperMode(); |
||||
}); |
File diff suppressed because one or more lines are too long
@ -0,0 +1,156 @@ |
||||
.facts { |
||||
margin: 116px 0 100px; |
||||
|
||||
@include tablet { |
||||
margin: 90px 0 77px; |
||||
} |
||||
|
||||
& .container { |
||||
position: relative; |
||||
} |
||||
|
||||
&__title { |
||||
max-width: 702px; |
||||
margin: 21px auto 27px; |
||||
} |
||||
|
||||
&__figure { |
||||
position: absolute; |
||||
top: 664px; |
||||
right: 15px; |
||||
left: 15px; |
||||
border-radius: 80px 12px; |
||||
overflow: hidden; |
||||
|
||||
@include desktop { |
||||
position: static; |
||||
margin: 0 0 33px; |
||||
border-radius: 35px 10px; |
||||
} |
||||
|
||||
&-image { |
||||
display: block; |
||||
max-height: 546px; |
||||
max-width: none; |
||||
width: 100%; |
||||
height: auto; |
||||
object-fit: cover; |
||||
} |
||||
} |
||||
|
||||
&__slider { |
||||
& .swiper { |
||||
overflow: visible; |
||||
|
||||
@include laptop { |
||||
overflow: hidden; |
||||
} |
||||
|
||||
&-wrapper { |
||||
position: static; |
||||
flex-wrap: wrap; |
||||
|
||||
@media screen and (min-width: 992.1px) { |
||||
gap: 36px 42px; |
||||
} |
||||
|
||||
@include laptop { |
||||
position: relative; |
||||
flex-wrap: nowrap; |
||||
} |
||||
} |
||||
|
||||
&-slide { |
||||
position: static; |
||||
height: auto; |
||||
|
||||
@media screen and (min-width: 992.1px) { |
||||
flex: 0 0 calc(100% / 3 - 42px / 3 * 2); |
||||
} |
||||
|
||||
@include laptop { |
||||
position: relative; |
||||
} |
||||
|
||||
&:nth-child(-n + 3) { |
||||
margin-bottom: 590px; |
||||
|
||||
@include desktop { |
||||
margin: 0; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
&__slide { |
||||
height: 100%; |
||||
padding: 24px 36px 34px; |
||||
box-sizing: border-box; |
||||
border-radius: 22px 40px; |
||||
background-color: $white; |
||||
|
||||
@include desktop { |
||||
padding: 24px 20px 36px; |
||||
} |
||||
|
||||
@include laptop { |
||||
padding: 24px 14px 36px; |
||||
} |
||||
|
||||
&-count { |
||||
margin: 0 0 6px; |
||||
font-weight: 700; |
||||
font-size: 59px; |
||||
line-height: 127%; |
||||
letter-spacing: 0.05em; |
||||
color: $white; |
||||
-webkit-text-stroke: 1px $blue; |
||||
|
||||
@include laptop { |
||||
text-align: center; |
||||
} |
||||
|
||||
@include mobile { |
||||
font-size: 50px; |
||||
} |
||||
} |
||||
|
||||
&-title { |
||||
margin: 0 0 9px; |
||||
|
||||
@include laptop { |
||||
text-align: center; |
||||
} |
||||
} |
||||
|
||||
&-text { |
||||
margin: 0; |
||||
font-weight: 400; |
||||
font-size: 17px; |
||||
line-height: 146%; |
||||
color: $grey; |
||||
|
||||
& > b { |
||||
font-weight: 600; |
||||
} |
||||
|
||||
@include laptop { |
||||
font-size: 15px; |
||||
text-align: center; |
||||
} |
||||
} |
||||
} |
||||
|
||||
&__slider-controls { |
||||
display: none; |
||||
justify-content: center; |
||||
align-items: center; |
||||
gap: 24px; |
||||
margin: 35px 0 0 ; |
||||
|
||||
@include laptop { |
||||
display: flex; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue