File tree Expand file tree Collapse file tree 6 files changed +75
-19
lines changed Expand file tree Collapse file tree 6 files changed +75
-19
lines changed Original file line number Diff line number Diff line change @@ -37,3 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
37
37
- installed yarn
38
38
- normalized buttons' and links' styling
39
39
- updated ` package.json ` commands for macOs
40
+
41
+ ### changed
42
+
43
+ - Prompt cards are now swipable. (Home page)
Original file line number Diff line number Diff line change 1
1
import Card from './Card' ;
2
2
import Container from './Container' ;
3
+ import { Swiper , SwiperSlide } from 'swiper/react' ;
3
4
import styles from '../styles/CardsColumns.module.scss' ;
5
+ import 'swiper/css' ;
4
6
5
7
export default function CardsColumns ( {
6
8
images,
@@ -11,22 +13,46 @@ export default function CardsColumns({
11
13
linkText,
12
14
} ) {
13
15
return (
14
- < Container >
15
- < div className = { styles . inner__content } >
16
- { titles . map ( ( title , index ) => {
17
- return (
18
- < Card
19
- title = { title }
20
- image = { images [ index ] }
21
- altTag = { altTags [ index ] }
22
- content = { content [ index ] }
23
- link = { links [ index ] }
24
- linkText = { linkText [ index ] }
25
- key = { index }
26
- />
27
- ) ;
28
- } ) }
29
- </ div >
30
- </ Container >
16
+ < >
17
+ < Container >
18
+ < Swiper
19
+ mousewheel = { true }
20
+ grabCursor = { true }
21
+ navigation = { true }
22
+ pagination = { {
23
+ clickable : true ,
24
+ } }
25
+ centerInsufficientSlides = { true }
26
+ slidesPerView = { 1 }
27
+ breakpoints = { {
28
+ 780 : {
29
+ slidesPerView : 2 ,
30
+ spaceBetween : 50 ,
31
+ } ,
32
+ 1334 : {
33
+ slidesPerView : 3 ,
34
+ spaceBetween : 50 ,
35
+ }
36
+ } }
37
+ >
38
+ { titles . map ( ( title , index ) =>
39
+ < SwiperSlide className = { styles . swiperSlide } >
40
+ < div className = { styles . inner__content } >
41
+ < Card
42
+ title = { title }
43
+ image = { images [ index ] }
44
+ altTag = { altTags [ index ] }
45
+ content = { content [ index ] }
46
+ link = { links [ index ] }
47
+ linkText = { linkText [ index ] }
48
+ key = { index }
49
+ />
50
+ </ div >
51
+ </ SwiperSlide >
52
+ ) }
53
+
54
+ </ Swiper >
55
+ </ Container >
56
+ </ >
31
57
) ;
32
58
}
Original file line number Diff line number Diff line change 17
17
"react-dom" : " 17.0.1" ,
18
18
"react-google-recaptcha" : " ^2.1.0" ,
19
19
"react-mailchimp-subscribe" : " ^2.1.3" ,
20
- "sass" : " ^1.35.1"
20
+ "sass" : " ^1.35.1" ,
21
+ "swiper" : " ^8.2.2"
21
22
}
22
23
}
Original file line number Diff line number Diff line change 7
7
border-radius : 1.5rem ;
8
8
box-shadow : $box-shadow ;
9
9
min-width : 32% ;
10
+ height : 37rem ;
10
11
11
12
@include desktop {
12
- flex-basis : 32 % ;
13
+
13
14
margin : 1.5rem 1.5rem 0 1.5rem ;
14
15
15
16
& :first-child ,
Original file line number Diff line number Diff line change 14
14
padding-bottom : 5rem ;
15
15
}
16
16
}
17
+
18
+ .swiper-slide {
19
+ height : auto ;
20
+ }
Original file line number Diff line number Diff line change @@ -114,6 +114,13 @@ debug@^2.1.3:
114
114
dependencies :
115
115
ms "2.0.0"
116
116
117
+ dom7@^4.0.4 :
118
+ version "4.0.4"
119
+ resolved "https://registry.yarnpkg.com/dom7/-/dom7-4.0.4.tgz#8b68c5d8e5e2ed0fddb1cb93e433bc9060c8f3fb"
120
+ integrity sha512-DSSgBzQ4rJWQp1u6o+3FVwMNnT5bzQbMb+o31TjYYeRi05uAcpF8koxdfzeoe5ElzPmua7W7N28YJhF7iEKqIw==
121
+ dependencies :
122
+ ssr-window "^4.0.0"
123
+
117
124
fill-range@^7.0.1 :
118
125
version "7.0.1"
119
126
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
@@ -340,11 +347,24 @@ scheduler@^0.20.1:
340
347
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
341
348
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
342
349
350
+ ssr-window@^4.0.0, ssr-window@^4.0.2 :
351
+ version "4.0.2"
352
+ resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-4.0.2.tgz#dc6b3ee37be86ac0e3ddc60030f7b3bc9b8553be"
353
+ integrity sha512-ISv/Ch+ig7SOtw7G2+qkwfVASzazUnvlDTwypdLoPoySv+6MqlOV10VwPSE6EWkGjhW50lUmghPmpYZXMu/+AQ==
354
+
343
355
344
356
version "5.0.1"
345
357
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.1.tgz#78fecbbad2bf95ce6cd981a08918ce4696f5fc80"
346
358
integrity sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw==
347
359
360
+ swiper@^8.2.2 :
361
+ version "8.2.2"
362
+ resolved "https://registry.yarnpkg.com/swiper/-/swiper-8.2.2.tgz#d16e9d92ec9b5548399c06f2cda9c400f9f32352"
363
+ integrity sha512-t7Tts4ZD2ahM3InsHDlZ6YY4gi47zepGHx25cACd6fzgcVdAtYLbUihnEmck0HsDzqtkhciyfKsoUEhummZDEA==
364
+ dependencies :
365
+ dom7 "^4.0.4"
366
+ ssr-window "^4.0.2"
367
+
348
368
to-querystring@^1.0.4 :
349
369
version "1.1.1"
350
370
resolved "https://registry.yarnpkg.com/to-querystring/-/to-querystring-1.1.1.tgz#98de5b00c79768a98ca48a2c09a960238d960265"
You can’t perform that action at this time.
0 commit comments