Skip to content

Commit 1691069

Browse files
committed
docs: opt docs config
1 parent 61b264b commit 1691069

File tree

4 files changed

+35
-82
lines changed

4 files changed

+35
-82
lines changed

packages/docs/.vitepress/config.mjs

+9-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
items: [
2121
{ text: "简介", link: "/get-started/" },
2222
{ text: "如何注册?", link: "/get-started/how-to-register" },
23-
{ text: "快速开始", link: "/get-started/quick-start" },
23+
// { text: "快速开始", link: "/get-started/quick-start" },
2424
],
2525
},
2626
{
@@ -46,7 +46,14 @@ export default defineConfig({
4646
},
4747
editLink: {
4848
pattern: "https://github.com/cuixueshe/earthworm/packages/docs/:path",
49-
text: "Edit this page on GitHub",
49+
text: "在 GitHub 上编辑此页面",
50+
},
51+
lastUpdated: {
52+
text: "最后更新于",
53+
},
54+
docFooter: {
55+
prev: "上一页",
56+
next: "下一页",
5057
},
5158
},
5259
});

packages/docs/.vitepress/theme/style.css

+19-73
Original file line numberDiff line numberDiff line change
@@ -23,79 +23,35 @@
2323
--c-green-3: #51a256;
2424
--c-green-soft: #316334;
2525

26-
/* light theme is a bit different */
27-
--vp-c-brand-1: var(--vp-c-green-1);
28-
--vp-c-brand-2: var(--vp-c-green-2);
29-
--vp-c-brand-3: var(--vp-c-green-3);
30-
--vp-c-brand-soft: var(--vp-c-green-soft);
31-
3226
--c-text-dark-1: #d9e6eb;
3327
--c-text-dark-2: #c4dde6;
3428
--c-text-dark-3: #abc4cc;
3529
--c-text-light-1: #2c3e50;
3630
--c-text-light-2: #476582;
3731
--c-text-light-3: #90a4b7;
3832

39-
--vp-c-brand-dark: var(--c-green-soft);
40-
--vp-c-brand-darker: var(--c-green-soft);
41-
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
42-
--vp-c-brand-text: var(--c-text-light-1);
43-
--c-bg-accent: var(--c-white-dark);
44-
--code-bg-color: var(--c-white-dark);
45-
--code-inline-bg-color: var(--c-white-dark);
4633
--code-font-family: "dm", source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
4734
--code-font-size: 16px;
4835

49-
--vp-code-block-bg: var(--vp-c-bg-alt);
50-
--vp-code-line-highlight-color: rgba(0, 0, 0, 0.075);
51-
--vp-code-color: var(--vp-text-color);
36+
/* 链接和高亮语法的颜色 */
37+
--highlight-color: #3451b2;
5238
}
5339

5440
html.dark:root {
55-
/* --c-black: #ffffff;
56-
--c-white: #000000; */
57-
/* --c-divider-light: rgba(60, 60, 67, 0.12);
58-
--c-divider-dark: rgba(84, 84, 88, 0.48); */
59-
/* --c-brand-light: var(--c-yellow-light); */
60-
6141
--vp-c-brand-1: var(--c-yellow-1);
6242
--vp-c-brand-2: var(--c-yellow-2);
6343
--vp-c-brand-3: var(--c-yellow-3);
6444

65-
--vp-c-bg-alpha-with-backdrop: rgba(20, 25, 36, 0.7);
66-
--vp-c-bg-alpha-without-backdrop: rgba(20, 25, 36, 0.9);
45+
--vp-c-bg: var(--c-black);
46+
--vp-c-bg-soft: var(--c-black-light);
47+
--vp-c-bg-alt: #0d121b;
6748

6849
--vp-code-line-highlight-color: rgba(0, 0, 0, 0.5);
6950

7051
--vp-c-text-1: var(--c-text-dark-1);
7152
--vp-c-brand-text: var(--c-text-light-1);
72-
--c-text-light: var(--c-text-dark-2);
73-
--c-text-lighter: var(--c-text-dark-3);
74-
--c-divider: var(--c-divider-dark);
75-
--c-bg-accent: var(--c-black-light);
76-
/* --vp-code-inline-bg: var(--vp-c-black-light); */
77-
78-
--vp-c-bg: var(--c-black);
79-
--vp-c-bg-soft: var(--c-black-light);
80-
--vp-c-bg-soft-up: var(--c-black-lighter);
81-
--vp-c-bg-mute: var(--c-black-light);
82-
--vp-c-bg-soft-mute: var(--c-black-lighter);
83-
--vp-c-bg-alt: #0d121b;
84-
--vp-c-bg-elv: var(--vp-c-bg-soft);
85-
--vp-c-bg-elv-mute: var(--vp-c-bg-soft-mute);
86-
--vp-c-mute: var(--vp-c-bg-mute);
87-
--vp-c-mute-dark: var(--c-black-lighter);
88-
--vp-c-mute-darker: var(--c-black-darker);
89-
90-
--vp-home-hero-name-background: -webkit-linear-gradient(
91-
78deg,
92-
var(--c-yellow-2) 30%,
93-
var(--c-green-2)
94-
);
95-
}
9653

