From 73aa52d74805a743df10a843ee0ba21f845f87e4 Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Fri, 10 Nov 2023 00:40:47 +0300 Subject: [PATCH] Fixed swiper style --- src/components/Feed/ArticleCard/ArticleCard.module.scss | 8 +++----- src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx | 4 ++-- src/components/_shared/SolidSwiper/Swiper.module.scss | 8 +++----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/components/Feed/ArticleCard/ArticleCard.module.scss b/src/components/Feed/ArticleCard/ArticleCard.module.scss index 066b33a7..2974f97d 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.module.scss +++ b/src/components/Feed/ArticleCard/ArticleCard.module.scss @@ -412,6 +412,8 @@ } swiper-slide & { + margin-bottom: 0; + @include media-breakpoint-down(lg) { aspect-ratio: 1/1; } @@ -422,12 +424,8 @@ @include media-breakpoint-down(sm) { aspect-ratio: 1/1; - } - } - &.swiper-slide { - .shoutCardContent { - @include media-breakpoint-down(md) { + .shoutCardContent { padding-left: 10%; } } diff --git a/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx b/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx index c0b839a8..08df1bdb 100644 --- a/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx +++ b/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx @@ -40,9 +40,9 @@ export const ArticleCardSwiper = (props: Props) => { thumbs-swiper={'.thumbSwiper'} observer={true} onSlideChange={handleSlideChange} - space-between={26} + space-between={20} breakpoints={{ - 576: { spaceBetween: 20, slidesPerView: 1 }, + 576: { spaceBetween: 20, slidesPerView: 1.5 }, 992: { spaceBetween: 52, slidesPerView: 1.5 } }} loop={true} diff --git a/src/components/_shared/SolidSwiper/Swiper.module.scss b/src/components/_shared/SolidSwiper/Swiper.module.scss index d0fbc249..9229ec5e 100644 --- a/src/components/_shared/SolidSwiper/Swiper.module.scss +++ b/src/components/_shared/SolidSwiper/Swiper.module.scss @@ -39,7 +39,6 @@ .container { margin: auto; - // max-width: 800px; position: relative; padding: 24px 0; @@ -127,10 +126,9 @@ position: relative; box-sizing: border-box; overflow: hidden; - width: calc(100% - 130px); - @media only screen and (max-width: 576px) { - width: 100%; + @include media-breakpoint-up(sm) { + //width: calc(100% - 130px); } .counter { @@ -173,7 +171,7 @@ align-items: center; cursor: pointer; height: 100%; - width: 12.5%; + width: 10%; z-index: 2; &.disabled {