Skip to content

Commit 00e6295

Browse files
committed
修复移动端顶部导航遮挡和 CI pnpm 版本报错
- 移动端文档页和首页内容添加 padding-top 避开 VPLocalNav 汉堡菜单 - VPLocalNav 添加背景色和边框样式 - CI workflow 中 pnpm/action-setup 显式指定 version: 9,解决 Node 20 弃用警告和 pnpm 版本未指定报错
1 parent 76e0792 commit 00e6295

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121

2222
- name: Setup pnpm
2323
uses: pnpm/action-setup@v4
24+
with:
25+
version: 9
2426

2527
- name: Setup Node
2628
uses: actions/setup-node@v4

docs/.vitepress/theme/styles/cysj-home.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@
280280
/* ---------- 首页移动端 ---------- */
281281
@media (max-width: 960px) {
282282
.cysj-home-page .VPHomeHero {
283-
padding-top: 44px;
284-
padding-bottom: 32px;
283+
padding-top: clamp(44px, 6vw, 56px);
284+
padding-bottom: clamp(24px, 4vw, 32px);
285285
}
286286

287287
.cysj-home-page .VPHomeHero .main {
@@ -296,6 +296,11 @@
296296
max-width: 680px;
297297
font-size: clamp(1.18rem, 0.98rem + 1.8vw, 1.68rem);
298298
}
299+
300+
/* 首页移动端内容避开 VPLocalNav */
301+
.cysj-home-page .VPHome {
302+
padding-top: 64px;
303+
}
299304
}
300305

301306
@media (max-width: 640px) {

docs/.vitepress/theme/styles/cysj-layout.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,12 @@
331331
background-color: rgba(96, 165, 250, 0.45);
332332
}
333333

334+
/* ---------- 移动端汉堡导航栏 ---------- */
335+
.VPLocalNav {
336+
border-bottom: 1px solid var(--vp-c-divider-light) !important;
337+
background: var(--vp-c-bg) !important;
338+
}
339+
334340
/* ---------- 移动端 ---------- */
335341
@media (max-width: 960px) {
336342
.VPDoc .content-container {
@@ -342,6 +348,11 @@
342348
.VPSidebar {
343349
padding-top: 4px;
344350
}
351+
352+
/* 移动端文档页内容避开 VPLocalNav */
353+
.VPDoc .content {
354+
padding-top: 64px;
355+
}
345356
}
346357

347358
@media (max-width: 640px) {

0 commit comments

Comments
 (0)