// 自动生成:站点首页组件(源自底座 editorial 形态,品牌来自 @/site/brand) import { siteConfig } from "@/site/brand"; import { BookOpen, PenTool, ArrowRight, Star } from "lucide-react"; import { getTranslations } from "next-intl/server"; import { LocaleLink } from "@/components/locale-link"; import { SectionHeader } from "@/kit/section"; import { getHomeDataSafe } from "@/kit/home-data"; /** Editorial:AI 媒体 + 工具目录(Serif / 内容优先) */ const navItems = [ { label: "Stories", href: "/blog" }, { label: "Guides", href: "/ai-tools-for" }, { label: "Best Picks", href: "/best" }, { label: "Directory", href: "/tools" }, { label: "Rankings", href: "/rankings" }, { label: "Submit", href: "/submit" }, ]; const footerGroups = [ { title: "Read", links: [ { label: "Latest Stories", href: "/blog" }, { label: "Buying Guides", href: "/best" }, { label: "Use Case Guides", href: "/ai-tools-for" }, ], }, { title: "Directory", links: [ { label: "All Tools", href: "/tools" }, { label: "Community Rankings", href: "/rankings" }, { label: "Submit a Tool", href: "/submit" }, ], }, { title: "Company", links: [ { label: "Contact", href: "/contact" }, { label: "Terms", href: "/terms" }, { label: "Privacy", href: "/privacy" }, ], }, ]; async function SiteHome({ locale }: { locale: string }) { const t = await getTranslations("siteHome"); const th = await getTranslations("hero"); const data = await getHomeDataSafe(6); const featured = data.articles[0]; const editorPicks = data.editorsChoice.slice(0, 4); return (
{t("mastheadLabel")}
{th("description")}
{featured.description}
)} {t("featuredRead")}{tool.taglineEn || tool.descriptionEn}
{locale === "zh" && col.introZh ? col.introZh : col.introEn}
{col.toolCount} {t("toolsCompared")}
{article.description}
)}))}"{review.content.slice(0, 140)} {review.content.length > 140 ? "..." : ""}"