spb/autoscholar
Public
1import type { PublicPaperSummary } from "@autoscholar/schemas";2import Link from "next/link";3import { disciplineLabel, fmtDate, modeLabel } from "@/lib/format";4import { StatusBadge } from "./StatusBadge";56export function PaperCard({ p, featured = false }: { p: PublicPaperSummary; featured?: boolean }) {7 return (8 <article className={`surface flex flex-col gap-3 p-5 ${featured ? "md:p-7" : ""}`}>9 <div className="flex flex-wrap items-center gap-2 text-xs">10 <span className="font-mono subtle">{p.publicId}</span>11 <span className="subtle">·</span>12 <span className="muted">{disciplineLabel(p.discipline)}</span>13 <span className="subtle">·</span>14 <span className="muted">{modeLabel(p.researchMode)}</span>15 {p.status !== "published" && <StatusBadge status={p.status} />}16 {p.synthetic && <span className="badge">staging sample</span>}17 </div>18 <h3 className={`serif font-semibold leading-snug ${featured ? "text-2xl" : "text-lg"}`}>19 <Link href={`/research/${p.slug}`} className="no-underline hover:underline">20 {p.title}21 </Link>22 </h3>23 <p className="muted line-clamp-3 text-sm leading-relaxed">{p.abstract}</p>24 <div className="mt-auto flex flex-wrap items-center justify-between gap-2 pt-1 text-xs">25 <span className="subtle">26 {fmtDate(p.firstPublishedAt)} · v{p.versionNo}27 </span>28 <span className="flex gap-2 subtle">29 {p.hasLatex && <span title="LaTeX source available">TeX</span>}30 {p.hasCode && <span title="Code available">Code</span>}31 {p.hasData && <span title="Data available">Data</span>}32 </span>33 </div>34 </article>35 );36}37