File tree Expand file tree Collapse file tree 5 files changed +55
-46
lines changed Expand file tree Collapse file tree 5 files changed +55
-46
lines changed Original file line number Diff line number Diff line change @@ -10,33 +10,41 @@ import styles from '@/styles/CardsColumns.module.scss';
10
10
export default function CardsColumns ( { cards, customClass } ) {
11
11
return (
12
12
< Container >
13
- < Swiper
14
- className = { styles . swiper }
15
- mousewheel = { true }
16
- grabCursor = { true }
17
- modules = { [ Pagination ] }
18
- pagination
19
- centerInsufficientSlides = { false }
20
- slidesPerView = { 1 }
21
- breakpoints = { {
22
- 768 : {
23
- slidesPerView : 2 ,
24
- spaceBetween : 20 ,
25
- } ,
26
- 1334 : {
27
- slidesPerView : cards . length ,
28
- spaceBetween : cards . length < 3 ? 75 : 20 ,
29
- } ,
30
- } }
13
+ < div
14
+ className = {
15
+ customClass
16
+ ? `${ styles . cardColumns } ${ styles [ customClass ] } `
17
+ : styles . cardColumns
18
+ }
31
19
>
32
- { cards . map ( ( card , index ) => (
33
- < SwiperSlide key = { index } className = { styles . swiperSlide } >
34
- < div className = { styles . inner__content } >
35
- < Card key = { index } card = { card } customClass = { customClass } />
36
- </ div >
37
- </ SwiperSlide >
38
- ) ) }
39
- </ Swiper >
20
+ < Swiper
21
+ className = { styles . swiper }
22
+ mousewheel = { true }
23
+ grabCursor = { true }
24
+ modules = { [ Pagination ] }
25
+ pagination
26
+ centerInsufficientSlides = { false }
27
+ slidesPerView = { 1 }
28
+ breakpoints = { {
29
+ 768 : {
30
+ slidesPerView : 2 ,
31
+ spaceBetween : 20 ,
32
+ } ,
33
+ 1334 : {
34
+ slidesPerView : 3 ,
35
+ spaceBetween : 20 ,
36
+ } ,
37
+ } }
38
+ >
39
+ { cards . map ( ( card , index ) => (
40
+ < SwiperSlide key = { index } className = { styles . swiperSlide } >
41
+ < div className = { styles . inner__content } >
42
+ < Card key = { index } card = { card } customClass = { customClass } />
43
+ </ div >
44
+ </ SwiperSlide >
45
+ ) ) }
46
+ </ Swiper >
47
+ </ div >
40
48
</ Container >
41
49
) ;
42
50
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export default function BlogCategory({ posts }) {
10
10
posts = { posts }
11
11
swipe = { false }
12
12
heading = { tagToHeading [ tag ] }
13
+ viewall = { false }
13
14
/>
14
15
) ;
15
16
}
Original file line number Diff line number Diff line change 1
1
import BlogPostsContainer from '@/components/blog/BlogPostsContainer' ;
2
2
3
3
export default function BlogCategory ( { posts } ) {
4
- // TODO: Temporary, to show more posts
5
- posts = posts . concat ( posts ) . concat ( posts ) ;
6
-
7
4
return (
8
5
< BlogPostsContainer
9
6
posts = { posts }
Original file line number Diff line number Diff line change 120
120
121
121
@include desktop {
122
122
min-width : 25% ;
123
+ max-width : 18.75rem ;
123
124
}
124
125
125
126
.card__image {
133
134
overflow : hidden ;
134
135
}
135
136
136
- & .swiper-wrapper {
137
- justify-content : flex-start ;
137
+ .swiper-wrapper {
138
+ justify-content : flex-end ;
138
139
}
139
140
}
140
141
Original file line number Diff line number Diff line change 1
1
@use ' ./variables' as * ;
2
2
@use ' ./mixins' as * ;
3
3
4
- .inner__content {
5
- margin : 0 auto ;
6
- padding-bottom : 4rem ;
7
- justify-content : center ;
4
+ .cardColumns {
5
+ .inner__content {
6
+ margin : 0 auto ;
7
+ padding-bottom : 4rem ;
8
+ justify-content : center ;
8
9
9
- @include desktop-breakpoint-plus {
10
- display : flex ;
10
+ @include desktop-breakpoint-plus {
11
+ display : flex ;
12
+ }
11
13
}
12
- }
13
14
14
- .swiper {
15
- margin-bottom : 5rem ;
16
- padding : 0 1rem ;
15
+ .swiper {
16
+ margin-bottom : 5rem ;
17
+ padding : 0 1rem ;
17
18
18
- :global (.swiper-pagination-bullet-active ) {
19
- background-color : $dark-bg-color ;
19
+ :global (.swiper-pagination-bullet-active ) {
20
+ background-color : $dark-bg-color ;
21
+ }
20
22
}
21
- }
22
23
23
- .swiperSlide {
24
- max-width : 34.375rem ;
24
+ .swiperSlide {
25
+ max-width : 34.375rem ;
26
+ }
25
27
}
You can’t perform that action at this time.
0 commit comments