@@ -16,23 +16,19 @@ interface BlogCardProps {
1616 post : BlogPost
1717}
1818
19- // Conditionally set BASE_PATH depending on environment
2019const BASE_PATH = process . env . NODE_ENV === "production" ? "/StableViewpoints" : ""
2120
2221export default function BlogCard ( { post } : BlogCardProps ) {
23-
24-
2522 return (
26- < Link href = { `/a/${ post . slug } ` } className = "group" >
27- < article className = "bg-white shadow-lg overflow-hidden transition-all duration-300 hover:shadow-2xl hover:-translate-y-2 border border-gradient-to-r from-[#228B22]/10 to-[#FFBF00]/10 relative" >
28- { /* Featured Star - Discrete yellow star in top right */ }
23+ < Link href = { `/a/${ post . slug } ` } className = "group h-full " >
24+ < article className = "flex flex-col h-full bg-white shadow-lg overflow-hidden transition-all duration-300 hover:shadow-2xl hover:-translate-y-2 border border-gradient-to-r from-[#228B22]/10 to-[#FFBF00]/10 relative rounded-lg " >
25+
2926 { post . featured && (
3027 < div className = "absolute top-3 right-3 z-20" >
3128 < Star className = "w-5 h-5 fill-[#FFBF00] text-[#FFBF00] drop-shadow-sm" />
3229 </ div >
3330 ) }
3431
35- { /* Image - Golden ratio aspect ratio (φ:1 ≈ 1.618:1) */ }
3632 < div className = "relative w-full" >
3733 < Image
3834 src = {
@@ -41,24 +37,22 @@ export default function BlogCard({ post }: BlogCardProps) {
4137 : post . image
4238 }
4339 alt = { post . title }
44- width = { 1200 } // pick a large enough base width
45- height = { 630 } // aspect ratio will be preserved, height auto-scales
40+ width = { 1200 }
41+ height = { 630 }
4642 className = "w-full h-auto object-contain transition-transform duration-500 group-hover:scale-105"
4743 />
4844 < div className = "absolute inset-0 bg-gradient-to-t from-black/30 via-transparent to-transparent" />
4945 < div className = "absolute inset-0 bg-gradient-to-br from-[#228B22]/10 via-transparent to-[#FFBF00]/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
5046 </ div >
5147
52- { /* Content */ }
53- < div className = "p-6" >
48+ < div className = "flex flex-col flex-grow p-6" >
5449 < h2 className = "text-xl font-bold text-gray-900 mb-3 line-clamp-2 group-hover:bg-gradient-to-r group-hover:from-[#228B22] group-hover:to-[#91A511] group-hover:bg-clip-text group-hover:text-transparent transition-all duration-300" >
5550 { post . title }
5651 </ h2 >
5752
5853 < p className = "text-gray-600 mb-4 line-clamp-3" > { post . excerpt } </ p >
5954
60- { /* Meta */ }
61- < div className = "flex items-center justify-between text-sm text-gray-500" >
55+ < div className = "mt-auto flex items-center justify-between text-sm text-gray-500" >
6256 < div className = "flex items-center gap-1 group-hover:text-[#228B22] transition-colors" >
6357 < User className = "w-4 h-4" />
6458 < span > { post . author } </ span >
0 commit comments