This commit is contained in:
2025-10-06 14:49:37 +08:00
parent 135508954d
commit 0014eae353
9 changed files with 15 additions and 39 deletions

View File

@@ -22,7 +22,7 @@
body {
background: var(--background);
color: var(--foreground);
font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
font-family: "Source Han Sans SC VF", var(--font-geist-sans), Arial, Helvetica, sans-serif;
}
.code-block {

View File

@@ -1,7 +1,13 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import localFont from "next/font/local";
import Head from "next/head";
import type { Viewport } from 'next'
export const viewport: Viewport = {
width: 'device-width',
initialScale: 1.0
}
const geistSans = Geist({
variable: "--font-geist-sans",
@@ -13,45 +19,9 @@ const geistMono = Geist_Mono({
subsets: ["latin"],
});
const sourceHanSansSC = localFont({
src: [
{
path: '../../public/fonts/SourceHanSansSC-ExtraLight.otf',
weight: '200',
style: 'normal'
},
{
path: '../../public/fonts/SourceHanSansSC-Light.otf',
weight: '300',
style: 'normal'
},
{
path: '../../public/fonts/SourceHanSansSC-Regular.otf',
weight: '400',
style: 'normal'
},
{
path: '../../public/fonts/SourceHanSansSC-Medium.otf',
weight: '500',
style: 'normal'
},
{
path: '../../public/fonts/SourceHanSansSC-Bold.otf',
weight: '700',
style: 'normal'
},
{
path: '../../public/fonts/SourceHanSansSC-Heavy.otf',
weight: '900',
style: 'normal'
}
]
});
export const metadata: Metadata = {
title: "Learn Languages",
description: "A Website to Learn Languages",
viewport: 'width=device-width, initial-scale=1.0',
};
export default function RootLayout({
@@ -61,8 +31,14 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<Head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/cn-fontsource-source-han-sans-sc-vf@1.0.10/font.min.css"
/>
</Head>
<body
className={`${geistSans.variable} ${geistMono.variable} ${sourceHanSansSC.className} antialiased`}
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>