docs: use Noto Sans SC font exclusively for Windows users
This commit is contained in:
@@ -6,6 +6,10 @@ export default defineConfig({
|
|||||||
description: '轻量易用的定时任务面板,支持多语言脚本、依赖管理与日志查看',
|
description: '轻量易用的定时任务面板,支持多语言脚本、依赖管理与日志查看',
|
||||||
base: '/baihu-panel/',
|
base: '/baihu-panel/',
|
||||||
lang: 'zh-CN',
|
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: {
|
themeConfig: {
|
||||||
logo: '/logo.svg',
|
logo: '/logo.svg',
|
||||||
nav: [
|
nav: [
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import DefaultTheme from 'vitepress/theme'
|
||||||
|
import './custom.css'
|
||||||
|
|
||||||
|
export default DefaultTheme
|
||||||
Reference in New Issue
Block a user