From 05e55761058e2089e81fb93dd4000dc3f42f40b3 Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期四, 05 六月 2025 16:17:12 +0800
Subject: [PATCH] 页面调整优化
---
src/app/layout.tsx | 72 +++++++++++++++---------------------
1 files changed, 30 insertions(+), 42 deletions(-)
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index fc4aeae..6c02623 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,13 +1,34 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
-import Navbar from "@/components/layout/Navbar";
+import ClientLayoutContent from '@/components/layout/ClientLayoutContent';
+import Script from 'next/script';
+import { UserProvider } from "@/context/UserContext";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
- title: "甯峰箘鍚涜嚕 - 鏁板瓧鍛樺伐骞冲彴",
- description: "鏅鸿兘鐗╂祦瑙e喅鏂规",
+ title: "甯峰箘鍚涙垚 - AI鍦烘櫙妯℃嫙骞冲彴",
+ description: "鏅鸿兘鍖栦緵搴旈摼绠$悊锛孉I妯℃嫙APS鍦烘櫙鐨勯鑸��",
+ icons: {
+ icon: '/images/favicon.ico',
+ shortcut: '/images/favicon.ico',
+ apple: '/images/favicon.ico',
+ },
+};
+
+const ScrollToTop = () => {
+ return (
+ <Script id="scroll-to-top">
+ {`
+ if (typeof window !== 'undefined') {
+ window.onload = function() {
+ window.scrollTo(0, 0);
+ }
+ }
+ `}
+ </Script>
+ );
};
export default function RootLayout({
@@ -16,45 +37,12 @@
children: React.ReactNode;
}) {
return (
- <html lang="zh">
- <body className={inter.className}>
- <Navbar />
- <main className="min-h-screen bg-gray-50 pt-16">
- {children}
- </main>
- <footer className="bg-[#2F3C7E] text-white py-8">
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
- <div className="grid grid-cols-1 md:grid-cols-3 gap-8">
- <div>
- <h3 className="text-lg font-semibold mb-4">鍏充簬鎴戜滑</h3>
- <ul className="space-y-2">
- <li>鍏徃浠嬬粛</li>
- <li>鑱旂郴鏂瑰紡</li>
- <li>鍔犲叆鎴戜滑</li>
- </ul>
- </div>
- <div>
- <h3 className="text-lg font-semibold mb-4">浜у搧鏈嶅姟</h3>
- <ul className="space-y-2">
- <li>鏁板瓧鍛樺伐</li>
- <li>鏅鸿兘瀹㈡湇</li>
- <li>鐗╂祦瑙e喅鏂规</li>
- </ul>
- </div>
- <div>
- <h3 className="text-lg font-semibold mb-4">甯姪涓績</h3>
- <ul className="space-y-2">
- <li>浣跨敤鎸囧崡</li>
- <li>甯歌闂</li>
- <li>鎶�鏈敮鎸�</li>
- </ul>
- </div>
- </div>
- <div className="mt-8 pt-8 border-t border-gray-700 text-center">
- <p>漏 2024 甯峰箘鍚涜嚕. All rights reserved.</p>
- </div>
- </div>
- </footer>
+ <html lang="zh-CN" className="smooth-scroll">
+ <ScrollToTop />
+ <body className={`${inter.className} overflow-x-hidden`}>
+ <UserProvider>
+ <ClientLayoutContent>{children}</ClientLayoutContent>
+ </UserProvider>
</body>
</html>
);
--
Gitblit v1.9.3