|
1 | 1 | "use client"; |
2 | 2 | import * as React from "react"; |
3 | | -import { useState } from "react"; |
| 3 | + |
4 | 4 | import { motion } from "framer-motion"; |
5 | 5 | import Link from "@docusaurus/Link"; |
6 | | -import { Card, CardContent } from "../ui/card"; |
| 6 | + |
7 | 7 | import { getAuthorNames } from "../../utils/authors"; |
8 | 8 |
|
9 | 9 | const BlogCard = ({ type, date, title, content, imageUrl, id, authors }) => { |
10 | | - const [isHovered, setIsHovered] = useState(false); |
| 10 | + |
11 | 11 |
|
12 | 12 | if (!id || !type) { |
13 | 13 | 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 }) => { |
45 | 45 | scale: 1.02, |
46 | 46 | transition: { duration: 0.4, ease: "easeOut" }, |
47 | 47 | }} |
48 | | - onMouseEnter={() => setIsHovered(true)} |
49 | | - onMouseLeave={() => setIsHovered(false)} |
| 48 | + |
50 | 49 | className="relative h-full overflow-hidden transition-all duration-300" |
51 | 50 | > |
52 | 51 | <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"}}> |
58 | 58 | {/* Category Badge */} |
59 | 59 | <div className="card-category">{category}</div> |
60 | 60 |
|
@@ -83,7 +83,9 @@ const BlogCard = ({ type, date, title, content, imageUrl, id, authors }) => { |
83 | 83 | </div> |
84 | 84 |
|
85 | 85 | {/* 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> |
87 | 89 | </div> |
88 | 90 | </div> |
89 | 91 | </Link> |
|
0 commit comments