Update top stories to show title, author, and time

Remove images from the top stories section and display only the title, author, and publication time.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 5779a0f5-e81b-4638-abee-a351ca3e4a1c
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic 2026-02-28 20:40:58 +00:00
parent 1eaed39618
commit d0b775b3a0
2 changed files with 6 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -185,19 +185,14 @@ function TopStoriesList({ articles }: { articles: Article[] }) {
<span className="w-1 h-4 bg-primary rounded-full" />
Top-Storys
</h3>
<div className="space-y-3">
<div className="space-y-0">
{articles.slice(0, 5).map((article) => (
<Link key={article.id} href={`/article/${article.slug}`}>
<div className="group cursor-pointer flex gap-3 py-1.5 border-b border-card-border last:border-0" data-testid={`card-top-${article.id}`}>
<div className="flex-shrink-0 w-20 h-14 rounded overflow-hidden">
<img src={thumbUrl(article.coverImage)} alt={article.title} className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105" style={{ objectPosition: "center 25%" }} loading="lazy" />
</div>
<div className="flex-1 min-w-0">
<div className="flex items-center gap-1.5 mb-0.5">
<span className="text-[10px] font-medium text-primary">{article.category}</span>
<span className="text-muted-foreground text-[10px]">{timeAgo(new Date(article.publishedAt))}</span>
</div>
<h4 className="text-xs font-medium text-card-foreground line-clamp-2 group-hover:text-primary transition-colors leading-snug">{article.title}</h4>
<div className="group cursor-pointer py-2.5 border-b border-card-border last:border-0" data-testid={`card-top-${article.id}`}>
<h4 className="text-sm font-medium text-card-foreground line-clamp-2 group-hover:text-primary transition-colors leading-snug">{article.title}</h4>
<div className="flex items-center gap-1.5 mt-1">
<span className="text-[11px] text-muted-foreground">{article.author}</span>
<span className="text-muted-foreground/50 text-[11px]">{timeAgo(new Date(article.publishedAt))}</span>
</div>
</div>
</Link>