File tree 3 files changed +9
-28
lines changed
3 files changed +9
-28
lines changed Original file line number Diff line number Diff line change 18
18
19
19
.cardGrid {
20
20
display : grid;
21
- grid-template-columns : repeat (auto-fit, minmax ( 300px , 20 % ) );
21
+ grid-template-columns : repeat (auto-fit, 300px );
22
22
justify-content : center;
23
- margin : 50px 50px ;
23
+ width : 100% ;
24
+ padding : 15px ;
24
25
}
25
26
26
27
.cardGrid a {
Original file line number Diff line number Diff line change @@ -18,10 +18,12 @@ type CardGridProps = {
18
18
19
19
export const getCardsPerRow = ( ) : number => {
20
20
const sectionWidth =
21
- document . querySelector ( "[data-type=grid]" ) ?. clientWidth ?? 1 ;
21
+ document . querySelector ( "[data-type=grid]" ) ?. clientWidth ?? 300 ;
22
22
const cardWidth =
23
23
document . querySelector ( "[data-type=card]" ) ?. clientWidth ?? 300 ;
24
- return Math . max ( 1 , Math . floor ( sectionWidth / cardWidth ) ) ;
24
+ console . log ( sectionWidth , cardWidth ) ;
25
+ console . log ( Math . max ( 1 , Math . floor ( ( sectionWidth - 30 ) / cardWidth ) ) ) ;
26
+ return Math . max ( 1 , Math . floor ( ( sectionWidth - 30 ) / cardWidth ) ) ;
25
27
} ;
26
28
27
29
const Card = forwardRef ( function Card (
Original file line number Diff line number Diff line change 285
285
"src" : " /images/projects/umflint_env_club.webp" ,
286
286
"alt" : " UM-Flint Environmental Science Club Website"
287
287
},
288
- "website" : " https://umflint-env.lukeworks.tech/" ,
288
+ "_website" : " https://umflint-env.lukeworks.tech/" ,
289
+ "website" : " " ,
289
290
"category" : " " ,
290
291
"tags" : [],
291
292
"minutesToRead" : 0 ,
318
319
"publishedOn" : " 2019-08-21 16:09:16.000000" ,
319
320
"createdOn" : " 2017-03-27 01:06:07.000000" ,
320
321
"updatedOn" : " 2017-07-13 17:44:30.000000"
321
- },
322
- {
323
- "id" : 11 ,
324
- "name" : " mindyou" ,
325
- "title" : " MindYou" ,
326
- "thumbnail" : {
327
- "src" : " /images/projects/mindyou_main.webp" ,
328
- "alt" : " MindYou Screenshot"
329
- },
330
- "image" : {
331
- "src" : " /images/projects/mindyou_main.webp" ,
332
- "alt" : " MindYou Screenshot"
333
- },
334
- "website" : " https://mindyou.me/" ,
335
- "category" : " " ,
336
- "tags" : [],
337
- "minutesToRead" : 0 ,
338
- "likes" : 0 ,
339
- "startedOn" : " 2014-11-18 21:24:18.000000" ,
340
- "completedOn" : null ,
341
- "publishedOn" : null ,
342
- "createdOn" : " 2014-11-18 21:24:20.000000" ,
343
- "updatedOn" : " 2017-05-06 03:00:27.000000"
344
322
}
345
323
]
You can’t perform that action at this time.
0 commit comments