Skip to content

Commit a357c77

Browse files
committed
chine fonts
1 parent bc6215d commit a357c77

6 files changed

Lines changed: 542 additions & 5 deletions

File tree

app/(private)/philipino/page.md

Lines changed: 465 additions & 0 deletions
Large diffs are not rendered by default.

app/globals.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
@import "../styles/hamburger.css";
1717
@import "../styles/typesetting-article.css";
1818

19+
@import "../styles/i81n/chinese.css";
20+
1921
@custom-variant dark (&:where(.dark, .dark *));
2022
@custom-variant light (&:where(.light, .light *));
2123

@@ -69,6 +71,7 @@
6971

7072
font-family:
7173
SurveyWithCode,
74+
SurveyWithCodeChina,
7275
Katex_Main,
7376
"Segoe UI",
7477
TTT,

app/layout.jsx

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,38 @@ const surveyWithCodeFonts = localFont({
4040
display: "swap",
4141
})
4242

43+
const surveyWithCodeChinese = localFont({
44+
src: [
45+
{
46+
path: "./../public/fonts/chinese/SurveyWithCodeChina-Light.woff2",
47+
weight: "300",
48+
style: "normal",
49+
},
50+
{
51+
path: "./../public/fonts/chinese/SurveyWithCodeChina-Regular.woff2",
52+
weight: "400",
53+
style: "normal",
54+
},
55+
{
56+
path: "./../public/fonts/chinese/SurveyWithCodeChina-Medium.woff2",
57+
weight: "500",
58+
style: "normal",
59+
},
60+
{
61+
path: "./../public/fonts/chinese/SurveyWithCodeChina-SemiBold.woff2",
62+
weight: "600",
63+
style: "normal",
64+
},
65+
{
66+
path: "./../public/fonts/chinese/SurveyWithCodeChina-Bold.woff2",
67+
weight: "700",
68+
style: "normal",
69+
},
70+
],
71+
variable: "--font-survey-code-chinese",
72+
display: "swap",
73+
})
74+
4375
export const metadata = {
4476
title: "SurveyWithCode - From Research to Reproducibility",
4577
description:
@@ -53,9 +85,9 @@ export const metadata = {
5385

5486
export default async function RootLayout({ children }) {
5587
// const themeConfig = useThemeConfig()
56-
88+
// ${surveyWithCodeChinese.className}
5789
return (
58-
<html lang="en" suppressHydrationWarning dir="ltr" className={surveyWithCodeFonts.className}>
90+
<html lang="en" suppressHydrationWarning dir="ltr" className={`${surveyWithCodeFonts.variable}`}>
5991
<head>
6092
<meta charSet="utf-8" />
6193
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
@@ -86,9 +118,7 @@ export default async function RootLayout({ children }) {
86118
<AuthProvider>
87119
<div dir="ltr" className="min-h-screen w-full">
88120
<Header />
89-
<div className="w-full">
90-
{children}
91-
</div>
121+
<div className="w-full">{children}</div>
92122
<Footer />
93123
</div>
94124
</AuthProvider>

styles/chinese.css

Whitespace-only changes.

styles/i81n/chinese.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@font-face {
2+
font-family: 'SurveyWithCodeChina';
3+
src: url('/fonts/chinese/SurveyWithCodeChina-Light.woff2') format('woff2');
4+
font-weight: 300;
5+
font-style: normal;
6+
font-display: swap;
7+
}
8+
9+
@font-face {
10+
font-family: 'SurveyWithCodeChina';
11+
src: url('/fonts/chinese/SurveyWithCodeChina-Regular.woff2') format('woff2');
12+
font-weight: 400;
13+
font-style: normal;
14+
font-display: swap;
15+
}
16+
17+
@font-face {
18+
font-family: 'SurveyWithCodeChina';
19+
src: url('/fonts/chinese/SurveyWithCodeChina-Medium.woff2') format('woff2');
20+
font-weight: 500;
21+
font-style: normal;
22+
font-display: swap;
23+
}
24+
25+
@font-face {
26+
font-family: 'SurveyWithCodeChina';
27+
src: url('/fonts/chinese/SurveyWithCodeChina-SemiBold.woff2') format('woff2');
28+
font-weight: 600;
29+
font-style: normal;
30+
font-display: swap;
31+
}
32+
33+
@font-face {
34+
font-family: 'SurveyWithCodeChina';
35+
src: url('/fonts/chinese/SurveyWithCodeChina-Bold.woff2') format('woff2');
36+
font-weight: 700;
37+
font-style: normal;
38+
font-display: swap;
39+
}
File renamed without changes.

0 commit comments

Comments
 (0)