Skip to content

Commit c588bd1

Browse files
committed
fix: fixed some css and urls
1 parent a49ff97 commit c588bd1

File tree

3 files changed

+9
-28
lines changed

3 files changed

+9
-28
lines changed

web/src/components/post/cardGrid.module.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919
.cardGrid {
2020
display: grid;
21-
grid-template-columns: repeat(auto-fit, minmax(300px, 20%));
21+
grid-template-columns: repeat(auto-fit, 300px);
2222
justify-content: center;
23-
margin: 50px 50px;
23+
width: 100%;
24+
padding: 15px;
2425
}
2526

2627
.cardGrid a {

web/src/components/post/cardGrid.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ type CardGridProps = {
1818

1919
export const getCardsPerRow = (): number => {
2020
const sectionWidth =
21-
document.querySelector("[data-type=grid]")?.clientWidth ?? 1;
21+
document.querySelector("[data-type=grid]")?.clientWidth ?? 300;
2222
const cardWidth =
2323
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));
2527
};
2628

2729
const Card = forwardRef(function Card(

web/src/data/projectPosts.json

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@
285285
"src": "/images/projects/umflint_env_club.webp",
286286
"alt": "UM-Flint Environmental Science Club Website"
287287
},
288-
"website": "https://umflint-env.lukeworks.tech/",
288+
"_website": "https://umflint-env.lukeworks.tech/",
289+
"website": "",
289290
"category": "",
290291
"tags": [],
291292
"minutesToRead": 0,
@@ -318,28 +319,5 @@
318319
"publishedOn": "2019-08-21 16:09:16.000000",
319320
"createdOn": "2017-03-27 01:06:07.000000",
320321
"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"
344322
}
345323
]

0 commit comments

Comments
 (0)