import Link from "next/link"; import { Info, Megaphone, type LucideIcon } from "lucide-react"; export type SiteDocIdentityKind = "announcements" | "about"; const META: Record< SiteDocIdentityKind, { title: string; href: string; Icon: LucideIcon; fallbackLead: string } > = { announcements: { title: "站点公告", href: "/announcements", Icon: Megaphone, fallbackLead: "官方通知与运营公告", }, about: { title: "关于本站", href: "/", Icon: Info, fallbackLead: "站点说明与政策文档", }, }; /** 左栏身份卡:标明当前公文区 */ export default function SiteDocIdentity({ kind, lead, }: { kind: SiteDocIdentityKind; lead?: string; }) { const m = META[kind]; const Icon = m.Icon; const text = lead?.trim() || m.fallbackLead; return (

{m.title}

{m.title}

{text}

); }