Skip to content

Commit 3d9ac27

Browse files
committed
style: opt
1 parent c40aa21 commit 3d9ac27

File tree

5 files changed

+76
-5
lines changed

5 files changed

+76
-5
lines changed

docs/.vitepress/config/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function nav(): DefaultTheme.NavItem[] {
157157
text: 'Guide',
158158
activeMatch: '/guide/',
159159
items: [
160-
{ text: 'Introduction', link: '/guide/' },
160+
{ text: 'Introduction', link: '/guide' },
161161
{ text: 'Getting Started', link: '/guide/getting-started' },
162162
{ text: '🫶 Migrate to v2 version', link: '/guide/migrate' }
163163
]

docs/.vitepress/config/zh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function nav(): DefaultTheme.NavItem[] {
184184
text: '指南',
185185
activeMatch: '/zh/guide/',
186186
items: [
187-
{ text: '介绍', link: '/zh/guide/' },
187+
{ text: '介绍', link: '/zh/guide' },
188188
{ text: '开始使用', link: '/zh/guide/getting-started' },
189189
{ text: '🫶 迁移到 v2 版本', link: '/zh/guide/migrate' }
190190
]

docs/.vitepress/theme/styles.css

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,53 @@
1414
--vp-home-hero-image-background-image: linear-gradient(-45deg,
1515
#42d392 50%,
1616
#647eff 50%);
17+
--vhp-demo-shadow-color: rgba(0, 0, 0, 0.3);
18+
--vp-code-line-number-color: var(--vp-c-text-dark-3);
19+
}
20+
21+
.dark {
22+
--vhp-demo-shadow-color: rgba(188, 189, 190, 0.3);
23+
24+
/* 暗黑模式拟物圆角 - 突出版 */
25+
.vitepress-demo {
26+
border-radius: 8px;
27+
overflow: hidden;
28+
margin-top: 8px;
29+
background: #121212;
30+
/* 更深的背景色 */
31+
box-shadow:
32+
4px 4px 8px rgba(0, 0, 0, 0.5),
33+
/* 更强的阴影 */
34+
-4px -4px 8px rgba(80, 80, 80, 0.3),
35+
/* 更亮的高光 */
36+
inset 0 0 10px rgba(0, 0, 0, 0.2);
37+
/* 添加内阴影增加层次感 */
38+
border: none;
39+
}
40+
41+
42+
}
43+
44+
/* 亮色模式拟物圆角 - 突出版 */
45+
.vitepress-demo {
46+
border-radius: 8px !important;
47+
overflow: hidden;
48+
margin-top: 8px;
49+
background: #ffffff;
50+
/* 更亮的背景色 */
51+
box-shadow:
52+
4px 4px 8px rgba(0, 0, 0, 0.1),
53+
/* 更强的阴影 */
54+
-4px -4px 8px rgba(255, 255, 255, 0.8),
55+
/* 更亮的高光 */
56+
inset 0 0 10px rgba(0, 0, 0, 0.05);
57+
/* 添加内阴影增加层次感 */
58+
border: none;
1759
}
1860

1961
input {
2062
opacity: 1;
21-
background-color: var(--vhp-func-bg);
63+
background-color: var(--vp-code-bg);
2264
padding-left: 8px;
2365
height: 36px;
2466
font-weight: 500;

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hero:
99
actions:
1010
- theme: brand
1111
text: Quick Start
12-
link: /guide
12+
link: /guide/
1313
- theme: alt
1414
text: Hooks list
1515
link: /hooks/useRequest/quick-start

docs/zh/index.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hero:
99
actions:
1010
- theme: brand
1111
text: 快速开始
12-
link: /zh/guide
12+
link: /zh/guide/
1313
- theme: alt
1414
text: Hooks 列表
1515
link: /zh/hooks/useRequest/quick-start
@@ -39,3 +39,32 @@ features:
3939
details: 测试完善,安全可靠。
4040
---
4141

42+
<script setup>
43+
import {
44+
VPTeamPage,
45+
VPTeamPageTitle,
46+
VPTeamMembers,
47+
VPTeamPageSection
48+
} from 'vitepress/theme'
49+
50+
import {members} from '../contributors'
51+
52+
</script>
53+
54+
<VPTeamPage>
55+
<VPTeamPageTitle>
56+
<template #title>团队</template>
57+
<template #lead>Vue Hooks Plus 由一群热爱 Vue 的开发者开发和维护。</template>
58+
</VPTeamPageTitle>
59+
<VPTeamMembers size="small" :members="members" />
60+
<VPTeamPageSection>
61+
<template #title>贡献者</template>
62+
<template #members>
63+
<div style="display: flex; justify-content: center;">
64+
<a target="__blank" href="https://github.com/InhiblabCore/vue-hooks-plus/graphs/contributors">
65+
<img src="https://contrib.rocks/image?repo=InhiblabCore/vue-hooks-plus" />
66+
</a>
67+
</div>
68+
</template>
69+
</VPTeamPageSection>
70+
</VPTeamPage>

0 commit comments

Comments
 (0)