157 lines
4.9 KiB
TypeScript
157 lines
4.9 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import { Geist, Geist_Mono, Noto_Sans_SC, Ma_Shan_Zheng, Long_Cang } from "next/font/google";
|
|
import "./globals.css";
|
|
import { ThemeProvider } from "@/contexts/theme-context";
|
|
import { WebVitals } from "@/components/analytics/web-vitals";
|
|
import { GoogleAnalytics } from "@/components/analytics/GoogleAnalytics";
|
|
import { OrganizationSchema, WebsiteSchema } from "@/components/seo/structured-data";
|
|
import { MobileTabBar } from "@/components/layout/mobile-tab-bar";
|
|
import { ErrorBoundary } from "@/components/ui/error-boundary";
|
|
import { SessionProvider } from "@/providers/session-provider";
|
|
import { initSentry } from "@/lib/sentry";
|
|
|
|
initSentry();
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
display: "swap",
|
|
preload: false,
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
display: "swap",
|
|
preload: false,
|
|
});
|
|
|
|
const notoSansSC = Noto_Sans_SC({
|
|
weight: ["400", "500", "700"],
|
|
variable: "--font-noto-sans-sc",
|
|
subsets: ["latin"],
|
|
display: "swap",
|
|
preload: true,
|
|
});
|
|
|
|
const maShanZheng = Ma_Shan_Zheng({
|
|
weight: "400",
|
|
variable: "--font-ma-shan-zheng",
|
|
subsets: ["latin"],
|
|
display: "swap",
|
|
preload: false,
|
|
});
|
|
|
|
const longCang = Long_Cang({
|
|
weight: "400",
|
|
variable: "--font-long-cang",
|
|
subsets: ["latin"],
|
|
display: "swap",
|
|
preload: false,
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
default: "四川睿新致远科技有限公司 - 企业数字化转型服务商",
|
|
template: "%s | 四川睿新致远科技有限公司",
|
|
},
|
|
description: "四川睿新致远科技有限公司成立于2026年,专注于企业数字化转型服务,提供软件开发、云计算、数据分析、信息安全等一站式解决方案。联系电话:028-88888888",
|
|
keywords: ["数字化转型", "企业软件", "ERP系统", "CRM系统", "云计算", "数据分析", "软件开发", "成都科技公司", "金融科技", "诺瓦隆"],
|
|
authors: [{ name: "四川睿新致远科技有限公司" }],
|
|
creator: "四川睿新致远科技有限公司",
|
|
publisher: "四川睿新致远科技有限公司",
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
googleBot: {
|
|
index: true,
|
|
follow: true,
|
|
"max-video-preview": -1,
|
|
"max-image-preview": "large",
|
|
"max-snippet": -1,
|
|
},
|
|
},
|
|
openGraph: {
|
|
type: "website",
|
|
locale: "zh_CN",
|
|
url: "https://www.novalon.cn",
|
|
siteName: "四川睿新致远科技有限公司",
|
|
title: "四川睿新致远科技有限公司 - 企业数字化转型服务商",
|
|
description: "专注于企业数字化转型服务,提供软件开发、云计算、数据分析、信息安全等一站式解决方案",
|
|
images: [
|
|
{
|
|
url: "/og-image.jpg",
|
|
width: 1200,
|
|
height: 630,
|
|
alt: "四川睿新致远科技有限公司",
|
|
},
|
|
],
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "四川睿新致远科技有限公司 - 企业数字化转型服务商",
|
|
description: "专注于企业数字化转型服务,提供软件开发、云计算、数据分析、信息安全等一站式解决方案",
|
|
images: ["/og-image.jpg"],
|
|
},
|
|
alternates: {
|
|
canonical: "https://www.novalon.cn",
|
|
},
|
|
verification: {
|
|
google: "your-google-verification-code",
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 5,
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#FFFFFF" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#0A0A0A" },
|
|
],
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="zh-CN" className="scroll-smooth" suppressHydrationWarning>
|
|
<head>
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
<link rel="apple-touch-icon" href="/favicon.svg" />
|
|
<OrganizationSchema />
|
|
<WebsiteSchema />
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
try {
|
|
const theme = localStorage.getItem('ruixin-theme') || 'system';
|
|
if (theme === 'dark' || (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
document.documentElement.classList.add('dark');
|
|
}
|
|
} catch {}
|
|
`,
|
|
}}
|
|
/>
|
|
</head>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} ${notoSansSC.variable} ${maShanZheng.variable} ${longCang.variable} font-sans antialiased`}
|
|
style={{ fontFamily: "'Noto Sans SC', 'Geist', -apple-system, BlinkMacSystemFont, sans-serif" }}
|
|
>
|
|
<GoogleAnalytics />
|
|
<WebVitals />
|
|
<SessionProvider>
|
|
<ThemeProvider>
|
|
<ErrorBoundary>
|
|
{children}
|
|
</ErrorBoundary>
|
|
</ThemeProvider>
|
|
</SessionProvider>
|
|
<MobileTabBar />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|