import Link from 'next/link' import type { BlogPost } from '@startsimpli/api/blog' import { cn } from '../../utils/cn' export interface ArticleCardProps { post: BlogPost /** Destination href, e.g. `/blog/${post.slug}`. */ href: string /** Pre-resolved image URL (use `getImageUrl` from the blog client). */ imageSrc?: string /** Byline shown in the card footer (e.g. the site name). */ byline?: string className?: string } /** * Article preview card for blog index grids. Server-renderable; themed via * shared tokens so it matches whichever app embeds it. */ export function ArticleCard({ post, href, imageSrc, byline, className }: ArticleCardProps) { const src = imageSrc ?? post.image return (
{src && (
{/* eslint-disable-next-line @next/next/no-img-element */} {post.title}
)}

{post.title}

{post.excerpt && (

{post.excerpt}

)}
{byline ? {byline} : } {post.readTime && {post.readTime}}
) }