Skip to content

Commit 184ee4f

Browse files
committed
Enhanced blog section
1 parent 06cac74 commit 184ee4f

3 files changed

Lines changed: 221 additions & 240 deletions

File tree

src/components/blogCarousel/blogCard.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"use client";
22
import * as React from "react";
3-
import { useState } from "react";
3+
44
import { motion } from "framer-motion";
55
import Link from "@docusaurus/Link";
6-
import { Card, CardContent } from "../ui/card";
6+
77
import { getAuthorNames } from "../../utils/authors";
88

99
const BlogCard = ({ type, date, title, content, imageUrl, id, authors }) => {
10-
const [isHovered, setIsHovered] = useState(false);
10+
1111

1212
if (!id || !type) {
1313
return <div>data not fetched properly, imageId and entryId not found</div>;
@@ -45,16 +45,16 @@ const BlogCard = ({ type, date, title, content, imageUrl, id, authors }) => {
4545
scale: 1.02,
4646
transition: { duration: 0.4, ease: "easeOut" },
4747
}}
48-
onMouseEnter={() => setIsHovered(true)}
49-
onMouseLeave={() => setIsHovered(false)}
48+
5049
className="relative h-full overflow-hidden transition-all duration-300"
5150
>
5251
<Link
53-
to={`/blog/${id}`}
54-
className="text-decoration-none block h-full"
55-
style={{ textDecoration: "none" }}
56-
>
57-
<div className="article-card h-full">
52+
to={`/blog/${id}`}
53+
className="block h-full"
54+
style={{ textDecoration: "none" }}
55+
aria-label={`Read article: ${title}`} // ← add this
56+
>
57+
<div className="article-card h-full" style={{ cursor: "pointer"}}>
5858
{/* Category Badge */}
5959
<div className="card-category">{category}</div>
6060

@@ -83,7 +83,9 @@ const BlogCard = ({ type, date, title, content, imageUrl, id, authors }) => {
8383
</div>
8484

8585
{/* Read More Button */}
86-
<div className="card-read-more">Read Article →</div>
86+
<span className="card-read-more">
87+
<span>Read Article →</span>
88+
</span>
8789
</div>
8890
</div>
8991
</Link>

0 commit comments

Comments
 (0)