Skip to content

Commit e557346

Browse files
committed
refactor: Refactor theme configuration and remove unused files
- Updated primary color in mkdocs.yml to a hex value. - Changed custom directory from "theme" to "overrides" in mkdocs.yml. - Removed unused CSS files: custom.css, termynal.css, and extra.css. - Cleaned up JavaScript files by deleting custom.js and termynal.js. - Removed unnecessary HTML and SVG files from the theme directory. - Updated index.md to hide the call-to-action section and added a user termynal class for better styling.
1 parent d383ad5 commit e557346

30 files changed

+70
-13645
lines changed

docs/css/custom.css

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/css/extra.css

Lines changed: 65 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,185 +1,80 @@
1-
/* 导航栏 */
2-
.md-header {
3-
background-color: #4051b5 !important; /* !important 确保覆盖主题默认样式 */
4-
}
1+
/* ===============================
2+
自定义进度条
3+
=============================== */
54

6-
/*导航标签栏 */
7-
.md-tabs {
8-
background-color: #4051b5 !important;
5+
.progress {
6+
display: block;
7+
width: 100%;
8+
margin: 0.5rem 0;
9+
height: 1.2rem;
10+
background-color: #eeeeee;
11+
position: relative;
912
}
1013

11-
/* 侧边栏仓库链接区域 */
12-
.md-nav__source {
13-
background-color: #4051b5 !important;
14+
.progress-bar {
15+
float: left;
16+
height: 1.2rem;
17+
background-color: #2979ff;
1418
}
1519

1620
.progress-label {
1721
position: absolute;
18-
text-align: center;
19-
font-weight: 700;
2022
width: 100%;
2123
margin: 0;
24+
text-align: center;
25+
font-weight: 700;
2226
line-height: 1.2rem;
2327
white-space: nowrap;
2428
overflow: hidden;
2529
}
2630

27-
.md-header{
28-
top: 47px;
29-
}
30-
31-
.md-main__inner {
32-
margin-top: 3rem;
33-
}
34-
35-
.progress-bar {
36-
height: 1.2rem;
37-
float: left;
38-
background-color: #2979ff;
39-
}
40-
41-
.progress {
42-
display: block;
43-
width: 100%;
44-
margin: 0.5rem 0;
45-
height: 1.2rem;
46-
background-color: #eeeeee;
47-
position: relative;
48-
}
49-
5031
.progress.thin {
5132
margin-top: 0.9rem;
5233
height: 0.4rem;
5334
}
5435

55-
.progress.thin .progress-label {
56-
margin-top: -0.4rem;
57-
}
58-
5936
.progress.thin .progress-bar {
6037
height: 0.4rem;
6138
}
6239

63-
.progress-100plus .progress-bar {
64-
background-color: #00e676;
65-
}
66-
67-
.progress-80plus .progress-bar {
68-
background-color: #fbc02d;
69-
}
70-
71-
.progress-60plus .progress-bar {
72-
background-color: #ff9100;
73-
}
74-
75-
.progress-40plus .progress-bar {
76-
background-color: #ff5252;
77-
}
78-
79-
.progress-20plus .progress-bar {
80-
background-color: #ff1744;
81-
}
82-
83-
.progress-0plus .progress-bar {
84-
background-color: #f50057;
85-
}
86-
87-
/* 动态图标 */
88-
@keyframes heart {
89-
0%, 40%, 80%, 100% {
90-
transform: scale(1);
91-
}
92-
20%, 60% {
93-
transform: scale(1.15);
94-
}
95-
}
96-
97-
.heart {
98-
animation: heart 1000ms infinite;
99-
}
100-
101-
102-
/* 自定义 Admonitions */
103-
:root {
104-
--md-admonition-icon--tx-heart: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 20.408c-.492.308-.903.546-1.192.709-.153.086-.308.17-.463.252h-.002a.75.75 0 01-.686 0 16.709 16.709 0 01-.465-.252 31.147 31.147 0 01-4.803-3.34C3.8 15.572 1 12.331 1 8.513 1 5.052 3.829 2.5 6.736 2.5 9.03 2.5 10.881 3.726 12 5.605 13.12 3.726 14.97 2.5 17.264 2.5 20.17 2.5 23 5.052 23 8.514c0 3.818-2.801 7.06-5.389 9.262A31.146 31.146 0 0114 20.408z"/></svg>')
105-
}
106-
107-
/* 标题颜色 */
108-
.md-typeset .admonition.tx-heart,
109-
.md-typeset details.tx-heart {
110-
border-color: rgb(255, 192, 203);
111-
}
112-
113-
/* 侧边颜色 */
114-
.md-typeset .tx-heart > .admonition-title,
115-
.md-typeset .tx-heart > summary {
116-
background-color: rgba(255, 182, 193, 0.1);
117-
}
118-
119-
/* 图标颜色 */
120-
.md-typeset .tx-heart > .admonition-title::before,
121-
.md-typeset .tx-heart > summary::before {
122-
background-color: rgb(255, 20, 147);
123-
-webkit-mask-image: var(--md-admonition-icon--tx-heart);
124-
mask-image: var(--md-admonition-icon--tx-heart);
125-
}
126-
127-
.md-typeset hr {
128-
margin: 1em;
129-
display: inline-block;
130-
border-bottom: .05rem var(--md-default-fg-color--lightest);
131-
}
132-
133-
.md-grid {
134-
margin-left: 1rem;
135-
margin-right: auto;
136-
max-width: initial;
40+
.progress.thin .progress-label {
41+
margin-top: -0.4rem;
13742
}
13843

139-
.md-top {
140-
margin-top: 2rem;
141-
}
44+
.progress-100plus .progress-bar { background-color: #00e676; }
45+
.progress-80plus .progress-bar { background-color: #fbc02d; }
46+
.progress-60plus .progress-bar { background-color: #ff9100; }
47+
.progress-40plus .progress-bar { background-color: #ff5252; }
48+
.progress-20plus .progress-bar { background-color: #ff1744; }
49+
.progress-0plus .progress-bar { background-color: #f50057; }
14250

143-
.md-nav--primary .md-nav__title .md-logo {
144-
display: none;
145-
}
51+
/* ===============================
52+
图片展示样式
53+
=============================== */
14654

147-
/* 不添加额外样式的图片样式 */
55+
/* 不添加额外样式的图片 */
14856
.md-content .original img:not(.browser-mockup img) {
14957
display: block;
15058
border: none;
15159
box-shadow: none;
15260
}
15361

154-
/* 不添加浏览器导航栏的图片样式 */
62+
/* 未加浏览器样式的图片 */
15563
.md-content img:not(.browser-mockup img) {
15664
display: block;
157-
box-shadow: 0 0.1em .5em 0 rgba(0, 0, 0, 0.4);
15865
border: none;
15966
border-radius: 4px;
67+
box-shadow: 0 0.1em .5em 0 rgba(0, 0, 0, 0.4);
16068
}
16169

162-
.browser-mockup.none {
163-
border-top: 0;
164-
border-radius: 4px;
165-
}
166-
167-
.browser-mockup.none img {
168-
border-radius: 4px;
169-
}
170-
171-
.browser-mockup.none:before {
172-
display: none;
173-
}
174-
175-
/* 添加浏览器导航栏的图片样式 */
70+
/* 浏览器 mockup 布局样式 */
17671
.browser-mockup {
177-
border-top: 2em solid rgba(230, 230, 230, 0.8);
178-
box-shadow: 0 0.1em .5em 0 rgba(0, 0, 0, 0.4);
17972
position: relative;
180-
border-radius: 4px 4px 4px 4px;
18173
max-width: 1200px;
18274
margin: 0 auto;
75+
border-top: 2em solid rgba(230, 230, 230, 0.8);
76+
border-radius: 4px 4px 4px 4px;
77+
box-shadow: 0 0.1em .5em 0 rgba(0, 0, 0, 0.4);
18378
}
18479

18580
.browser-mockup:before {
@@ -231,3 +126,34 @@
231126
.browser-mockup>a {
232127
line-height: 0;
233128
}
129+
130+
/* 无浏览器顶栏的 mockup */
131+
.browser-mockup.none {
132+
border-top: 0;
133+
border-radius: 4px;
134+
}
135+
.browser-mockup.none img {
136+
border-radius: 4px;
137+
}
138+
.browser-mockup.none:before {
139+
display: none;
140+
}
141+
142+
/* ===============================
143+
Termynal 终端组件
144+
=============================== */
145+
146+
.termynal-comment {
147+
color: #4a968f;
148+
font-style: italic;
149+
display: block;
150+
}
151+
152+
.termy {
153+
/* For right to left languages */
154+
direction: ltr;
155+
}
156+
157+
.termy [data-termynal] {
158+
white-space: pre-wrap;
159+
}

docs/css/termynal.css

Lines changed: 0 additions & 103 deletions
This file was deleted.

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
hide:
33
- navigation
4+
- cta
45
---
56

67
## What is 1Panel?
@@ -23,6 +24,7 @@ Prepare a VPS, execute the script below and follow the prompts to install 1Panel
2324
```bash
2425
bash -c "$(curl -sSL https://resource.1panel.pro/v2/quick_start.sh)"
2526
```
27+
{.user-termynal}
2628

2729
## Screenshot
2830

0 commit comments

Comments
 (0)