Newer
Older
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
import "/app/globals.css";
import "@mantine/core/styles.css";
import "@mantine/dates/styles.css";
import "@mantine/notifications/styles.css";
import "@mantine/tiptap/styles.css";
import { Source_Sans_3 } from "next/font/google";
import { ColorSchemeScript, createTheme } from "@mantine/core";
import { getStaticParams } from "/locales/server";
import { setStaticParamsLocale } from "next-international/server";
import I18nWrapper from "/components/i18nWrapper";
import Navbar from "/components/navbar";
import Footer from "/components/footer";
const ss3 = Source_Sans_3({
subsets: ["latin"],
display: "swap",
});
export function generateStaticParams() {
return getStaticParams();
}
export default async function RootLayout({ children, params }) {
const locale = params?.locale || "en";
setStaticParamsLocale(locale || "en");
const theme = createTheme({
colors: {
blue: [
"#d6e4f7",
"#b8c9e0",
"#9aaeca",
"#7d94b4",
"#5f799d",
"#415e87",
"#244471",
"#193358",
"#0e223f",
"#041126",
],
orange: [
"#f2c28a",
"#f2b878",
"#f2af66",
"#f2a655",
"#f29c43",
"#f29331",
"#f28a20",
"#c26f19",
"#935413",
"#64390d",
],
},
primaryColor: "blue",
primaryShade: {
light: 6,
dark: 5,
},
});
return (
<html lang={locale} className={ss3.className}>
<head>
<ColorSchemeScript defaultColorScheme="auto" />
</head>
<body>
<div
className={`flex min-h-screen flex-col justify-between bg-white dark:bg-zinc-900 dark:text-white relative ${ss3.className}`}
>
<Navbar locale={locale} />
<main className="grow">
<I18nWrapper locale={locale} theme={theme}>
{children}
</I18nWrapper>
</main>
<Footer />
</div>
</body>
</html>
);
}