From b4298602bff71acf1437ed8c76efd120d1418190 Mon Sep 17 00:00:00 2001 From: passthem Date: Fri, 27 Mar 2026 12:18:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E4=BD=93=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/fonts.css | 138 ++++++++++++++++++++++++++++++++++ src/layout/BaseLayout.astro | 1 + src/layout/BoringLayout.astro | 15 +--- 3 files changed, 140 insertions(+), 14 deletions(-) create mode 100644 src/assets/fonts.css diff --git a/src/assets/fonts.css b/src/assets/fonts.css new file mode 100644 index 0000000..e026613 --- /dev/null +++ b/src/assets/fonts.css @@ -0,0 +1,138 @@ +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-ExtraBold.woff2') format('woff2'); + font-weight: 800; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-ExtraBoldItalic.woff2') format('woff2'); + font-weight: 800; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-ExtraLight.woff2') format('woff2'); + font-weight: 200; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-ExtraLightItalic.woff2') format('woff2'); + font-weight: 200; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-Light.woff2') format('woff2'); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-LightItalic.woff2') format('woff2'); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-Medium.woff2') format('woff2'); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-MediumItalic.woff2') format('woff2'); + font-weight: 500; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-SemiBold.woff2') format('woff2'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-SemiBoldItalic.woff2') format('woff2'); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-Thin.woff2') format('woff2'); + font-weight: 100; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Maple Mono'; + src: url('https://cdn.passthem.top/fonts/MapleMonoNormal-NF-CN-ThinItalic.woff2') format('woff2'); + font-weight: 100; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "ZLabsRoundPix 16px M CN"; + src: url('https://cdn.passthem.top/fonts/ZLabsRoundPix_16px_M_CN.ttf.woff2') format('woff2'); + font-display: swap; +} + +:root { + --font-mono: 'Maple Mono NF CN', 'Maple Mono', monospace, var(--font-sans); + --font-sans: 'HarmonyOS Sans SC', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif; +} diff --git a/src/layout/BaseLayout.astro b/src/layout/BaseLayout.astro index ac9b426..61aeb92 100644 --- a/src/layout/BaseLayout.astro +++ b/src/layout/BaseLayout.astro @@ -1,5 +1,6 @@ --- import '../assets/style.css' +import '../assets/fonts.css' interface Props { title?: string diff --git a/src/layout/BoringLayout.astro b/src/layout/BoringLayout.astro index 9f2193e..24ae57b 100644 --- a/src/layout/BoringLayout.astro +++ b/src/layout/BoringLayout.astro @@ -18,20 +18,7 @@ const { title = '小帕的小窝' } = Astro.props