style(docs): optimize font display for code blocks using Ubuntu Mono
This commit is contained in:
@@ -7,7 +7,7 @@ export default defineConfig({
|
||||
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' }],
|
||||
['link', { rel: 'stylesheet', href: 'https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@400;500;700&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap' }],
|
||||
['script', {}, `if (navigator.userAgent.indexOf('Windows') !== -1) document.documentElement.classList.add('is-windows');`]
|
||||
],
|
||||
themeConfig: {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
:root {
|
||||
--vp-font-family-mono: "Ubuntu Mono", "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--vp-code-font-size: 14px;
|
||||
}
|
||||
|
||||
/* 仅在 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;
|
||||
|
||||
Reference in New Issue
Block a user