File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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.
3737- installed yarn
3838- normalized buttons' and links' styling
3939- 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 11import Card from './Card' ;
22import Container from './Container' ;
3+ import { Swiper , SwiperSlide } from 'swiper/react' ;
34import styles from '../styles/CardsColumns.module.scss' ;
5+ import 'swiper/css' ;
46
57export default function CardsColumns ( {
68 images,
@@ -11,22 +13,46 @@ export default function CardsColumns({
1113 linkText,
1214} ) {
1315 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+ </ >
3157 ) ;
3258}
Original file line number Diff line number Diff line change 1717 "react-dom" : " 17.0.1" ,
1818 "react-google-recaptcha" : " ^2.1.0" ,
1919 "react-mailchimp-subscribe" : " ^2.1.3" ,
20- "sass" : " ^1.35.1"
20+ "sass" : " ^1.35.1" ,
21+ "swiper" : " ^8.2.2"
2122 }
2223}
Original file line number Diff line number Diff line change 77 border-radius : 1.5rem ;
88 box-shadow : $box-shadow ;
99 min-width : 32% ;
10+ height : 37rem ;
1011
1112 @include desktop {
12- flex-basis : 32 % ;
13+
1314 margin : 1.5rem 1.5rem 0 1.5rem ;
1415
1516 & :first-child ,
Original file line number Diff line number Diff line change 1414 padding-bottom : 5rem ;
1515 }
1616}
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:
114114 dependencies :
115115 ms "2.0.0"
116116
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+
117124fill-range@^7.0.1 :
118125 version "7.0.1"
119126 resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
@@ -340,11 +347,24 @@ scheduler@^0.20.1:
340347 resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
341348 integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
342349
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+
343355styled-jsx@5.0.1 :
344356 version "5.0.1"
345357 resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.1.tgz#78fecbbad2bf95ce6cd981a08918ce4696f5fc80"
346358 integrity sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw==
347359
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+
348368to-querystring@^1.0.4 :
349369 version "1.1.1"
350370 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