Skip to content

Commit a764a8b

Browse files
committed
update fonts path
1 parent ea2680d commit a764a8b

File tree

4 files changed

+81
-16
lines changed

4 files changed

+81
-16
lines changed

app/fonts.jsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import localFont from "next/font/local";
2+
3+
export const SurveyWithCodeFonts = localFont({
4+
src: [
5+
{
6+
path: "/serif/SurveyWithCode-Regular.woff2",
7+
weight: "500",
8+
style: "normal",
9+
},
10+
{
11+
path: "/serif/SurveyWithCode-Italic.woff2",
12+
weight: "500",
13+
style: "italic",
14+
},
15+
{
16+
path: "/serif/SurveyWithCode-Bold.woff2",
17+
weight: "700",
18+
style: "normal",
19+
},
20+
{
21+
path: "/serif/SurveyWithCode-BoldItalic.woff2",
22+
weight: "700",
23+
style: "italic",
24+
},
25+
],
26+
variable: "--font-survey-with-code",
27+
display: "swap",
28+
})

app/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import "tailwindcss";
22

3-
@import "./fonts.css";
3+
/* @import "./fonts.css"; */
44
@import "./mathfonts.css";
55
@import "./colors.css";
66

app/layout.jsx

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,44 @@ import "./globals.css"
22
// import "./index.css"
33
// import "../styles/custom.css"
44
import { ThemeProvider } from "next-themes"
5+
import localFont from "next/font/local"
56
import Body from "@/components/body"
67
import Footer from "@/components/footer"
78
import Header from "@/components/header"
89
import { AuthProvider } from "@/contexts/auth"
910
import 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+
1443
export 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>

public/sitemap-0.xml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
3-
<url><loc>https://surveywithcode.github.io/contact</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
4-
<url><loc>https://surveywithcode.github.io/error</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
5-
<url><loc>https://surveywithcode.github.io/markdown</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
6-
<url><loc>https://surveywithcode.github.io/getting-started</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
7-
<url><loc>https://surveywithcode.github.io/result</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
8-
<url><loc>https://surveywithcode.github.io/leaderboard</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
9-
<url><loc>https://surveywithcode.github.io/about</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
10-
<url><loc>https://surveywithcode.github.io</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
11-
<url><loc>https://surveywithcode.github.io/rating</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
12-
<url><loc>https://surveywithcode.github.io/question</loc><lastmod>2025-08-01T21:40:06.236Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
3+
<url><loc>https://surveywithcode.github.io/hierarchy</loc><lastmod>2025-08-08T22:58:42.073Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
4+
<url><loc>https://surveywithcode.github.io/ttsflow</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
5+
<url><loc>https://surveywithcode.github.io/topic</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
6+
<url><loc>https://surveywithcode.github.io</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
7+
<url><loc>https://surveywithcode.github.io/about</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
8+
<url><loc>https://surveywithcode.github.io/indentedtree</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
9+
<url><loc>https://surveywithcode.github.io/markdown</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
10+
<url><loc>https://surveywithcode.github.io/leaderboard</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
11+
<url><loc>https://surveywithcode.github.io/trans</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
12+
<url><loc>https://surveywithcode.github.io/rating</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
13+
<url><loc>https://surveywithcode.github.io/getting-started</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
14+
<url><loc>https://surveywithcode.github.io/sample</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
15+
<url><loc>https://surveywithcode.github.io/graph</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
16+
<url><loc>https://surveywithcode.github.io/question</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
17+
<url><loc>https://surveywithcode.github.io/taxonomy</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
18+
<url><loc>https://surveywithcode.github.io/error</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
19+
<url><loc>https://surveywithcode.github.io/result</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
20+
<url><loc>https://surveywithcode.github.io/contact</loc><lastmod>2025-08-08T22:58:42.074Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
1321
</urlset>

0 commit comments

Comments
 (0)