docs: use Noto Sans SC font exclusively for Windows users

This commit is contained in:
duorameng
2026-06-23 14:30:54 +08:00
parent 06d121416e
commit b0dd1dd0ae
3 changed files with 12 additions and 0 deletions
+4
View File
@@ -6,6 +6,10 @@ export default defineConfig({
description: '轻量易用的定时任务面板,支持多语言脚本、依赖管理与日志查看',
base: '/baihu-panel/',
lang: 'zh-CN',
head: [
['link', { rel: 'stylesheet', href: 'https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap' }],
['script', {}, `if (navigator.userAgent.indexOf('Windows') !== -1) document.documentElement.classList.add('is-windows');`]
],
themeConfig: {
logo: '/logo.svg',
nav: [
+4
View File
@@ -0,0 +1,4 @@
/* 仅在 Windows 下优先使用 Noto Sans SC (思源黑体),其他系统保持系统默认字体或 Inter */
.is-windows {
--vp-font-family-base: "Inter", "Noto Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
+4
View File
@@ -0,0 +1,4 @@
import DefaultTheme from 'vitepress/theme'
import './custom.css'
export default DefaultTheme