style(docs): adjust sidebar spacing and typography for better readability

Improve sidebar navigation spacing and line heights to enhance visual hierarchy and readability. Move CSS from external file to inline style in config for better maintainability.
This commit is contained in:
sanbuphy
2026-01-12 19:49:21 +08:00
parent 99c1fb9ba8
commit 49a92f466a
2 changed files with 49 additions and 1 deletions
+48 -1
View File
@@ -6,7 +6,54 @@ export default defineConfig({
description: 'Easy-Vibe 中文实战课 - 零基础学会用 AI 干实际工作',
head: [
['link', { rel: 'icon', href: '/logo.png' }],
['link', { rel: 'stylesheet', href: '/style.css' }]
[
'style',
{},
`
:root {
--vp-sidebar-nav-section-gap: 8px;
}
.VPSidebarItem.level-0 {
padding-bottom: 4px !important;
}
.VPSidebarItem.level-0 > .item {
padding-bottom: 2px !important;
}
.VPSidebarItem.level-1 .item,
.VPSidebarItem.level-2 .item,
.VPSidebarItem.level-3 .item,
.VPSidebarItem.level-4 .item {
padding-top: 2px !important;
padding-bottom: 2px !important;
min-height: 24px !important;
}
.VPSidebarGroup {
padding-top: 6px !important;
padding-bottom: 6px !important;
}
.VPSidebarItem.level-0 + .VPSidebarItem.level-1 {
margin-top: -2px !important;
}
.VPSidebarItem.level-0 .text {
line-height: 1.3 !important;
}
.VPSidebarItem.level-1 .text,
.VPSidebarItem.level-2 .text,
.VPSidebarItem.level-3 .text {
line-height: 1.4 !important;
padding: 0 !important;
}
.VPSidebarItem .VPLink {
padding-top: 2px !important;
padding-bottom: 2px !important;
min-height: auto !important;
}
.VPSidebarItem .item {
padding-top: 2px !important;
padding-bottom: 2px !important;
}
`
]
],
themeConfig: {
logo: '/logo.png',