slider fix

This commit is contained in:
DmitriyB
2022-09-30 15:34:08 +05:00
parent 1a76cfb939
commit 7138580aef
4 changed files with 32 additions and 14 deletions
BIN
View File
Binary file not shown.
@@ -206,8 +206,7 @@
}
.title__caption {
font-size: 3.1vw;
width: 80%;
font-size: 4vw;
}
.animation-container {
@@ -216,13 +215,13 @@
background-repeat: no-repeat;
padding: 10px;
background-repeat: no-repeat;
background-position: 1px 159px;
background-position: 1px 180px;
background-size: contain;
}
.title {
font-weight: 300;
font-size: 15vw;
font-size: 17.9vw;
line-height: 80%;
}
+20 -4
View File
@@ -1,5 +1,3 @@
.image__slider {
width: 100%;
height: 100%;
@@ -29,7 +27,6 @@
flex-direction: row;
justify-content: space-between;
gap: 304px
}
.slider__info {
@@ -114,6 +111,7 @@
.container1 {
font-size: 17px;
}
.pagination__container {
grid-template-columns: 145px auto;
@@ -125,6 +123,7 @@
display: block;
}
.button__container {
margin-left: 29px;
margin-right: 29px;
@@ -135,12 +134,22 @@
gap: 0;
}
.swiper-wrapper {}
.swiper-wrapper_image {
padding-left: 20px;
box-sizing: border-box;
}
}
@media screen and (max-width: 639px) {
.button__container {
gap: 0;
@@ -152,5 +161,12 @@
}
.swiper-wrapper_image {
padding-left: 10px;
box-sizing: border-box;
}
}
+9 -6
View File
@@ -51,19 +51,22 @@ export default function SwiperCentred(props: propsTypes) {
} else if (size.width > 640) {
return { width: "536px", height: "428px" };
} else {
return { width: "290px", height: "232px" };
return { width: "290px", height: "232px" };
}
}
const swiperWrapper = document.querySelector('.swiper-wrapper')?.classList.add('swiper-wrapper_image')
return (
<>
<Swiper
rewind={true}
centeredSlides={true}
spaceBetween={20}
centeredSlides={size.width > 1024 ? true : false}
spaceBetween={size.width > 640 ? 20 : 10}
initialSlide={1}
slidesPerView={"auto"}
slidesPerView={'auto'}
loop={true}
loopedSlides={3}
onSlideChangeTransitionEnd={updateCaption}
modules={[Navigation, Pagination]}
navigation={{