Skip to content

Commit e4ead0a

Browse files
committed
更新主题
1 parent a08e994 commit e4ead0a

File tree

3 files changed

+55
-4
lines changed

3 files changed

+55
-4
lines changed

.vitepress/config.mts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export default defineConfig({
99
sidebar: [
1010
{
1111
items: [
12-
{ text: '01 课程概览与 shell', link: '/01/README' },
13-
{ text: '02 Shell 工具和脚本', link: '/02/README' },
12+
{ text: '01. 课程概览与 shell', link: '/01/README' },
13+
{ text: '02. Shell 工具和脚本', link: '/02/README' },
1414
],
1515
},
1616
],
@@ -21,7 +21,5 @@ export default defineConfig({
2121
},
2222
head: [
2323
['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }],
24-
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
25-
['link', { ref: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Libre+Caslon+Display&family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap' }]
2624
],
2725
})

.vitepress/theme/index.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Theme from 'vitepress/theme'
2+
import './style.css'
3+
4+
export default {
5+
extends: Theme,
6+
}

.vitepress/theme/style.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
:root {
2+
--vp-doc-top-height: 5rem;
3+
}
4+
5+
#VPSidebarNav {
6+
margin-top: var(--vp-doc-top-height);
7+
}
8+
9+
.main p {
10+
font-size: 1.1rem;
11+
line-height: 2.2rem;
12+
}
13+
14+
.main h1 {
15+
margin-top: 3rem;
16+
margin-bottom: 2rem;
17+
font-weight: bolder;
18+
font-size: 3.8rem;
19+
line-height: 1.2em;
20+
}
21+
22+
.main h2 {
23+
margin-bottom: 2rem;
24+
border-top: 0;
25+
font-size: 2.2rem;
26+
line-height: 1.2em;
27+
}
28+
29+
h2 > a {
30+
text-decoration: none;
31+
opacity: 0.3;
32+
}
33+
34+
h2 > a:hover {
35+
opacity: 0.9;
36+
}
37+
38+
.VPSidebarItem.level-0 > .item > .text {
39+
font-size: 0.8rem;
40+
letter-spacing: 2px;
41+
text-transform: uppercase;
42+
opacity: 0.5;
43+
}
44+
45+
.vp-doc :not(pre) > code {
46+
text-wrap: nowrap;
47+
}

0 commit comments

Comments
 (0)