www_site/app/products/page.tsx

37 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

import { SectionHeading, DevPlaceholder, ProductVisual, ArrowLink } from "@/components/ui";
2026-09-09 09:02:46 +00:00
import { getProducts } from "@/lib/content";
export const metadata = { title: "产品中心" };
2026-09-09 09:02:46 +00:00
export const dynamic = "force-dynamic";
export default async function ProductsPage() {
const products = await getProducts();
return (
<div className="container-shell py-20 sm:py-28">
<SectionHeading eyebrow="Products" title="产品中心" description="围绕蓝牙周边、音频与智能硬件的产品结构。真实产品资料入库前,页面使用明确标注的开发占位数据。" />
<div className="mt-12 flex flex-wrap gap-2 border-y border-line py-4">
<span className="rounded-full bg-copy px-4 py-2 text-sm font-semibold text-ink"></span>
<span className="rounded-full border border-line px-4 py-2 text-sm text-muted">线</span>
<span className="rounded-full border border-line px-4 py-2 text-sm text-muted"></span>
<span className="ml-auto self-center text-xs text-subtle"> CMS </span>
</div>
<div className="mt-10 grid gap-6 lg:grid-cols-2">
2026-09-09 09:02:46 +00:00
{!products.length ? <div className="rounded-2xl border border-dashed border-line p-8 text-sm leading-7 text-muted">CMS </div> : null}
{products.map((product) => (
<article className="overflow-hidden rounded-2xl border border-line bg-panel/50" key={product.slug}>
<ProductVisual accent={product.accent} label={product.category.toUpperCase()} />
<div className="p-6 sm:p-8">
<DevPlaceholder>{product.shortLabel}</DevPlaceholder>
<p className="mt-5 text-xs font-semibold uppercase tracking-[0.18em] text-subtle">{product.category}</p>
<h2 className="mt-3 text-2xl font-semibold tracking-[-0.03em]">{product.name}</h2>
<p className="mt-3 max-w-lg text-sm leading-7 text-muted">{product.summary}</p>
<div className="mt-6"><ArrowLink href={`/products/${product.slug}`}></ArrowLink></div>
</div>
</article>
))}
</div>
</div>
);
}