@@ -2,15 +2,44 @@ import "./globals.css"
22// import "./index.css"
33// import "../styles/custom.css"
44import { ThemeProvider } from "next-themes"
5+ import localFont from "next/font/local"
56import Body from "@/components/body"
67import Footer from "@/components/footer"
78import Header from "@/components/header"
89import { AuthProvider } from "@/contexts/auth"
910import ErrorBoundary from "@/components/ErrorBoundary"
11+ // import { SurveyWithCodeFonts } from "./fonts"
1012// import { NextAuthProviders } from "@/components/auth/auth-provider"
1113// import { AuthProvider } from "@/contexts/auth"
1214// import { useThemeConfig } from "@/contexts/theme";
1315
16+ const surveyWithCodeFonts = localFont ( {
17+ src : [
18+ {
19+ path : "./../public/serif/SurveyWithCode-Regular.woff2" ,
20+ weight : "500" ,
21+ style : "normal" ,
22+ } ,
23+ {
24+ path : "./../public/serif/SurveyWithCode-Italic.woff2" ,
25+ weight : "500" ,
26+ style : "italic" ,
27+ } ,
28+ {
29+ path : "./../public/serif/SurveyWithCode-Bold.woff2" ,
30+ weight : "700" ,
31+ style : "normal" ,
32+ } ,
33+ {
34+ path : "./../public/serif/SurveyWithCode-BoldItalic.woff2" ,
35+ weight : "700" ,
36+ style : "italic" ,
37+ } ,
38+ ] ,
39+ variable : "--font-survey-with-code" ,
40+ display : "swap" ,
41+ } )
42+
1443export const metadata = {
1544 title : "SurveyWithCode - From Research to Reproducibility" ,
1645 description :
@@ -26,7 +55,7 @@ export default async function RootLayout({ children }) {
2655 // const themeConfig = useThemeConfig()
2756
2857 return (
29- < html lang = "en" suppressHydrationWarning dir = "ltr" >
58+ < html lang = "en" suppressHydrationWarning dir = "ltr" className = { surveyWithCodeFonts . className } >
3059 < head >
3160 < meta charSet = "utf-8" />
3261 < meta name = "viewport" content = "width=device-width, initial-scale=1, shrink-to-fit=no" />
@@ -46,10 +75,10 @@ export default async function RootLayout({ children }) {
4675 < link rel = "mask-icon" href = "/safari-pinned-tab.svg" color = "#5bbad5" > </ link >
4776 < link rel = "manifest" href = "/site.webmanifest" > </ link >
4877
49- < link rel = "preload" href = "/serif/SurveyWithCode-Bold.woff2" as = "font" type = "font/woff2" crossorigin > </ link >
50- < link rel = "preload" href = "/serif/SurveyWithCode-BoldItalic.woff2" as = "font" type = "font/woff2" crossorigin > </ link >
51- < link rel = "preload" href = "/serif/SurveyWithCode-Regular.woff2" as = "font" type = "font/woff2" crossorigin > </ link >
52- < link rel = "preload" href = "/serif/SurveyWithCode-Italic.woff2" as = "font" type = "font/woff2" crossorigin > </ link >
78+ { /* <link rel="preload" href="/serif/SurveyWithCode-Bold.woff2" as="font" type="font/woff2"></link>
79+ <link rel="preload" href="/serif/SurveyWithCode-BoldItalic.woff2" as="font" type="font/woff2"></link>
80+ <link rel="preload" href="/serif/SurveyWithCode-Regular.woff2" as="font" type="font/woff2"></link>
81+ <link rel="preload" href="/serif/SurveyWithCode-Italic.woff2" as="font" type="font/woff2"></link> */ }
5382 </ head >
5483 < body className = "nextra-banner-hidden" >
5584 < ErrorBoundary >
0 commit comments