添加基础结构

This commit is contained in:
2025-04-24 22:40:18 +08:00
parent 777d36617f
commit 870b04bb28
10 changed files with 356 additions and 9 deletions

View File

@@ -2,6 +2,10 @@ import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "./components/theme-provider";
import { metadata } from "./config/metadata";
import Header from "./components/Header";
import Footer from "./components/Footer";
import { Toaster } from "sonner";
const geistSans = Geist({
variable: "--font-geist-sans",
@@ -13,10 +17,7 @@ const geistMono = Geist_Mono({
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export { metadata };
export default function RootLayout({
children,
@@ -24,9 +25,10 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
className={`${geistSans.variable} ${geistMono.variable} antialiased min-h-screen flex flex-col`}
suppressHydrationWarning
>
<ThemeProvider
attribute="class"
@@ -34,9 +36,14 @@ export default function RootLayout({
enableSystem
disableTransitionOnChange
>
{children}
<Header />
<main className="flex-grow">
{children}
<Toaster />
</main>
<Footer />
</ThemeProvider>
</body>
</html>
);
}
}