71 lines
2.5 KiB
TypeScript
71 lines
2.5 KiB
TypeScript
|
|
import type { Metadata } from 'next';
|
|||
|
|
import { Inter } from 'next/font/google';
|
|||
|
|
import './globals.css';
|
|||
|
|
import Script from 'next/script';
|
|||
|
|
import { globalScripts } from '../public/js/ContactUS.js';
|
|||
|
|
|
|||
|
|
const inter = Inter({ subsets: ['latin'] });
|
|||
|
|
|
|||
|
|
export const metadata: Metadata = {
|
|||
|
|
title: 'AwsLinker - 专业AWS云服务提供商',
|
|||
|
|
description: 'AwsLinker是专业的AWS云服务提供商,提供云服务器、云存储、云安全等全方位云计算解决方案。',
|
|||
|
|
icons: {
|
|||
|
|
icon: [
|
|||
|
|
{ url: '/favicon.svg', type: 'image/svg+xml' },
|
|||
|
|
{ url: '/favicon.ico', type: 'image/x-icon', sizes: '128x128' }
|
|||
|
|
],
|
|||
|
|
apple: [
|
|||
|
|
{ url: '/favicon.svg', type: 'image/svg+xml' }
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
export default function RootLayout({
|
|||
|
|
children,
|
|||
|
|
}: {
|
|||
|
|
children: React.ReactNode;
|
|||
|
|
}) {
|
|||
|
|
return (
|
|||
|
|
<html lang="zh-CN" className="scroll-smooth">
|
|||
|
|
<head>
|
|||
|
|
{/* Google Tag Manager */}
|
|||
|
|
<script
|
|||
|
|
dangerouslySetInnerHTML={{
|
|||
|
|
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|||
|
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|||
|
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||
|
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|||
|
|
})(window,document,'script','dataLayer','GTM-5R2F3NH7');`
|
|||
|
|
}}
|
|||
|
|
/>
|
|||
|
|
{/* End Google Tag Manager */}
|
|||
|
|
</head>
|
|||
|
|
<body className={inter.className}>
|
|||
|
|
{/* Google Tag Manager (noscript) */}
|
|||
|
|
<noscript>
|
|||
|
|
<iframe
|
|||
|
|
src="https://www.googletagmanager.com/ns.html?id=GTM-5R2F3NH7"
|
|||
|
|
height="0"
|
|||
|
|
width="0"
|
|||
|
|
style={{display: 'none', visibility: 'hidden'}}
|
|||
|
|
/>
|
|||
|
|
</noscript>
|
|||
|
|
{/* End Google Tag Manager (noscript) */}
|
|||
|
|
|
|||
|
|
{children}
|
|||
|
|
|
|||
|
|
{/* 全局客服脚本 */}
|
|||
|
|
{globalScripts.map((script, index) => (
|
|||
|
|
<Script
|
|||
|
|
key={index}
|
|||
|
|
id={`global-script-${index}`}
|
|||
|
|
strategy="afterInteractive"
|
|||
|
|
dangerouslySetInnerHTML={{
|
|||
|
|
__html: script.innerHTML
|
|||
|
|
}}
|
|||
|
|
/>
|
|||
|
|
))}
|
|||
|
|
</body>
|
|||
|
|
</html>
|
|||
|
|
);
|
|||
|
|
}
|