70 lines
2.0 KiB
TypeScript
70 lines
2.0 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import "./globals.css";
|
|
import { Providers } from "@/components/Providers";
|
|
import { getThemeInitScript } from "@/lib/theme";
|
|
import { getMobileNavPlacementInitScript } from "@/lib/mobileNavPlacement";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "CORP - HiRo",
|
|
description: "Корпоративная система управления CORP - HiRo",
|
|
applicationName: "CORP - HiRo",
|
|
manifest: "/manifest.webmanifest",
|
|
appleWebApp: {
|
|
capable: true,
|
|
statusBarStyle: "default",
|
|
title: "CORP - HiRo",
|
|
},
|
|
icons: {
|
|
icon: [
|
|
{ url: "/favicon-source.svg", type: "image/svg+xml", sizes: "any" },
|
|
{ url: "/icon-192.png", sizes: "192x192", type: "image/png" },
|
|
{ url: "/icon-512.png", sizes: "512x512", type: "image/png" },
|
|
],
|
|
shortcut: [{ url: "/favicon-source.svg", type: "image/svg+xml" }],
|
|
apple: [{ url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" }],
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
interactiveWidget: "resizes-content",
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#f4f8fc" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#111923" },
|
|
],
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="ru" suppressHydrationWarning>
|
|
<head>
|
|
<meta name="color-scheme" content="light dark" />
|
|
<script dangerouslySetInnerHTML={{ __html: getThemeInitScript() }} />
|
|
<script dangerouslySetInnerHTML={{ __html: getMobileNavPlacementInitScript() }} />
|
|
</head>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
>
|
|
<Providers>{children}</Providers>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|