// 自动生成:站点首页组件(源自底座 niche 形态,品牌来自 @/site/brand) import { siteConfig } from "@/site/brand"; import { Code2, Terminal, Workflow, Layers } from "lucide-react"; import { getTranslations } from "next-intl/server"; import { ToolCard } from "@/components/tool-card"; import { LocaleLink } from "@/components/locale-link"; import { SectionHeader } from "@/kit/section"; import { getHomeDataSafe } from "@/kit/home-data"; /** Niche:垂直行业目录(AI for Developers) */ const navItems = [ { label: "Tools", href: "/tools" }, { label: "Workflows", href: "/best" }, { label: "Use Cases", href: "/ai-tools-for" }, { label: "Rankings", href: "/rankings" }, { label: "Submit", href: "/submit" }, ]; const footerGroups = [ { title: "Directory", links: [ { label: "All Tools", href: "/tools" }, { label: "Rankings", href: "/rankings" }, { label: "Use Cases", href: "/ai-tools-for" }, ], }, { title: "Build", links: [ { label: "Workflows", href: "/best" }, { label: "Submit a Tool", href: "/submit" }, { label: "Blog", href: "/blog" }, ], }, { title: "Legal", links: [ { 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); return (
{/* Terminal 风格 Hero + 绿色系统状态条 */}
system: online · 1,000+ tools indexed · updated hourly
devai — zsh

${" "} find-ai-tools --for developer

{th("title")}

{th("description")}

Browse tools

{/* Use Cases as workflows */} {data.useCases.length > 0 && (
{data.useCases.slice(0, 6).map((uc) => (
{uc.toolCount} tools

{locale === "zh" && uc.nameZh ? uc.nameZh : uc.nameEn}

))}
)} {/* Trending tools */} {data.trending.length > 0 && (
{data.trending.slice(0, 6).map((tool, i) => ( ))}
)} {/* Workflows(collections) */} {data.collections.length > 0 && (
{data.collections.slice(0, 3).map((col) => (

{locale === "zh" && col.nameZh ? col.nameZh : col.nameEn}

{locale === "zh" && col.introZh ? col.introZh : col.introEn}

))}
)} {/* Categories */} {data.categories.length > 0 && (
{data.categories.slice(0, 14).map((cat) => ( {locale === "zh" && cat.nameZh ? cat.nameZh : cat.nameEn} {cat.toolCount} ))}
)}
); } export { SiteHome };