-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
layout.tsx
96 lines (89 loc) · 2.44 KB
/
layout.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import "@/styles/globals.css";
import { Metadata } from "next";
import { Analytics } from "@vercel/analytics/react";
import { siteConfig } from "@/app/site-config";
import { cn } from "@/lib/cn";
import { SiteHeader } from "@/components/site-header";
import { TailwindIndicator } from "@/components/tailwind-indicator";
import { ThemeProvider } from "@/components/theme-provider";
import { JetBrains_Mono, Inter } from "next/font/google";
import localFont from "next/font/local";
const fontSans = Inter({
subsets: ["latin"],
variable: "--font-sans",
});
const fontCal = localFont({
src: "../styles/calsans.ttf",
variable: "--font-cal",
display: "swap",
});
const fontMono = JetBrains_Mono({
subsets: ["latin"],
variable: "--font-mono",
});
export const metadata: Metadata = {
metadataBase: new URL("https://env.t3.gg"),
title: {
default: siteConfig.name,
template: `%s - ${siteConfig.name}`,
},
description: siteConfig.description,
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "white" },
{ media: "(prefers-color-scheme: dark)", color: "black" },
],
icons: {
icon: "/favicon.ico",
shortcut: "/favicon-16x16.png",
apple: "/apple-touch-icon.png",
},
openGraph: {
type: "website",
locale: "en_US",
title: siteConfig.name,
description: siteConfig.description,
images: [
{
url: "/opengraph-image.png",
width: 910,
height: 455,
alt: siteConfig.name,
},
],
},
twitter: {
card: "summary_large_image",
title: siteConfig.name,
description: siteConfig.description,
images: [{ url: "/opengraph-image.png" }],
},
};
interface RootLayoutProps {
children: React.ReactNode;
}
export default function RootLayout({ children }: RootLayoutProps) {
return (
<>
<html lang="en" suppressHydrationWarning className="bg-background">
<head />
<body
className={cn(
"min-h-screen font-sans antialiased",
fontSans.variable,
fontCal.variable,
fontMono.variable
)}
>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<div className="relative flex min-h-screen flex-col">
<SiteHeader />
<div className="flex-1">{children}</div>
</div>
<TailwindIndicator />
</ThemeProvider>
<Analytics />
</body>
</html>
</>
);
}