import Link from 'next/link'; import { formatDate } from '@/lib/markdown'; import { Clock } from 'lucide-react'; import ArticleCoverSVG from './ArticleCoverSVG'; function imageUrl(article) { if (!article.cover_url) return null; return article.cover_url; } export default function ArticleCard({ article, featured = false }) { const img = imageUrl(article); if (featured) { return (
{img ? ( {article.title} ) : ( )}
{(article.tags || []).slice(0, 3).map(t => ( #{t} ))}

{article.title}

{article.excerpt && (

{article.excerpt}

)}
{formatDate(article.published_at)} {article.reading_time && ( {article.reading_time} мин )}
); } return (
{img ? ( {article.title} ) : ( )}
{(article.tags || []).slice(0, 2).map(t => ( #{t} ))}

{article.title}

{article.excerpt && (

{article.excerpt}

)}
{formatDate(article.published_at)} {article.reading_time && ( {article.reading_time} мин )}
); }