Add article excerpts to blog post cards for better readability
Update the `MediumCard` component in `client/src/pages/home.tsx` to display the `article.excerpt` below the title, resolving the issue of blank space and improving content visibility. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 413891e8-d784-4bea-b9f5-91a5a68316b4 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 3ad9a825-821d-4602-8f4d-6c5c53ff7245 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/413891e8-d784-4bea-b9f5-91a5a68316b4/oYq1Msd Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
c1bb3bda24
commit
48849470d1
BIN
attached_assets/image_1772308809989.png
Normal file
BIN
attached_assets/image_1772308809989.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 818 KiB |
@ -119,6 +119,7 @@ function MediumCard({ article }: { article: Article }) {
|
||||
<span className="text-muted-foreground text-[10px]">{timeAgo(new Date(article.publishedAt))}</span>
|
||||
</div>
|
||||
<h3 className="font-semibold text-card-foreground text-sm leading-snug line-clamp-2 group-hover:text-primary transition-colors">{article.title}</h3>
|
||||
<p className="text-xs text-muted-foreground mt-1.5 leading-relaxed line-clamp-3">{article.excerpt}</p>
|
||||
<div className="flex items-center gap-2 mt-2 text-muted-foreground text-[10px]">
|
||||
<Eye className="w-3 h-3" />
|
||||
{article.views.toLocaleString()}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user