From a42f1f0a901ef5bfae0373fa8647b086faf090c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Fri, 13 Feb 2026 14:04:06 +0800 Subject: [PATCH] feat: add insight card component for tech insights section --- src/components/ui/insight-card.tsx | 82 ++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/components/ui/insight-card.tsx diff --git a/src/components/ui/insight-card.tsx b/src/components/ui/insight-card.tsx new file mode 100644 index 0000000..38aedec --- /dev/null +++ b/src/components/ui/insight-card.tsx @@ -0,0 +1,82 @@ +'use client'; + +import { Calendar, Clock, ArrowRight } from 'lucide-react'; +import { Badge } from '@/components/ui/badge'; + +export interface InsightCardProps { + title: string; + excerpt: string; + category: string; + readTime: string; + publishedAt: string; + imageUrl?: string; + href: string; + featured?: boolean; +} + +export function InsightCard({ + title, + excerpt, + category, + readTime, + publishedAt, + imageUrl, + href, + featured = false, +}: InsightCardProps) { + return ( +
+ {imageUrl && ( +
+ {title} +
+
+ )} + +
+
+ + {category} + +
+ + {readTime} +
+
+ +

+ {title} +

+ +

+ {excerpt} +

+ +
+
+ + {publishedAt} +
+ + + 阅读更多 + + +
+
+
+ ); +}