File tree Expand file tree Collapse file tree
src/components/blogCarousel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ const BlogCard = ({
8080 < div className = "article-card" >
8181 { /* Image */ }
8282 < div className = "card-image" >
83- < img src = { imageUrl } alt = { title } loading = "lazy" />
83+ < Link to = { `/blog/${ id } ` } className = "block" aria-label = { `Read ${ title } ` } >
84+ < img src = { imageUrl } alt = { title } loading = "lazy" />
85+ </ Link >
8486 </ div >
8587
8688 { /* Content */ }
@@ -202,4 +204,4 @@ const BlogCard = ({
202204 ) ;
203205} ;
204206
205- export default BlogCard ;
207+ export default BlogCard ;
Original file line number Diff line number Diff line change 102102 flex-shrink : 0 ;
103103}
104104
105+ .card-image a {
106+ display : block;
107+ width : 100% ;
108+ height : 100% ;
109+ }
110+
105111.card-image ::after {
106112 content : "" ;
107113 position : absolute;
112118 opacity : 0 ;
113119 transition : opacity 0.35s ease;
114120 z-index : 1 ;
121+ pointer-events : none;
115122}
116123
117124.article-card : hover .card-image ::after {
118125 opacity : 1 ;
119126}
120127
121128.card-image img {
129+ display : block;
122130 width : 100% ;
123131 height : 100% ;
124132 object-fit : cover;
157165 transition : color 0.2s ease;
158166 display : -webkit-box;
159167 -webkit-line-clamp : 2 ;
168+ line-clamp : 2 ;
160169 -webkit-box-orient : vertical;
161170 overflow : hidden;
162171}
195204 margin : 0 0 16px 0 ;
196205 display : -webkit-box;
197206 -webkit-line-clamp : 3 ;
207+ line-clamp : 3 ;
198208 -webkit-box-orient : vertical;
199209 overflow : hidden;
200210 flex : 1 ;
635645 transform : translateY (-20px );
636646 transition : opacity 0.4s ease-in, transform 0.4s ease-in;
637647}
648+
638649/* ── Reading time ── */
639650.card-reading-time {
640651 display : inline-flex;
You can’t perform that action at this time.
0 commit comments