@tnotesjs/core 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -84
- package/dist/{chunk-LZQDLU3S.js → chunk-NI5B4S3T.js} +12 -2
- package/dist/cli/index.js +1 -1
- package/dist/vitepress/config/index.js +60 -17
- package/package.json +1 -1
- package/types/config.ts +61 -61
- package/types/index.ts +11 -11
- package/types/note.ts +33 -33
- package/vitepress/assets/icons/icon__check.svg +3 -3
- package/vitepress/assets/icons/icon__clipboard.svg +7 -7
- package/vitepress/assets/icons/icon__close.svg +1 -1
- package/vitepress/assets/icons/icon__collapse.svg +1 -1
- package/vitepress/assets/icons/icon__confirm.svg +1 -1
- package/vitepress/assets/icons/icon__copy.svg +4 -4
- package/vitepress/assets/icons/icon__focus.svg +1 -1
- package/vitepress/assets/icons/icon__fold.svg +3 -3
- package/vitepress/assets/icons/icon__folder.svg +1 -1
- package/vitepress/assets/icons/icon__fullscreen.svg +1 -1
- package/vitepress/assets/icons/icon__fullscreen_exit.svg +1 -1
- package/vitepress/assets/icons/icon__github.svg +3 -3
- package/vitepress/assets/icons/icon__mindmap.svg +1 -1
- package/vitepress/assets/icons/icon__next.svg +1 -1
- package/vitepress/assets/icons/icon__number_gray.svg +1 -1
- package/vitepress/assets/icons/icon__number_purple.svg +1 -1
- package/vitepress/assets/icons/icon__prev.svg +1 -1
- package/vitepress/assets/icons/icon__restore.svg +1 -1
- package/vitepress/assets/icons/icon__rotate.svg +4 -4
- package/vitepress/assets/icons/icon__search.svg +1 -1
- package/vitepress/assets/icons/icon__sidebar_collapsed.svg +1 -1
- package/vitepress/assets/icons/icon__sidebar_opened.svg +1 -1
- package/vitepress/assets/icons/icon__totop.svg +5 -5
- package/vitepress/assets/icons/icon__vscode.svg +5 -5
- package/vitepress/assets/icons/icon__zoom_fit.svg +1 -1
- package/vitepress/assets/icons/icon__zoom_in.svg +1 -1
- package/vitepress/assets/icons/icon__zoom_out.svg +1 -1
- package/vitepress/assets/icons/icon__zoom_reset.svg +1 -1
- package/vitepress/assets/icons/index.ts +38 -38
- package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +20 -20
- package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +373 -373
- package/vitepress/components/CodeBlockFullscreen/index.ts +115 -115
- package/vitepress/components/CodeBlockFullscreen/styles.css +64 -64
- package/vitepress/components/Discussions/Discussions.module.scss +32 -32
- package/vitepress/components/Discussions/Discussions.vue +211 -211
- package/vitepress/components/EnWordList/EnWordList.module.scss +124 -124
- package/vitepress/components/EnWordList/EnWordList.vue +543 -543
- package/vitepress/components/EnWordList/RightClickMenu.module.scss +22 -22
- package/vitepress/components/EnWordList/RightClickMenu.vue +66 -66
- package/vitepress/components/Footprints/Footprints.module.scss +93 -93
- package/vitepress/components/Footprints/Footprints.vue +377 -377
- package/vitepress/components/Layout/AboutModal.module.scss +233 -233
- package/vitepress/components/Layout/AboutModal.vue +105 -105
- package/vitepress/components/Layout/AboutPanel.vue +266 -266
- package/vitepress/components/Layout/ContentCollapse.vue +603 -603
- package/vitepress/components/Layout/CustomSidebar.vue +605 -605
- package/vitepress/components/Layout/DocBeforeControls.vue +139 -139
- package/vitepress/components/Layout/DocFooter.vue +225 -225
- package/vitepress/components/Layout/ImagePreview.module.scss +201 -201
- package/vitepress/components/Layout/ImagePreview.vue +281 -281
- package/vitepress/components/Layout/Layout.module.scss +661 -661
- package/vitepress/components/Layout/Layout.vue +542 -542
- package/vitepress/components/Layout/NoteStatus.vue +140 -140
- package/vitepress/components/Layout/SidebarItems.vue +263 -263
- package/vitepress/components/Layout/SidebarNavBefore.vue +92 -92
- package/vitepress/components/Layout/Swiper.vue +167 -167
- package/vitepress/components/Layout/ToggleFullContent.module.scss +11 -11
- package/vitepress/components/Layout/ToggleFullContent.vue +34 -34
- package/vitepress/components/Layout/ToggleSidebar.module.scss +11 -11
- package/vitepress/components/Layout/ToggleSidebar.vue +35 -35
- package/vitepress/components/Layout/composables/useCollapseControl.ts +88 -88
- package/vitepress/components/Layout/composables/useNoteConfig.ts +121 -121
- package/vitepress/components/Layout/composables/useNoteSave.ts +173 -173
- package/vitepress/components/Layout/composables/useNoteValidation.ts +85 -85
- package/vitepress/components/Layout/composables/useRedirect.ts +110 -110
- package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +85 -85
- package/vitepress/components/Layout/homeReadme.data.ts +124 -124
- package/vitepress/components/LoadingPage/LoadingPage.vue +192 -192
- package/vitepress/components/MarkMap/MarkMap.module.scss +159 -159
- package/vitepress/components/MarkMap/MarkMap.vue +404 -404
- package/vitepress/components/Mermaid/Mermaid.module.scss +275 -275
- package/vitepress/components/Mermaid/Mermaid.vue +364 -364
- package/vitepress/components/NotesTable/NotesTable.module.scss +77 -77
- package/vitepress/components/NotesTable/NotesTable.vue +98 -98
- package/vitepress/components/NotesTable/README.md +67 -67
- package/vitepress/components/Settings/Settings.module.scss +433 -433
- package/vitepress/components/Settings/Settings.vue +306 -306
- package/vitepress/components/SidebarCard/MindMapView.vue +483 -483
- package/vitepress/components/SidebarCard/NotesTrendChart.vue +108 -108
- package/vitepress/components/SidebarCard/SidebarCard.vue +948 -948
- package/vitepress/components/Tooltip/Tooltip.vue +70 -70
- package/vitepress/components/constants.ts +91 -91
- package/vitepress/components/notesConfig.data.ts +73 -73
- package/vitepress/components/sidebar.data.ts +59 -59
- package/vitepress/components/tnotes-config.data.ts +21 -21
- package/vitepress/components/utils.ts +26 -26
- package/vitepress/config/index.ts +141 -141
- package/vitepress/configs/constants.ts +26 -26
- package/vitepress/configs/head.config.ts +25 -25
- package/vitepress/configs/index.ts +9 -9
- package/vitepress/configs/markdown-it.d.ts +23 -23
- package/vitepress/configs/markdown.config.ts +366 -366
- package/vitepress/configs/theme.config.ts +108 -108
- package/vitepress/plugins/buildProgressPlugin.ts +466 -390
- package/vitepress/plugins/getNoteByConfigIdPlugin.ts +107 -107
- package/vitepress/plugins/renameNotePlugin.ts +60 -60
- package/vitepress/plugins/updateConfigPlugin.ts +63 -63
- package/vitepress/theme/index.ts +95 -95
- package/vitepress/theme/styles/base.scss +50 -50
- package/vitepress/theme/styles/components/404.scss +31 -31
- package/vitepress/theme/styles/components/collapse.scss +175 -175
- package/vitepress/theme/styles/components/markmap.scss +101 -101
- package/vitepress/theme/styles/components/swiper.scss +255 -255
- package/vitepress/theme/styles/index.scss +25 -25
- package/vitepress/theme/styles/layout.scss +62 -62
- package/vitepress/theme/styles/utilities.scss +39 -39
- package/vitepress/theme/styles/vitepress-override.scss +25 -25
|
@@ -1,255 +1,255 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swiper 组件全局样式
|
|
3
|
-
* 由于 Swiper 组件动态生成 DOM,所有样式都需要是全局的
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* ===================================== */
|
|
7
|
-
/* #region Swiper Tabs */
|
|
8
|
-
/* ===================================== */
|
|
9
|
-
|
|
10
|
-
.tn-swiper-tabs {
|
|
11
|
-
position: relative;
|
|
12
|
-
z-index: 20;
|
|
13
|
-
display: flex;
|
|
14
|
-
overflow-x: auto;
|
|
15
|
-
overflow-y: hidden;
|
|
16
|
-
gap: 0.5rem;
|
|
17
|
-
background: var(--vp-c-bg);
|
|
18
|
-
border-bottom: 1px solid var(--vp-c-divider);
|
|
19
|
-
border-radius: 8px 8px 0 0;
|
|
20
|
-
background-color: var(--vp-code-tab-bg);
|
|
21
|
-
box-shadow: inset 0 -1px var(--vp-code-tab-divider);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.tn-swiper-tabs::-webkit-scrollbar {
|
|
25
|
-
height: 4px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.tn-swiper-tabs::-webkit-scrollbar-track {
|
|
29
|
-
background: transparent;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.tn-swiper-tabs::-webkit-scrollbar-thumb {
|
|
33
|
-
background: var(--vp-c-divider);
|
|
34
|
-
border-radius: 2px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.tn-swiper-tabs::-webkit-scrollbar-thumb:hover {
|
|
38
|
-
background: var(--vp-c-text-3);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* #endregion */
|
|
42
|
-
|
|
43
|
-
/* ===================================== */
|
|
44
|
-
/* #region Tab 按钮 */
|
|
45
|
-
/* ===================================== */
|
|
46
|
-
|
|
47
|
-
.tn-tab {
|
|
48
|
-
position: relative;
|
|
49
|
-
padding: 0.25rem 0.75rem;
|
|
50
|
-
line-height: 2rem;
|
|
51
|
-
border-bottom: 1px solid transparent;
|
|
52
|
-
background: transparent;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
font-size: 0.875rem;
|
|
55
|
-
white-space: nowrap;
|
|
56
|
-
color: var(--vp-code-tab-text-color);
|
|
57
|
-
transition: color 0.25s ease, transform 0.2s ease;
|
|
58
|
-
border: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.tn-tab::after {
|
|
62
|
-
position: absolute;
|
|
63
|
-
right: 8px;
|
|
64
|
-
bottom: -1px;
|
|
65
|
-
left: 8px;
|
|
66
|
-
z-index: 1;
|
|
67
|
-
height: 2px;
|
|
68
|
-
border-radius: 2px;
|
|
69
|
-
content: '';
|
|
70
|
-
background-color: transparent;
|
|
71
|
-
transition: background-color 0.25s ease;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tn-tab:hover {
|
|
75
|
-
color: var(--vp-code-tab-active-text-color);
|
|
76
|
-
transform: translateY(-1px);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.tn-tab.active {
|
|
80
|
-
color: var(--vp-code-tab-active-text-color);
|
|
81
|
-
font-weight: 500;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.tn-tab.active::after {
|
|
85
|
-
background-color: var(--vp-code-tab-active-bar-color);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* #endregion */
|
|
89
|
-
|
|
90
|
-
/* ===================================== */
|
|
91
|
-
/* #region Tab 导航按钮 */
|
|
92
|
-
/* ===================================== */
|
|
93
|
-
|
|
94
|
-
.tn-tab-nav {
|
|
95
|
-
position: absolute;
|
|
96
|
-
top: 50%;
|
|
97
|
-
transform: translateY(-50%);
|
|
98
|
-
background: transparent;
|
|
99
|
-
border: none;
|
|
100
|
-
font-size: 0.8rem;
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
color: var(--vp-code-tab-text-color);
|
|
103
|
-
padding: 0 0.3rem;
|
|
104
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
105
|
-
user-select: none;
|
|
106
|
-
border-radius: 4px;
|
|
107
|
-
line-height: 1;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/* 只对翻页按钮(非分隔符)生效的 hover 样式 */
|
|
111
|
-
.tn-tab-prev:hover,
|
|
112
|
-
.tn-tab-next:hover {
|
|
113
|
-
color: var(--vp-code-tab-active-bar-color);
|
|
114
|
-
font-size: 1rem;
|
|
115
|
-
transform: translateY(-50%) scale(1.5);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.tn-tab-nav:active {
|
|
119
|
-
transform: translateY(-50%) scale(0.95);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.tn-tab-prev {
|
|
123
|
-
left: 0.5rem;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.tab-tab-line {
|
|
127
|
-
position: absolute;
|
|
128
|
-
left: 1.1rem;
|
|
129
|
-
top: 50%;
|
|
130
|
-
transform: translateY(-50%);
|
|
131
|
-
color: var(--vp-code-tab-active-bar-color);
|
|
132
|
-
user-select: none;
|
|
133
|
-
opacity: 0.5;
|
|
134
|
-
/* 移除 cursor,表示不可交互 */
|
|
135
|
-
cursor: default;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.tn-tab-next {
|
|
139
|
-
left: 1.5rem;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* #endregion */
|
|
143
|
-
|
|
144
|
-
/* ===================================== */
|
|
145
|
-
/* #region Swiper 容器 */
|
|
146
|
-
/* ===================================== */
|
|
147
|
-
|
|
148
|
-
.swiper-container {
|
|
149
|
-
width: 100%;
|
|
150
|
-
position: relative;
|
|
151
|
-
overflow: hidden;
|
|
152
|
-
margin: 1rem 0;
|
|
153
|
-
transition: height 0.3s ease;
|
|
154
|
-
border-radius: 0 0 8px 8px;
|
|
155
|
-
background: var(--vp-c-bg-soft);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.swiper-container img {
|
|
159
|
-
display: block;
|
|
160
|
-
max-width: 100%;
|
|
161
|
-
margin: 0 auto;
|
|
162
|
-
height: auto;
|
|
163
|
-
object-fit: contain;
|
|
164
|
-
transition: opacity 0.3s ease;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.tn-swiper {
|
|
168
|
-
margin: 1.5rem 0;
|
|
169
|
-
border-radius: 8px;
|
|
170
|
-
overflow: hidden;
|
|
171
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
172
|
-
transition: box-shadow 0.3s ease;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.tn-swiper:hover {
|
|
176
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.swiper-slide {
|
|
180
|
-
animation: swiperFadeIn 0.3s ease-out;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/* #endregion */
|
|
184
|
-
|
|
185
|
-
/* ===================================== */
|
|
186
|
-
/* #region 暗色模式 */
|
|
187
|
-
/* ===================================== */
|
|
188
|
-
|
|
189
|
-
html.dark .tn-swiper {
|
|
190
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
html.dark .tn-swiper:hover {
|
|
194
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
html.dark .swiper-container {
|
|
198
|
-
background: var(--vp-c-bg);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* #endregion */
|
|
202
|
-
|
|
203
|
-
/* ===================================== */
|
|
204
|
-
/* #region 响应式 */
|
|
205
|
-
/* ===================================== */
|
|
206
|
-
|
|
207
|
-
@media (max-width: 640px) {
|
|
208
|
-
.tn-swiper-tabs {
|
|
209
|
-
gap: 0.25rem;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.tn-tab {
|
|
213
|
-
padding: 0.2rem 0.5rem;
|
|
214
|
-
font-size: 0.8rem;
|
|
215
|
-
line-height: 1.8rem;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.tn-tab-nav {
|
|
219
|
-
font-size: 0.7rem;
|
|
220
|
-
padding: 0 0.2rem;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.tn-tab-nav:hover {
|
|
224
|
-
font-size: 0.85rem;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.tn-tab-prev {
|
|
228
|
-
left: 0.3rem;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.tab-tab-line {
|
|
232
|
-
left: 0.8rem;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.tn-tab-next {
|
|
236
|
-
left: 1.2rem;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/* #endregion */
|
|
241
|
-
|
|
242
|
-
/* ===================================== */
|
|
243
|
-
/* #region 动画 */
|
|
244
|
-
/* ===================================== */
|
|
245
|
-
|
|
246
|
-
@keyframes swiperFadeIn {
|
|
247
|
-
from {
|
|
248
|
-
opacity: 0;
|
|
249
|
-
}
|
|
250
|
-
to {
|
|
251
|
-
opacity: 1;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* #endregion */
|
|
1
|
+
/**
|
|
2
|
+
* Swiper 组件全局样式
|
|
3
|
+
* 由于 Swiper 组件动态生成 DOM,所有样式都需要是全局的
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* ===================================== */
|
|
7
|
+
/* #region Swiper Tabs */
|
|
8
|
+
/* ===================================== */
|
|
9
|
+
|
|
10
|
+
.tn-swiper-tabs {
|
|
11
|
+
position: relative;
|
|
12
|
+
z-index: 20;
|
|
13
|
+
display: flex;
|
|
14
|
+
overflow-x: auto;
|
|
15
|
+
overflow-y: hidden;
|
|
16
|
+
gap: 0.5rem;
|
|
17
|
+
background: var(--vp-c-bg);
|
|
18
|
+
border-bottom: 1px solid var(--vp-c-divider);
|
|
19
|
+
border-radius: 8px 8px 0 0;
|
|
20
|
+
background-color: var(--vp-code-tab-bg);
|
|
21
|
+
box-shadow: inset 0 -1px var(--vp-code-tab-divider);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tn-swiper-tabs::-webkit-scrollbar {
|
|
25
|
+
height: 4px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tn-swiper-tabs::-webkit-scrollbar-track {
|
|
29
|
+
background: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tn-swiper-tabs::-webkit-scrollbar-thumb {
|
|
33
|
+
background: var(--vp-c-divider);
|
|
34
|
+
border-radius: 2px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tn-swiper-tabs::-webkit-scrollbar-thumb:hover {
|
|
38
|
+
background: var(--vp-c-text-3);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* #endregion */
|
|
42
|
+
|
|
43
|
+
/* ===================================== */
|
|
44
|
+
/* #region Tab 按钮 */
|
|
45
|
+
/* ===================================== */
|
|
46
|
+
|
|
47
|
+
.tn-tab {
|
|
48
|
+
position: relative;
|
|
49
|
+
padding: 0.25rem 0.75rem;
|
|
50
|
+
line-height: 2rem;
|
|
51
|
+
border-bottom: 1px solid transparent;
|
|
52
|
+
background: transparent;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
color: var(--vp-code-tab-text-color);
|
|
57
|
+
transition: color 0.25s ease, transform 0.2s ease;
|
|
58
|
+
border: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tn-tab::after {
|
|
62
|
+
position: absolute;
|
|
63
|
+
right: 8px;
|
|
64
|
+
bottom: -1px;
|
|
65
|
+
left: 8px;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
height: 2px;
|
|
68
|
+
border-radius: 2px;
|
|
69
|
+
content: '';
|
|
70
|
+
background-color: transparent;
|
|
71
|
+
transition: background-color 0.25s ease;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tn-tab:hover {
|
|
75
|
+
color: var(--vp-code-tab-active-text-color);
|
|
76
|
+
transform: translateY(-1px);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tn-tab.active {
|
|
80
|
+
color: var(--vp-code-tab-active-text-color);
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.tn-tab.active::after {
|
|
85
|
+
background-color: var(--vp-code-tab-active-bar-color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* #endregion */
|
|
89
|
+
|
|
90
|
+
/* ===================================== */
|
|
91
|
+
/* #region Tab 导航按钮 */
|
|
92
|
+
/* ===================================== */
|
|
93
|
+
|
|
94
|
+
.tn-tab-nav {
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: 50%;
|
|
97
|
+
transform: translateY(-50%);
|
|
98
|
+
background: transparent;
|
|
99
|
+
border: none;
|
|
100
|
+
font-size: 0.8rem;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
color: var(--vp-code-tab-text-color);
|
|
103
|
+
padding: 0 0.3rem;
|
|
104
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
105
|
+
user-select: none;
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
line-height: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 只对翻页按钮(非分隔符)生效的 hover 样式 */
|
|
111
|
+
.tn-tab-prev:hover,
|
|
112
|
+
.tn-tab-next:hover {
|
|
113
|
+
color: var(--vp-code-tab-active-bar-color);
|
|
114
|
+
font-size: 1rem;
|
|
115
|
+
transform: translateY(-50%) scale(1.5);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.tn-tab-nav:active {
|
|
119
|
+
transform: translateY(-50%) scale(0.95);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tn-tab-prev {
|
|
123
|
+
left: 0.5rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.tab-tab-line {
|
|
127
|
+
position: absolute;
|
|
128
|
+
left: 1.1rem;
|
|
129
|
+
top: 50%;
|
|
130
|
+
transform: translateY(-50%);
|
|
131
|
+
color: var(--vp-code-tab-active-bar-color);
|
|
132
|
+
user-select: none;
|
|
133
|
+
opacity: 0.5;
|
|
134
|
+
/* 移除 cursor,表示不可交互 */
|
|
135
|
+
cursor: default;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.tn-tab-next {
|
|
139
|
+
left: 1.5rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* #endregion */
|
|
143
|
+
|
|
144
|
+
/* ===================================== */
|
|
145
|
+
/* #region Swiper 容器 */
|
|
146
|
+
/* ===================================== */
|
|
147
|
+
|
|
148
|
+
.swiper-container {
|
|
149
|
+
width: 100%;
|
|
150
|
+
position: relative;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
margin: 1rem 0;
|
|
153
|
+
transition: height 0.3s ease;
|
|
154
|
+
border-radius: 0 0 8px 8px;
|
|
155
|
+
background: var(--vp-c-bg-soft);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.swiper-container img {
|
|
159
|
+
display: block;
|
|
160
|
+
max-width: 100%;
|
|
161
|
+
margin: 0 auto;
|
|
162
|
+
height: auto;
|
|
163
|
+
object-fit: contain;
|
|
164
|
+
transition: opacity 0.3s ease;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.tn-swiper {
|
|
168
|
+
margin: 1.5rem 0;
|
|
169
|
+
border-radius: 8px;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
172
|
+
transition: box-shadow 0.3s ease;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.tn-swiper:hover {
|
|
176
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.swiper-slide {
|
|
180
|
+
animation: swiperFadeIn 0.3s ease-out;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* #endregion */
|
|
184
|
+
|
|
185
|
+
/* ===================================== */
|
|
186
|
+
/* #region 暗色模式 */
|
|
187
|
+
/* ===================================== */
|
|
188
|
+
|
|
189
|
+
html.dark .tn-swiper {
|
|
190
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
html.dark .tn-swiper:hover {
|
|
194
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
html.dark .swiper-container {
|
|
198
|
+
background: var(--vp-c-bg);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* #endregion */
|
|
202
|
+
|
|
203
|
+
/* ===================================== */
|
|
204
|
+
/* #region 响应式 */
|
|
205
|
+
/* ===================================== */
|
|
206
|
+
|
|
207
|
+
@media (max-width: 640px) {
|
|
208
|
+
.tn-swiper-tabs {
|
|
209
|
+
gap: 0.25rem;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.tn-tab {
|
|
213
|
+
padding: 0.2rem 0.5rem;
|
|
214
|
+
font-size: 0.8rem;
|
|
215
|
+
line-height: 1.8rem;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.tn-tab-nav {
|
|
219
|
+
font-size: 0.7rem;
|
|
220
|
+
padding: 0 0.2rem;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.tn-tab-nav:hover {
|
|
224
|
+
font-size: 0.85rem;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.tn-tab-prev {
|
|
228
|
+
left: 0.3rem;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.tab-tab-line {
|
|
232
|
+
left: 0.8rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.tn-tab-next {
|
|
236
|
+
left: 1.2rem;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* #endregion */
|
|
241
|
+
|
|
242
|
+
/* ===================================== */
|
|
243
|
+
/* #region 动画 */
|
|
244
|
+
/* ===================================== */
|
|
245
|
+
|
|
246
|
+
@keyframes swiperFadeIn {
|
|
247
|
+
from {
|
|
248
|
+
opacity: 0;
|
|
249
|
+
}
|
|
250
|
+
to {
|
|
251
|
+
opacity: 1;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* #endregion */
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 样式入口文件
|
|
3
|
-
* 按顺序导入所有样式,确保正确的层叠优先级
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* 1. 基础层:CSS 变量和全局重置 */
|
|
7
|
-
@use './base';
|
|
8
|
-
|
|
9
|
-
/* 2. VitePress 覆盖层:覆盖默认主题样式 */
|
|
10
|
-
@use './vitepress-override';
|
|
11
|
-
|
|
12
|
-
/* 3. 布局层:全局布局样式 */
|
|
13
|
-
@use './layout';
|
|
14
|
-
|
|
15
|
-
/* 4. 组件全局层:跨组件共享的样式 */
|
|
16
|
-
@use './components/swiper';
|
|
17
|
-
@use './components/markmap';
|
|
18
|
-
@use './components/collapse';
|
|
19
|
-
/**
|
|
20
|
-
* !404 不是一个有效的 Sass 标识符(不能以数字开头),需要为它添加一个别名
|
|
21
|
-
*/
|
|
22
|
-
@use './components/404' as notfound;
|
|
23
|
-
|
|
24
|
-
/* 5. 工具类和动画 */
|
|
25
|
-
@use './utilities';
|
|
1
|
+
/**
|
|
2
|
+
* 样式入口文件
|
|
3
|
+
* 按顺序导入所有样式,确保正确的层叠优先级
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* 1. 基础层:CSS 变量和全局重置 */
|
|
7
|
+
@use './base';
|
|
8
|
+
|
|
9
|
+
/* 2. VitePress 覆盖层:覆盖默认主题样式 */
|
|
10
|
+
@use './vitepress-override';
|
|
11
|
+
|
|
12
|
+
/* 3. 布局层:全局布局样式 */
|
|
13
|
+
@use './layout';
|
|
14
|
+
|
|
15
|
+
/* 4. 组件全局层:跨组件共享的样式 */
|
|
16
|
+
@use './components/swiper';
|
|
17
|
+
@use './components/markmap';
|
|
18
|
+
@use './components/collapse';
|
|
19
|
+
/**
|
|
20
|
+
* !404 不是一个有效的 Sass 标识符(不能以数字开头),需要为它添加一个别名
|
|
21
|
+
*/
|
|
22
|
+
@use './components/404' as notfound;
|
|
23
|
+
|
|
24
|
+
/* 5. 工具类和动画 */
|
|
25
|
+
@use './utilities';
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 布局层样式
|
|
3
|
-
* - 全局布局控制
|
|
4
|
-
* - 响应式布局
|
|
5
|
-
* - 特殊布局模式(侧边栏隐藏、全屏等)
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/* ===================================== */
|
|
9
|
-
/* #region 侧边栏隐藏模式 */
|
|
10
|
-
/* ===================================== */
|
|
11
|
-
|
|
12
|
-
.hide-sidebar .VPSidebar {
|
|
13
|
-
transform: translateX(-100%);
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
transition: transform 0.25s ease, opacity 0.25s ease;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.hide-sidebar .VPNavBar {
|
|
19
|
-
background-color: var(--vp-nav-bg-color) !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* 主体内容往左补齐,与导航栏标题左对齐 */
|
|
23
|
-
.hide-sidebar .VPContent {
|
|
24
|
-
margin-left: 0 !important;
|
|
25
|
-
padding-left: calc((100vw - var(--vp-layout-max-width)) / 2) !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.hide-sidebar .VPDoc .content-container {
|
|
29
|
-
max-width: calc(
|
|
30
|
-
var(--vp-sidebar-width) + var(--tn-content-width, 688px) +
|
|
31
|
-
var(--vp-sidebar-width)
|
|
32
|
-
) !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* #endregion */
|
|
36
|
-
|
|
37
|
-
/* ===================================== */
|
|
38
|
-
/* #region 全屏内容模式 */
|
|
39
|
-
/* ===================================== */
|
|
40
|
-
|
|
41
|
-
.content-fullscreen .VPSidebar,
|
|
42
|
-
.content-fullscreen .VPNav,
|
|
43
|
-
.content-fullscreen .VPDocFooter,
|
|
44
|
-
.content-fullscreen .VPNavBar {
|
|
45
|
-
display: none !important;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.content-fullscreen .VPContent {
|
|
49
|
-
margin: 0 !important;
|
|
50
|
-
padding: 0 2rem !important;
|
|
51
|
-
max-width: 100% !important;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.content-fullscreen body {
|
|
55
|
-
overflow: auto;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.content-fullscreen .VPDoc .content-container {
|
|
59
|
-
max-width: none !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* #endregion */
|
|
1
|
+
/**
|
|
2
|
+
* 布局层样式
|
|
3
|
+
* - 全局布局控制
|
|
4
|
+
* - 响应式布局
|
|
5
|
+
* - 特殊布局模式(侧边栏隐藏、全屏等)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ===================================== */
|
|
9
|
+
/* #region 侧边栏隐藏模式 */
|
|
10
|
+
/* ===================================== */
|
|
11
|
+
|
|
12
|
+
.hide-sidebar .VPSidebar {
|
|
13
|
+
transform: translateX(-100%);
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
transition: transform 0.25s ease, opacity 0.25s ease;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hide-sidebar .VPNavBar {
|
|
19
|
+
background-color: var(--vp-nav-bg-color) !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* 主体内容往左补齐,与导航栏标题左对齐 */
|
|
23
|
+
.hide-sidebar .VPContent {
|
|
24
|
+
margin-left: 0 !important;
|
|
25
|
+
padding-left: calc((100vw - var(--vp-layout-max-width)) / 2) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hide-sidebar .VPDoc .content-container {
|
|
29
|
+
max-width: calc(
|
|
30
|
+
var(--vp-sidebar-width) + var(--tn-content-width, 688px) +
|
|
31
|
+
var(--vp-sidebar-width)
|
|
32
|
+
) !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* #endregion */
|
|
36
|
+
|
|
37
|
+
/* ===================================== */
|
|
38
|
+
/* #region 全屏内容模式 */
|
|
39
|
+
/* ===================================== */
|
|
40
|
+
|
|
41
|
+
.content-fullscreen .VPSidebar,
|
|
42
|
+
.content-fullscreen .VPNav,
|
|
43
|
+
.content-fullscreen .VPDocFooter,
|
|
44
|
+
.content-fullscreen .VPNavBar {
|
|
45
|
+
display: none !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.content-fullscreen .VPContent {
|
|
49
|
+
margin: 0 !important;
|
|
50
|
+
padding: 0 2rem !important;
|
|
51
|
+
max-width: 100% !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.content-fullscreen body {
|
|
55
|
+
overflow: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.content-fullscreen .VPDoc .content-container {
|
|
59
|
+
max-width: none !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* #endregion */
|