Change slides per view (#303)
This commit is contained in:
parent
f2b709e3f9
commit
3a1e82d522
|
@ -10,7 +10,6 @@ import { ArticleCard } from '../../Feed/ArticleCard'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
slides: Shout[]
|
slides: Shout[]
|
||||||
slidesPerView?: number
|
|
||||||
title?: string
|
title?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,11 +40,10 @@ export const ArticleCardSwiper = (props: Props) => {
|
||||||
thumbs-swiper={'.thumbSwiper'}
|
thumbs-swiper={'.thumbSwiper'}
|
||||||
observer={true}
|
observer={true}
|
||||||
onSlideChange={handleSlideChange}
|
onSlideChange={handleSlideChange}
|
||||||
slides-per-view={1}
|
|
||||||
space-between={26}
|
space-between={26}
|
||||||
breakpoints={{
|
breakpoints={{
|
||||||
576: { slidesPerView: props.slidesPerView ?? 1.5 },
|
576: { spaceBetween: 20, slidesPerView: 1 },
|
||||||
992: { spaceBetween: 52 }
|
992: { spaceBetween: 52, slidesPerView: 1.5 }
|
||||||
}}
|
}}
|
||||||
loop={true}
|
loop={true}
|
||||||
speed={800}
|
speed={800}
|
||||||
|
@ -89,9 +87,9 @@ export const ArticleCardSwiper = (props: Props) => {
|
||||||
>
|
>
|
||||||
<Icon name="swiper-r-arr" class={styles.icon} />
|
<Icon name="swiper-r-arr" class={styles.icon} />
|
||||||
</div>
|
</div>
|
||||||
<div class={styles.counter}>
|
{/*<div class={styles.counter}>*/}
|
||||||
{slideIndex() + 1} / {props.slides.length}
|
{/* {slideIndex() + 1} / {props.slides.length}*/}
|
||||||
</div>
|
{/*</div>*/}
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -129,8 +129,9 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: calc(100% - 130px);
|
width: calc(100% - 130px);
|
||||||
|
|
||||||
@include media-breakpoint-down(sm) {
|
@media only screen and (max-width: 576px) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
background: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter {
|
.counter {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user