feat: scaffold headless frontend integration per design doc

This commit is contained in:
2026-08-06 15:51:59 +08:00
parent b0919bf8b5
commit 7e30631c68
28 changed files with 708 additions and 126 deletions
+18 -17
View File
@@ -1,29 +1,30 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import Header from "@/components/layout/Header";
import Footer from "@/components/layout/Footer";
import ReactQueryProvider from "@/providers/react-query-provider";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
// 面向中国大陆用户,避免依赖 next/font/google(构建期需访问 Google 服务器)。
// 生产环境建议自托管思源黑体 / HarmonyOS Sans 子集,这里先用系统字体栈占位。
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: {
default: "企业官网",
template: "%s | 企业官网",
},
description: "企业级 Headless CMS 驱动的现代化官网",
};
export default function RootLayout({ children }: LayoutProps<"/">) {
return (
<html
lang="en"
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col">{children}</body>
<html lang="zh-hans" className="h-full antialiased">
<body className="min-h-full flex flex-col font-sans">
<ReactQueryProvider>
<Header />
<main className="flex-1">{children}</main>
<Footer />
</ReactQueryProvider>
</body>
</html>
);
}