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
|
import { createMetadata } from '@/lib/metadata';
import type { Viewport } from 'next';
import { Geist, Geist_Mono } from 'next/font/google';
import type { ReactNode } from 'react';
import '@/styles/globals.css';
import 'katex/dist/katex.css';
import { baseUrl } from '@/lib/constants';
import { Body } from '@/app/(main)/layout.client';
import { description as homeDescription } from '@/app/(main)/layout.config';
import { Provider } from '@/app/(main)/provider';
const geistSans = Geist({
variable: '--font-geist-sans',
subsets: ['latin'],
});
const geistMono = Geist_Mono({
variable: '--font-geist-mono',
subsets: ['latin'],
});
export const metadata = createMetadata({
title: {
template: '%s | Blog',
default: 'Blog',
},
description: homeDescription,
metadataBase: baseUrl,
});
export const viewport: Viewport = {
themeColor: [
{ media: '(prefers-color-scheme: dark)', color: '#0A0A0A' },
{ media: '(prefers-color-scheme: light)', color: '#fff' },
],
};
const RootLayout = ({ children }: { children: ReactNode }) => {
return (
<html
lang='en'
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
suppressHydrationWarning
>
<Body>
<Provider>{children}</Provider>
</Body>
</html>
);
};
export default RootLayout;
|