97-
html.dark .DocSearch {
98-
--docsearch-hit-active-color: var(--c-text-light-1);
54+
--highlight-color: #a76fdc;
9955
}
10056

10157
/**
@@ -151,31 +107,17 @@ html.dark .DocSearch {
151107
}
152108
}
153109

154-
.become-sponsor {
155-
font-size: 0.9em;
156-
font-weight: 700;
157-
width: auto;
158-
text-align: center;
159-
background-color: transparent;
160-
padding: 0.75em 2em;
161-
border-radius: 2em;
162-
transition: all 0.15s ease;
163-
box-sizing: border-box;
164-
border: 2px solid var(--c-yellow-2);
165-
}
166-
167-
.become-sponsor:hover {
168-
background-color: var(--c-yellow-1);
169-
text-decoration: none;
170-
border-color: var(--c-yellow-1);
171-
color: var(--c-text-light-1);
172-
}
173-
174110
.vp-doc a {
175111
text-decoration: none;
112+
color: var(--highlight-color); /* 应用链接颜色 */
176113
}
177114
.vp-doc a:hover {
178115
text-decoration: underline;
116+
color: var(--highlight-color); /* 应用链接颜色 */
117+
}
118+
119+
.vp-doc code {
120+
color: var(--highlight-color); /* 应用高亮语法的颜色 */
179121
}
180122

181123
.sponsors-top .become-sponsor {
@@ -191,9 +133,13 @@ kbd {
191133
font-size: 0.65em;
192134
color: var(--vp-c-text-1);
193135
vertical-align: middle;
194-
background-color: var(--vp-c-bg-mute);
195-
border: solid 1px var(--vp-c-bg-soft-mute);
136+
background-color: var(--vp-c-bg-soft);
137+
border: solid 1px var(--vp-c-bg-alt);
196138
border-radius: 6px;
197-
box-shadow: inset 0 -1px 0 var(--vp-c-bg-soft-mute);
139+
box-shadow: inset 0 -1px 0 var(--vp-c-bg-alt);
198140
line-height: 0.95em;
199141
}
142+
143+
#local-search {
144+
width: 400px;
145+
}

packages/docs/get-started/index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# What
1+
# 简介
22

3-
[Earthworm](https://earthworm.cuixueshe.com/) 是一款让你上瘾的英语学习工具,它使用**连词成句****i + 1****以终为始**等学习理论来帮助你习得英语,通过不断的**重复**形成肌肉记忆,最重要的是**游戏化**的形式让学习英语从此不再痛苦。
3+
[Earthworm](https://earthworm.cuixueshe.com/) 是一款让你上瘾的英语学习工具,它使用`连词成句``i + 1``以终为始`等学习理论来帮助你习得英语,通过不断的`重复`形成肌肉记忆,最重要的是`游戏化`的形式让学习英语从此不再痛苦。
44

55
![](/home-page-preview.png)
66

@@ -9,8 +9,8 @@
99
1. `听力`:该网站提供了`听力模式`, 你可以用它来提高你的英语听力
1010
2. 语法:`单词 -> 短语 -> 句子`, 会让你了解某个单词在短语,句子中的位置
1111
3. 单词:这一点也是该网站宣传的重点: `连词成句`
12-
4. `i+1(可理解)`:这一点很重要, 如果你一开始就选择很难的输入材料,我相信很多人坚持不了多久...
13-
5. `有趣`这一点占用你 15 分钟时间, 你可以自行使用后可知
14-
6. `足量`:目前该网站提供了 `零基础英语``高考写作课程``小猪佩奇(第一季)`,后续还会添加更多课程
12+
4. `i+1(可理解)`:这一点很重要, 如果你一开始就选择很难的输入材料, 我相信很多人坚持不了多久...
13+
5. `有趣`模式众多,欢迎体验。
14+
6. `足量`:目前该网站提供了 `零基础英语``高考写作课程``小猪佩奇(第一季)`等课程,还支持用户`自定义上传课程`后续还会持续添加更多课程
1515
7. `重复`:这个网站会将你学习的内容, 拆分到后续的课程中,帮你达到重复,回顾的效果.
16-
8. 音乐模式(支持中):这个模式很新颖, 用户可上传或使用内置的音乐来学习
16+
8. 音乐模式(支持中):一种新模式, 用户可上传或使用内置的音乐来学习

packages/docs/question/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 常见问题
1+
# 常见问题
22

33
### 如何向开发团队提出更多的功能需求?
44

0 commit comments

Comments
 (0)