@tnotesjs/core 0.0.6 → 0.0.8

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.
Files changed (116) hide show
  1. package/README.md +87 -84
  2. package/dist/{chunk-JDVN2QYW.js → chunk-JUMVJKWV.js} +615 -614
  3. package/dist/cli/index.js +125 -125
  4. package/dist/vitepress/config/index.js +184 -210
  5. package/package.json +15 -3
  6. package/types/config.ts +61 -61
  7. package/types/index.ts +11 -11
  8. package/types/note.ts +33 -33
  9. package/types/shims.d.ts +3 -4
  10. package/vitepress/assets/icons/icon__check.svg +3 -3
  11. package/vitepress/assets/icons/icon__clipboard.svg +7 -7
  12. package/vitepress/assets/icons/icon__close.svg +1 -1
  13. package/vitepress/assets/icons/icon__collapse.svg +1 -1
  14. package/vitepress/assets/icons/icon__confirm.svg +1 -1
  15. package/vitepress/assets/icons/icon__copy.svg +4 -4
  16. package/vitepress/assets/icons/icon__focus.svg +1 -1
  17. package/vitepress/assets/icons/icon__fold.svg +3 -3
  18. package/vitepress/assets/icons/icon__folder.svg +1 -1
  19. package/vitepress/assets/icons/icon__fullscreen.svg +1 -1
  20. package/vitepress/assets/icons/icon__fullscreen_exit.svg +1 -1
  21. package/vitepress/assets/icons/icon__github.svg +3 -3
  22. package/vitepress/assets/icons/icon__mindmap.svg +1 -1
  23. package/vitepress/assets/icons/icon__next.svg +1 -1
  24. package/vitepress/assets/icons/icon__number_gray.svg +1 -1
  25. package/vitepress/assets/icons/icon__number_purple.svg +1 -1
  26. package/vitepress/assets/icons/icon__prev.svg +1 -1
  27. package/vitepress/assets/icons/icon__restore.svg +1 -1
  28. package/vitepress/assets/icons/icon__rotate.svg +4 -4
  29. package/vitepress/assets/icons/icon__search.svg +1 -1
  30. package/vitepress/assets/icons/icon__sidebar_collapsed.svg +1 -1
  31. package/vitepress/assets/icons/icon__sidebar_opened.svg +1 -1
  32. package/vitepress/assets/icons/icon__totop.svg +5 -5
  33. package/vitepress/assets/icons/icon__vscode.svg +5 -5
  34. package/vitepress/assets/icons/icon__zoom_fit.svg +1 -1
  35. package/vitepress/assets/icons/icon__zoom_in.svg +1 -1
  36. package/vitepress/assets/icons/icon__zoom_out.svg +1 -1
  37. package/vitepress/assets/icons/icon__zoom_reset.svg +1 -1
  38. package/vitepress/assets/icons/index.ts +38 -38
  39. package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +20 -20
  40. package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +373 -372
  41. package/vitepress/components/CodeBlockFullscreen/index.ts +115 -114
  42. package/vitepress/components/CodeBlockFullscreen/styles.css +64 -64
  43. package/vitepress/components/Discussions/Discussions.module.scss +32 -32
  44. package/vitepress/components/Discussions/Discussions.vue +211 -210
  45. package/vitepress/components/EnWordList/EnWordList.module.scss +124 -124
  46. package/vitepress/components/EnWordList/EnWordList.vue +543 -542
  47. package/vitepress/components/EnWordList/RightClickMenu.module.scss +22 -22
  48. package/vitepress/components/EnWordList/RightClickMenu.vue +66 -66
  49. package/vitepress/components/Footprints/Footprints.module.scss +93 -93
  50. package/vitepress/components/Footprints/Footprints.vue +377 -377
  51. package/vitepress/components/Layout/AboutModal.module.scss +233 -233
  52. package/vitepress/components/Layout/AboutModal.vue +105 -105
  53. package/vitepress/components/Layout/AboutPanel.vue +270 -265
  54. package/vitepress/components/Layout/ContentCollapse.vue +603 -602
  55. package/vitepress/components/Layout/CustomSidebar.vue +608 -605
  56. package/vitepress/components/Layout/DocBeforeControls.vue +149 -139
  57. package/vitepress/components/Layout/DocFooter.vue +233 -232
  58. package/vitepress/components/Layout/ImagePreview.module.scss +201 -201
  59. package/vitepress/components/Layout/ImagePreview.vue +281 -280
  60. package/vitepress/components/Layout/Layout.module.scss +661 -661
  61. package/vitepress/components/Layout/Layout.vue +539 -542
  62. package/vitepress/components/Layout/NoteStatus.vue +140 -139
  63. package/vitepress/components/Layout/SidebarItems.vue +267 -262
  64. package/vitepress/components/Layout/SidebarNavBefore.vue +92 -92
  65. package/vitepress/components/Layout/Swiper.vue +167 -167
  66. package/vitepress/components/Layout/ToggleFullContent.module.scss +11 -11
  67. package/vitepress/components/Layout/ToggleFullContent.vue +35 -34
  68. package/vitepress/components/Layout/ToggleSidebar.module.scss +11 -11
  69. package/vitepress/components/Layout/ToggleSidebar.vue +36 -35
  70. package/vitepress/components/Layout/composables/useCollapseControl.ts +88 -88
  71. package/vitepress/components/Layout/composables/useNoteConfig.ts +119 -121
  72. package/vitepress/components/Layout/composables/useNoteSave.ts +173 -172
  73. package/vitepress/components/Layout/composables/useNoteValidation.ts +85 -85
  74. package/vitepress/components/Layout/composables/useRedirect.ts +113 -110
  75. package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +86 -83
  76. package/vitepress/components/Layout/homeReadme.data.ts +124 -124
  77. package/vitepress/components/LoadingPage/LoadingPage.vue +192 -192
  78. package/vitepress/components/MarkMap/MarkMap.module.scss +159 -159
  79. package/vitepress/components/MarkMap/MarkMap.vue +405 -404
  80. package/vitepress/components/Mermaid/Mermaid.module.scss +275 -275
  81. package/vitepress/components/Mermaid/Mermaid.vue +365 -363
  82. package/vitepress/components/NotesTable/NotesTable.module.scss +77 -77
  83. package/vitepress/components/NotesTable/NotesTable.vue +98 -97
  84. package/vitepress/components/NotesTable/README.md +67 -67
  85. package/vitepress/components/Settings/Settings.module.scss +433 -433
  86. package/vitepress/components/Settings/Settings.vue +306 -305
  87. package/vitepress/components/SidebarCard/MindMapView.vue +484 -483
  88. package/vitepress/components/SidebarCard/NotesTrendChart.vue +108 -108
  89. package/vitepress/components/SidebarCard/SidebarCard.vue +946 -948
  90. package/vitepress/components/Tooltip/Tooltip.vue +70 -70
  91. package/vitepress/components/constants.ts +91 -91
  92. package/vitepress/components/notesConfig.data.ts +73 -73
  93. package/vitepress/components/sidebar.data.ts +59 -59
  94. package/vitepress/components/tnotes-config.data.ts +21 -21
  95. package/vitepress/components/utils.ts +26 -26
  96. package/vitepress/config/index.ts +160 -146
  97. package/vitepress/configs/constants.ts +26 -26
  98. package/vitepress/configs/head.config.ts +25 -24
  99. package/vitepress/configs/index.ts +9 -9
  100. package/vitepress/configs/markdown-it.d.ts +23 -20
  101. package/vitepress/configs/markdown.config.ts +366 -365
  102. package/vitepress/configs/theme.config.ts +108 -108
  103. package/vitepress/plugins/buildProgressPlugin.ts +434 -470
  104. package/vitepress/plugins/getNoteByConfigIdPlugin.ts +107 -106
  105. package/vitepress/plugins/renameNotePlugin.ts +60 -59
  106. package/vitepress/plugins/updateConfigPlugin.ts +63 -62
  107. package/vitepress/theme/index.ts +95 -93
  108. package/vitepress/theme/styles/base.scss +50 -50
  109. package/vitepress/theme/styles/components/404.scss +31 -31
  110. package/vitepress/theme/styles/components/collapse.scss +175 -175
  111. package/vitepress/theme/styles/components/markmap.scss +101 -101
  112. package/vitepress/theme/styles/components/swiper.scss +255 -255
  113. package/vitepress/theme/styles/index.scss +25 -25
  114. package/vitepress/theme/styles/layout.scss +62 -62
  115. package/vitepress/theme/styles/utilities.scss +39 -39
  116. package/vitepress/theme/styles/vitepress-override.scss +25 -25
@@ -1,661 +1,661 @@
1
- /* doc-before-container 主容器 */
2
- .docBeforeContainer {
3
- display: flex;
4
- margin-bottom: 1rem;
5
- align-items: center;
6
- justify-content: space-between;
7
- animation: slideDown 0.3s ease-out;
8
-
9
- .leftArea {
10
- display: flex;
11
- align-items: center;
12
- gap: 1rem;
13
- }
14
-
15
- .rightArea {
16
- display: flex;
17
- align-items: center;
18
- gap: 0.75rem;
19
- font-style: italic;
20
- font-size: 0.7rem;
21
- position: relative;
22
- }
23
- }
24
-
25
- /* PC 端专用按钮(移动端隐藏) */
26
- .pcOnly {
27
- display: block;
28
- }
29
-
30
- @media (max-width: 768px) {
31
- .pcOnly {
32
- display: none !important;
33
- }
34
- }
35
-
36
- @keyframes slideDown {
37
- from {
38
- opacity: 0;
39
- transform: translateY(-10px);
40
- }
41
- to {
42
- opacity: 1;
43
- transform: translateY(0);
44
- }
45
- }
46
-
47
- /* 默认隐藏,当屏幕宽度 >= 960px 时显示,因为当宽度小于 960px 时,侧边栏会自动隐藏 */
48
- .toggleSidebarBox,
49
- .contentToggleBox {
50
- display: none;
51
- }
52
-
53
- @media (min-width: 960px) {
54
- .toggleSidebarBox,
55
- .contentToggleBox {
56
- display: block;
57
- }
58
- }
59
-
60
- .vscodeBox {
61
- width: 1.5rem;
62
- height: 1.5rem;
63
- padding: 3px;
64
- transition: all 0.2s ease;
65
- border-radius: 4px;
66
-
67
- &:hover {
68
- background: var(--vp-c-bg-alt);
69
- transform: scale(1.05);
70
- }
71
-
72
- a {
73
- display: block;
74
- width: 100%;
75
- height: 100%;
76
- }
77
-
78
- img {
79
- width: 100%;
80
- height: 100%;
81
- display: block;
82
- }
83
- }
84
-
85
- /* 笔记的 GitHub 链接(移动端和 PC 端都显示) */
86
- .githubNoteBox {
87
- width: 1.5rem;
88
- height: 1.5rem;
89
- padding: 3px;
90
- transition: all 0.2s ease;
91
- border-radius: 4px;
92
-
93
- &:hover {
94
- background: var(--vp-c-bg-alt);
95
- transform: scale(1.05);
96
- }
97
-
98
- a {
99
- display: block;
100
- width: 100%;
101
- height: 100%;
102
- }
103
-
104
- img {
105
- width: 100%;
106
- height: 100%;
107
- display: block;
108
- }
109
- }
110
-
111
- /* 知识库的 GitHub 链接(仅首页显示) */
112
- .githubRepoBox {
113
- width: 1.5rem;
114
- height: 1.5rem;
115
- padding: 3px;
116
- transition: all 0.2s ease;
117
- border-radius: 4px;
118
-
119
- &:hover {
120
- background: var(--vp-c-bg-alt);
121
- transform: scale(1.05);
122
- }
123
-
124
- a {
125
- display: block;
126
- width: 100%;
127
- height: 100%;
128
- }
129
-
130
- img {
131
- width: 100%;
132
- height: 100%;
133
- display: block;
134
- }
135
- }
136
-
137
- .copyBox {
138
- width: 1em;
139
- height: 1em;
140
- position: relative;
141
-
142
- .tip {
143
- position: absolute;
144
- top: -1.5rem;
145
- left: -1rem;
146
- background: var(--vp-c-bg-soft);
147
- padding: 0.25rem 0.5rem;
148
- border-radius: 4px;
149
- font-size: 0.85rem;
150
- white-space: nowrap;
151
- animation: fadeIn 0.2s ease-out;
152
- }
153
-
154
- .copyRawFile {
155
- vertical-align: top;
156
- height: 100%;
157
- line-height: 100%;
158
- background: transparent;
159
- border: none;
160
- cursor: pointer;
161
- transition: transform 0.2s ease;
162
-
163
- &:hover {
164
- transform: scale(1.1);
165
- }
166
-
167
- .icon {
168
- width: 100%;
169
- height: 100%;
170
- display: block;
171
- }
172
- }
173
- }
174
-
175
- /* collapse all button */
176
- .collapseAllBtn {
177
- display: inline-block;
178
- margin-right: 8px;
179
- }
180
-
181
- .collapseAllButton {
182
- background: none;
183
- border: none;
184
- cursor: pointer;
185
- padding: 4px;
186
- display: inline-flex;
187
- align-items: center;
188
- justify-content: center;
189
- border-radius: 4px;
190
- transition: all 0.2s ease;
191
-
192
- &:hover {
193
- background: var(--vp-c-bg-soft);
194
- }
195
-
196
- img {
197
- width: 16px;
198
- height: 16px;
199
- opacity: 0.6;
200
- transition: opacity 0.2s ease;
201
- }
202
-
203
- &:hover img {
204
- opacity: 1;
205
- }
206
- }
207
-
208
- /* about icon button */
209
- .aboutBtn {
210
- display: inline-block;
211
- }
212
-
213
- .aboutIconButton {
214
- background: transparent;
215
- border: none;
216
- cursor: pointer;
217
- padding: 0.15rem;
218
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
219
- color: var(--vp-c-brand-1);
220
- font-weight: 700;
221
- font-size: 1rem;
222
- border-radius: 50%;
223
- width: 1.5rem;
224
- height: 1.5rem;
225
- display: flex;
226
- align-items: center;
227
- justify-content: center;
228
- position: relative;
229
-
230
- &::before {
231
- content: '';
232
- position: absolute;
233
- inset: -2px;
234
- border-radius: 50%;
235
- border: 2px solid var(--vp-c-brand-1);
236
- opacity: 0;
237
- transition: opacity 0.3s ease;
238
- }
239
-
240
- &:hover {
241
- font-size: 1.3rem;
242
- background: var(--vp-c-brand-soft);
243
- transform: rotate(180deg);
244
-
245
- &::before {
246
- opacity: 0.3;
247
- animation: pulse 1s ease-in-out infinite;
248
- }
249
- }
250
-
251
- &:active {
252
- transform: rotate(180deg) scale(0.95);
253
- }
254
- }
255
-
256
- @keyframes pulse {
257
- 0%,
258
- 100% {
259
- transform: scale(1);
260
- opacity: 0.3;
261
- }
262
- 50% {
263
- transform: scale(1.1);
264
- opacity: 0.5;
265
- }
266
- }
267
-
268
- /* time-modal-content: 通用容器 */
269
- .timeModalContent {
270
- display: flex;
271
- flex-direction: column;
272
- gap: 0.75rem;
273
- padding: 0.25rem 0;
274
- font-size: 0.95rem;
275
- }
276
-
277
- /* 每一行:移动端默认纵向排列(标签在上,值在下),在宽屏时变成左右两栏 */
278
- .timeLine {
279
- display: flex;
280
- flex-direction: column;
281
- gap: 0.25rem;
282
- align-items: flex-start;
283
- padding: 0.5rem;
284
- border-radius: 8px;
285
- transition: background-color 0.2s ease;
286
-
287
- &:hover {
288
- background-color: var(--vp-c-bg-soft);
289
- }
290
- }
291
-
292
- /* 标签(左侧) */
293
- .timeLabel {
294
- font-weight: 700;
295
- color: var(--vp-c-text);
296
- font-size: 0.98rem;
297
-
298
- strong {
299
- display: inline-flex;
300
- align-items: center;
301
- gap: 0.25rem;
302
- }
303
- }
304
-
305
- /* 值(右侧/下方) */
306
- .timeValue {
307
- color: var(--vp-c-text-2);
308
- font-size: 0.88rem;
309
- line-height: 1.35;
310
- word-break: break-word;
311
- font-family: var(--vp-font-family-mono);
312
- }
313
-
314
- /* GitHub 链接样式 */
315
- .githubLink {
316
- color: var(--vp-c-brand-1);
317
- text-decoration: none;
318
- transition: all 0.2s ease;
319
- display: inline-flex;
320
- align-items: center;
321
- gap: 0.25rem;
322
-
323
- &:hover {
324
- color: var(--vp-c-brand-2);
325
- text-decoration: underline;
326
- }
327
- }
328
-
329
- /* 宽屏样式:在 >=720px 时,改为左右两栏布局 */
330
- @media (min-width: 720px) {
331
- .timeModalContent {
332
- gap: 1rem;
333
- }
334
-
335
- .timeLine {
336
- flex-direction: row;
337
- align-items: center;
338
- justify-content: flex-start;
339
- gap: 1rem;
340
- }
341
-
342
- .timeLabel {
343
- width: 9.5rem;
344
- text-align: left;
345
- font-size: 1rem;
346
- }
347
-
348
- .timeValue {
349
- flex: 1;
350
- white-space: nowrap;
351
- overflow: hidden;
352
- text-overflow: ellipsis;
353
- }
354
- }
355
-
356
- /* 更明显的可触控目标(移动端) */
357
- @media (max-width: 520px) {
358
- .timeModalContent {
359
- gap: 0.9rem;
360
- }
361
-
362
- .timeLabel {
363
- font-size: 1.02rem;
364
- }
365
-
366
- .timeValue {
367
- font-size: 1rem;
368
- }
369
- }
370
-
371
- /* 侧边栏控制按钮容器 */
372
- .sidebarControls {
373
- display: flex;
374
- align-items: center;
375
- justify-content: center;
376
- padding: 8px 0;
377
- border-bottom: 1px solid var(--vp-c-divider);
378
-
379
- span {
380
- display: inline-flex;
381
- align-items: center;
382
- justify-content: center;
383
- padding: 8px;
384
- cursor: pointer;
385
- transition: all 0.2s ease;
386
- border-radius: 4px;
387
-
388
- img {
389
- width: 1rem;
390
- height: 1rem;
391
- display: block;
392
- transition: transform 0.3s ease;
393
- }
394
-
395
- &:hover {
396
- background: var(--vp-c-bg-alt);
397
-
398
- img {
399
- transform: scale(1.1);
400
- }
401
- }
402
-
403
- &:active {
404
- img {
405
- transform: scale(0.95);
406
- }
407
- }
408
-
409
- &.folded img {
410
- // transform: rotate(180deg);
411
- }
412
-
413
- &.folded:hover img {
414
- // transform: rotate(180deg) scale(1.1);
415
- }
416
- }
417
- }
418
-
419
- /*
420
- 404 页面样式已移至 global-components.css
421
- 相关全局类名:.not-found-container
422
- */
423
-
424
- /* 状态选择框样式 */
425
- .statusSelect {
426
- padding: 0.375rem 0.75rem;
427
- border: 1px solid var(--vp-c-divider);
428
- border-radius: 6px;
429
- background-color: var(--vp-c-bg);
430
- color: var(--vp-c-text-1);
431
- font-size: 0.875rem;
432
- font-family: inherit;
433
- cursor: pointer;
434
- transition: all 0.2s ease;
435
- min-width: 120px;
436
-
437
- &:hover:not(:disabled) {
438
- border-color: var(--vp-c-brand-1);
439
- background-color: var(--vp-c-bg-soft);
440
- }
441
-
442
- &:focus {
443
- outline: none;
444
- border-color: var(--vp-c-brand-1);
445
- box-shadow: 0 0 0 3px rgba(var(--vp-c-brand-rgb), 0.1);
446
- }
447
-
448
- &:disabled {
449
- opacity: 0.6;
450
- cursor: not-allowed;
451
- }
452
-
453
- option {
454
- padding: 0.5rem;
455
- background-color: var(--vp-c-bg);
456
- color: var(--vp-c-text-1);
457
- }
458
- }
459
-
460
- /* 标题输入框样式 */
461
- .titleInput {
462
- width: 100%;
463
- padding: 0.5rem 0.75rem;
464
- border: 1px solid var(--vp-c-divider);
465
- border-radius: 6px;
466
- background-color: var(--vp-c-bg);
467
- color: var(--vp-c-text-1);
468
- font-size: 0.875rem;
469
- font-family: inherit;
470
- transition: all 0.2s ease;
471
-
472
- &:hover:not(:disabled) {
473
- border-color: var(--vp-c-brand-1);
474
- background-color: var(--vp-c-bg-soft);
475
- }
476
-
477
- &:focus {
478
- outline: none;
479
- border-color: var(--vp-c-brand-1);
480
- box-shadow: 0 0 0 3px rgba(var(--vp-c-brand-rgb), 0.1);
481
- }
482
-
483
- &:disabled {
484
- opacity: 0.6;
485
- cursor: not-allowed;
486
- background-color: var(--vp-c-bg-soft);
487
- }
488
-
489
- &.error {
490
- border-color: var(--vp-c-danger-1);
491
-
492
- &:focus {
493
- box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
494
- }
495
- }
496
- }
497
-
498
- /* 错误提示样式 */
499
- .errorMessage {
500
- margin-top: 0.25rem;
501
- color: var(--vp-c-danger-1);
502
- font-size: 0.75rem;
503
- }
504
-
505
- /* 简介文本框样式 */
506
- .descriptionInput {
507
- width: 100%;
508
- padding: 0.5rem 0.75rem;
509
- border: 1px solid var(--vp-c-divider);
510
- border-radius: 6px;
511
- background-color: var(--vp-c-bg);
512
- color: var(--vp-c-text-1);
513
- font-size: 0.875rem;
514
- font-family: inherit;
515
- line-height: 1.5;
516
- resize: vertical;
517
- min-height: 3rem;
518
- transition: all 0.2s ease;
519
-
520
- &:hover:not(:disabled) {
521
- border-color: var(--vp-c-brand-1);
522
- background-color: var(--vp-c-bg-soft);
523
- }
524
-
525
- &:focus {
526
- outline: none;
527
- border-color: var(--vp-c-brand-1);
528
- box-shadow: 0 0 0 3px rgba(var(--vp-c-brand-rgb), 0.1);
529
- }
530
-
531
- &:disabled {
532
- opacity: 0.6;
533
- cursor: not-allowed;
534
- background-color: var(--vp-c-bg-soft);
535
- }
536
- }
537
-
538
- /* 操作栏样式 */
539
- .actionBar {
540
- display: flex;
541
- gap: 0.75rem;
542
- justify-content: flex-end;
543
- width: 100%;
544
- margin-top: 0.5rem;
545
- }
546
-
547
- /* 保存按钮样式 */
548
- .saveButton {
549
- padding: 0.625rem 1.5rem;
550
- background: linear-gradient(135deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
551
- color: white;
552
- border: none;
553
- border-radius: 8px;
554
- font-size: 0.95rem;
555
- font-weight: 600;
556
- cursor: pointer;
557
- transition: all 0.2s ease;
558
- box-shadow: 0 2px 8px rgba(var(--vp-c-brand-rgb), 0.3);
559
-
560
- &:hover:not(:disabled) {
561
- transform: translateY(-2px);
562
- box-shadow: 0 4px 12px rgba(var(--vp-c-brand-rgb), 0.4);
563
- }
564
-
565
- &:active:not(:disabled) {
566
- transform: translateY(0);
567
- }
568
-
569
- &.disabled,
570
- &:disabled {
571
- opacity: 0.4;
572
- cursor: not-allowed;
573
- transform: none;
574
- box-shadow: none;
575
- }
576
- }
577
-
578
- /* 重置按钮样式 */
579
- .resetButton {
580
- padding: 0.625rem 1.5rem;
581
- background: transparent;
582
- color: var(--vp-c-text-2);
583
- border: 1px solid var(--vp-c-divider);
584
- border-radius: 8px;
585
- font-size: 0.95rem;
586
- font-weight: 500;
587
- cursor: pointer;
588
- transition: all 0.2s ease;
589
-
590
- &:hover {
591
- color: var(--vp-c-text-1);
592
- border-color: var(--vp-c-brand-1);
593
- background: var(--vp-c-bg-soft);
594
- }
595
-
596
- &:active {
597
- transform: scale(0.98);
598
- }
599
- }
600
-
601
- /* Toast 提示样式 */
602
- .toast {
603
- position: fixed;
604
- bottom: 2rem;
605
- right: 2rem;
606
- padding: 0.75rem 1.5rem;
607
- background: var(--vp-c-brand-1);
608
- color: white;
609
- border-radius: 8px;
610
- font-size: 0.9rem;
611
- font-weight: 500;
612
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
613
- z-index: 9999;
614
- }
615
-
616
- /* Loading Toast 样式 */
617
- .loadingToast {
618
- position: fixed;
619
- bottom: 2rem;
620
- right: 2rem;
621
- padding: 0.75rem 1.5rem;
622
- background: var(--vp-c-bg-soft);
623
- color: var(--vp-c-text-1);
624
- border: 1px solid var(--vp-c-divider);
625
- border-radius: 8px;
626
- font-size: 0.9rem;
627
- font-weight: 500;
628
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
629
- z-index: 9999;
630
- display: flex;
631
- align-items: center;
632
- gap: 0.75rem;
633
- }
634
-
635
- /* Loading 旋转动画 */
636
- .loadingSpinner {
637
- width: 16px;
638
- height: 16px;
639
- border: 2px solid var(--vp-c-divider);
640
- border-top-color: var(--vp-c-brand-1);
641
- border-radius: 50%;
642
- animation: spin 0.8s linear infinite;
643
- }
644
-
645
- @keyframes spin {
646
- to {
647
- transform: rotate(360deg);
648
- }
649
- }
650
-
651
- /* Toast 过渡动画 */
652
- :global(.toast-enter-active),
653
- :global(.toast-leave-active) {
654
- transition: all 0.3s ease;
655
- }
656
-
657
- :global(.toast-enter-from),
658
- :global(.toast-leave-to) {
659
- opacity: 0;
660
- transform: translateY(20px);
661
- }
1
+ /* doc-before-container 主容器 */
2
+ .docBeforeContainer {
3
+ display: flex;
4
+ margin-bottom: 1rem;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ animation: slideDown 0.3s ease-out;
8
+
9
+ .leftArea {
10
+ display: flex;
11
+ align-items: center;
12
+ gap: 1rem;
13
+ }
14
+
15
+ .rightArea {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 0.75rem;
19
+ font-style: italic;
20
+ font-size: 0.7rem;
21
+ position: relative;
22
+ }
23
+ }
24
+
25
+ /* PC 端专用按钮(移动端隐藏) */
26
+ .pcOnly {
27
+ display: block;
28
+ }
29
+
30
+ @media (max-width: 768px) {
31
+ .pcOnly {
32
+ display: none !important;
33
+ }
34
+ }
35
+
36
+ @keyframes slideDown {
37
+ from {
38
+ opacity: 0;
39
+ transform: translateY(-10px);
40
+ }
41
+ to {
42
+ opacity: 1;
43
+ transform: translateY(0);
44
+ }
45
+ }
46
+
47
+ /* 默认隐藏,当屏幕宽度 >= 960px 时显示,因为当宽度小于 960px 时,侧边栏会自动隐藏 */
48
+ .toggleSidebarBox,
49
+ .contentToggleBox {
50
+ display: none;
51
+ }
52
+
53
+ @media (min-width: 960px) {
54
+ .toggleSidebarBox,
55
+ .contentToggleBox {
56
+ display: block;
57
+ }
58
+ }
59
+
60
+ .vscodeBox {
61
+ width: 1.5rem;
62
+ height: 1.5rem;
63
+ padding: 3px;
64
+ transition: all 0.2s ease;
65
+ border-radius: 4px;
66
+
67
+ &:hover {
68
+ background: var(--vp-c-bg-alt);
69
+ transform: scale(1.05);
70
+ }
71
+
72
+ a {
73
+ display: block;
74
+ width: 100%;
75
+ height: 100%;
76
+ }
77
+
78
+ img {
79
+ width: 100%;
80
+ height: 100%;
81
+ display: block;
82
+ }
83
+ }
84
+
85
+ /* 笔记的 GitHub 链接(移动端和 PC 端都显示) */
86
+ .githubNoteBox {
87
+ width: 1.5rem;
88
+ height: 1.5rem;
89
+ padding: 3px;
90
+ transition: all 0.2s ease;
91
+ border-radius: 4px;
92
+
93
+ &:hover {
94
+ background: var(--vp-c-bg-alt);
95
+ transform: scale(1.05);
96
+ }
97
+
98
+ a {
99
+ display: block;
100
+ width: 100%;
101
+ height: 100%;
102
+ }
103
+
104
+ img {
105
+ width: 100%;
106
+ height: 100%;
107
+ display: block;
108
+ }
109
+ }
110
+
111
+ /* 知识库的 GitHub 链接(仅首页显示) */
112
+ .githubRepoBox {
113
+ width: 1.5rem;
114
+ height: 1.5rem;
115
+ padding: 3px;
116
+ transition: all 0.2s ease;
117
+ border-radius: 4px;
118
+
119
+ &:hover {
120
+ background: var(--vp-c-bg-alt);
121
+ transform: scale(1.05);
122
+ }
123
+
124
+ a {
125
+ display: block;
126
+ width: 100%;
127
+ height: 100%;
128
+ }
129
+
130
+ img {
131
+ width: 100%;
132
+ height: 100%;
133
+ display: block;
134
+ }
135
+ }
136
+
137
+ .copyBox {
138
+ width: 1em;
139
+ height: 1em;
140
+ position: relative;
141
+
142
+ .tip {
143
+ position: absolute;
144
+ top: -1.5rem;
145
+ left: -1rem;
146
+ background: var(--vp-c-bg-soft);
147
+ padding: 0.25rem 0.5rem;
148
+ border-radius: 4px;
149
+ font-size: 0.85rem;
150
+ white-space: nowrap;
151
+ animation: fadeIn 0.2s ease-out;
152
+ }
153
+
154
+ .copyRawFile {
155
+ vertical-align: top;
156
+ height: 100%;
157
+ line-height: 100%;
158
+ background: transparent;
159
+ border: none;
160
+ cursor: pointer;
161
+ transition: transform 0.2s ease;
162
+
163
+ &:hover {
164
+ transform: scale(1.1);
165
+ }
166
+
167
+ .icon {
168
+ width: 100%;
169
+ height: 100%;
170
+ display: block;
171
+ }
172
+ }
173
+ }
174
+
175
+ /* collapse all button */
176
+ .collapseAllBtn {
177
+ display: inline-block;
178
+ margin-right: 8px;
179
+ }
180
+
181
+ .collapseAllButton {
182
+ background: none;
183
+ border: none;
184
+ cursor: pointer;
185
+ padding: 4px;
186
+ display: inline-flex;
187
+ align-items: center;
188
+ justify-content: center;
189
+ border-radius: 4px;
190
+ transition: all 0.2s ease;
191
+
192
+ &:hover {
193
+ background: var(--vp-c-bg-soft);
194
+ }
195
+
196
+ img {
197
+ width: 16px;
198
+ height: 16px;
199
+ opacity: 0.6;
200
+ transition: opacity 0.2s ease;
201
+ }
202
+
203
+ &:hover img {
204
+ opacity: 1;
205
+ }
206
+ }
207
+
208
+ /* about icon button */
209
+ .aboutBtn {
210
+ display: inline-block;
211
+ }
212
+
213
+ .aboutIconButton {
214
+ background: transparent;
215
+ border: none;
216
+ cursor: pointer;
217
+ padding: 0.15rem;
218
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
219
+ color: var(--vp-c-brand-1);
220
+ font-weight: 700;
221
+ font-size: 1rem;
222
+ border-radius: 50%;
223
+ width: 1.5rem;
224
+ height: 1.5rem;
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ position: relative;
229
+
230
+ &::before {
231
+ content: '';
232
+ position: absolute;
233
+ inset: -2px;
234
+ border-radius: 50%;
235
+ border: 2px solid var(--vp-c-brand-1);
236
+ opacity: 0;
237
+ transition: opacity 0.3s ease;
238
+ }
239
+
240
+ &:hover {
241
+ font-size: 1.3rem;
242
+ background: var(--vp-c-brand-soft);
243
+ transform: rotate(180deg);
244
+
245
+ &::before {
246
+ opacity: 0.3;
247
+ animation: pulse 1s ease-in-out infinite;
248
+ }
249
+ }
250
+
251
+ &:active {
252
+ transform: rotate(180deg) scale(0.95);
253
+ }
254
+ }
255
+
256
+ @keyframes pulse {
257
+ 0%,
258
+ 100% {
259
+ transform: scale(1);
260
+ opacity: 0.3;
261
+ }
262
+ 50% {
263
+ transform: scale(1.1);
264
+ opacity: 0.5;
265
+ }
266
+ }
267
+
268
+ /* time-modal-content: 通用容器 */
269
+ .timeModalContent {
270
+ display: flex;
271
+ flex-direction: column;
272
+ gap: 0.75rem;
273
+ padding: 0.25rem 0;
274
+ font-size: 0.95rem;
275
+ }
276
+
277
+ /* 每一行:移动端默认纵向排列(标签在上,值在下),在宽屏时变成左右两栏 */
278
+ .timeLine {
279
+ display: flex;
280
+ flex-direction: column;
281
+ gap: 0.25rem;
282
+ align-items: flex-start;
283
+ padding: 0.5rem;
284
+ border-radius: 8px;
285
+ transition: background-color 0.2s ease;
286
+
287
+ &:hover {
288
+ background-color: var(--vp-c-bg-soft);
289
+ }
290
+ }
291
+
292
+ /* 标签(左侧) */
293
+ .timeLabel {
294
+ font-weight: 700;
295
+ color: var(--vp-c-text);
296
+ font-size: 0.98rem;
297
+
298
+ strong {
299
+ display: inline-flex;
300
+ align-items: center;
301
+ gap: 0.25rem;
302
+ }
303
+ }
304
+
305
+ /* 值(右侧/下方) */
306
+ .timeValue {
307
+ color: var(--vp-c-text-2);
308
+ font-size: 0.88rem;
309
+ line-height: 1.35;
310
+ word-break: break-word;
311
+ font-family: var(--vp-font-family-mono);
312
+ }
313
+
314
+ /* GitHub 链接样式 */
315
+ .githubLink {
316
+ color: var(--vp-c-brand-1);
317
+ text-decoration: none;
318
+ transition: all 0.2s ease;
319
+ display: inline-flex;
320
+ align-items: center;
321
+ gap: 0.25rem;
322
+
323
+ &:hover {
324
+ color: var(--vp-c-brand-2);
325
+ text-decoration: underline;
326
+ }
327
+ }
328
+
329
+ /* 宽屏样式:在 >=720px 时,改为左右两栏布局 */
330
+ @media (min-width: 720px) {
331
+ .timeModalContent {
332
+ gap: 1rem;
333
+ }
334
+
335
+ .timeLine {
336
+ flex-direction: row;
337
+ align-items: center;
338
+ justify-content: flex-start;
339
+ gap: 1rem;
340
+ }
341
+
342
+ .timeLabel {
343
+ width: 9.5rem;
344
+ text-align: left;
345
+ font-size: 1rem;
346
+ }
347
+
348
+ .timeValue {
349
+ flex: 1;
350
+ white-space: nowrap;
351
+ overflow: hidden;
352
+ text-overflow: ellipsis;
353
+ }
354
+ }
355
+
356
+ /* 更明显的可触控目标(移动端) */
357
+ @media (max-width: 520px) {
358
+ .timeModalContent {
359
+ gap: 0.9rem;
360
+ }
361
+
362
+ .timeLabel {
363
+ font-size: 1.02rem;
364
+ }
365
+
366
+ .timeValue {
367
+ font-size: 1rem;
368
+ }
369
+ }
370
+
371
+ /* 侧边栏控制按钮容器 */
372
+ .sidebarControls {
373
+ display: flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ padding: 8px 0;
377
+ border-bottom: 1px solid var(--vp-c-divider);
378
+
379
+ span {
380
+ display: inline-flex;
381
+ align-items: center;
382
+ justify-content: center;
383
+ padding: 8px;
384
+ cursor: pointer;
385
+ transition: all 0.2s ease;
386
+ border-radius: 4px;
387
+
388
+ img {
389
+ width: 1rem;
390
+ height: 1rem;
391
+ display: block;
392
+ transition: transform 0.3s ease;
393
+ }
394
+
395
+ &:hover {
396
+ background: var(--vp-c-bg-alt);
397
+
398
+ img {
399
+ transform: scale(1.1);
400
+ }
401
+ }
402
+
403
+ &:active {
404
+ img {
405
+ transform: scale(0.95);
406
+ }
407
+ }
408
+
409
+ &.folded img {
410
+ // transform: rotate(180deg);
411
+ }
412
+
413
+ &.folded:hover img {
414
+ // transform: rotate(180deg) scale(1.1);
415
+ }
416
+ }
417
+ }
418
+
419
+ /*
420
+ 404 页面样式已移至 global-components.css
421
+ 相关全局类名:.not-found-container
422
+ */
423
+
424
+ /* 状态选择框样式 */
425
+ .statusSelect {
426
+ padding: 0.375rem 0.75rem;
427
+ border: 1px solid var(--vp-c-divider);
428
+ border-radius: 6px;
429
+ background-color: var(--vp-c-bg);
430
+ color: var(--vp-c-text-1);
431
+ font-size: 0.875rem;
432
+ font-family: inherit;
433
+ cursor: pointer;
434
+ transition: all 0.2s ease;
435
+ min-width: 120px;
436
+
437
+ &:hover:not(:disabled) {
438
+ border-color: var(--vp-c-brand-1);
439
+ background-color: var(--vp-c-bg-soft);
440
+ }
441
+
442
+ &:focus {
443
+ outline: none;
444
+ border-color: var(--vp-c-brand-1);
445
+ box-shadow: 0 0 0 3px rgba(var(--vp-c-brand-rgb), 0.1);
446
+ }
447
+
448
+ &:disabled {
449
+ opacity: 0.6;
450
+ cursor: not-allowed;
451
+ }
452
+
453
+ option {
454
+ padding: 0.5rem;
455
+ background-color: var(--vp-c-bg);
456
+ color: var(--vp-c-text-1);
457
+ }
458
+ }
459
+
460
+ /* 标题输入框样式 */
461
+ .titleInput {
462
+ width: 100%;
463
+ padding: 0.5rem 0.75rem;
464
+ border: 1px solid var(--vp-c-divider);
465
+ border-radius: 6px;
466
+ background-color: var(--vp-c-bg);
467
+ color: var(--vp-c-text-1);
468
+ font-size: 0.875rem;
469
+ font-family: inherit;
470
+ transition: all 0.2s ease;
471
+
472
+ &:hover:not(:disabled) {
473
+ border-color: var(--vp-c-brand-1);
474
+ background-color: var(--vp-c-bg-soft);
475
+ }
476
+
477
+ &:focus {
478
+ outline: none;
479
+ border-color: var(--vp-c-brand-1);
480
+ box-shadow: 0 0 0 3px rgba(var(--vp-c-brand-rgb), 0.1);
481
+ }
482
+
483
+ &:disabled {
484
+ opacity: 0.6;
485
+ cursor: not-allowed;
486
+ background-color: var(--vp-c-bg-soft);
487
+ }
488
+
489
+ &.error {
490
+ border-color: var(--vp-c-danger-1);
491
+
492
+ &:focus {
493
+ box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
494
+ }
495
+ }
496
+ }
497
+
498
+ /* 错误提示样式 */
499
+ .errorMessage {
500
+ margin-top: 0.25rem;
501
+ color: var(--vp-c-danger-1);
502
+ font-size: 0.75rem;
503
+ }
504
+
505
+ /* 简介文本框样式 */
506
+ .descriptionInput {
507
+ width: 100%;
508
+ padding: 0.5rem 0.75rem;
509
+ border: 1px solid var(--vp-c-divider);
510
+ border-radius: 6px;
511
+ background-color: var(--vp-c-bg);
512
+ color: var(--vp-c-text-1);
513
+ font-size: 0.875rem;
514
+ font-family: inherit;
515
+ line-height: 1.5;
516
+ resize: vertical;
517
+ min-height: 3rem;
518
+ transition: all 0.2s ease;
519
+
520
+ &:hover:not(:disabled) {
521
+ border-color: var(--vp-c-brand-1);
522
+ background-color: var(--vp-c-bg-soft);
523
+ }
524
+
525
+ &:focus {
526
+ outline: none;
527
+ border-color: var(--vp-c-brand-1);
528
+ box-shadow: 0 0 0 3px rgba(var(--vp-c-brand-rgb), 0.1);
529
+ }
530
+
531
+ &:disabled {
532
+ opacity: 0.6;
533
+ cursor: not-allowed;
534
+ background-color: var(--vp-c-bg-soft);
535
+ }
536
+ }
537
+
538
+ /* 操作栏样式 */
539
+ .actionBar {
540
+ display: flex;
541
+ gap: 0.75rem;
542
+ justify-content: flex-end;
543
+ width: 100%;
544
+ margin-top: 0.5rem;
545
+ }
546
+
547
+ /* 保存按钮样式 */
548
+ .saveButton {
549
+ padding: 0.625rem 1.5rem;
550
+ background: linear-gradient(135deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
551
+ color: white;
552
+ border: none;
553
+ border-radius: 8px;
554
+ font-size: 0.95rem;
555
+ font-weight: 600;
556
+ cursor: pointer;
557
+ transition: all 0.2s ease;
558
+ box-shadow: 0 2px 8px rgba(var(--vp-c-brand-rgb), 0.3);
559
+
560
+ &:hover:not(:disabled) {
561
+ transform: translateY(-2px);
562
+ box-shadow: 0 4px 12px rgba(var(--vp-c-brand-rgb), 0.4);
563
+ }
564
+
565
+ &:active:not(:disabled) {
566
+ transform: translateY(0);
567
+ }
568
+
569
+ &.disabled,
570
+ &:disabled {
571
+ opacity: 0.4;
572
+ cursor: not-allowed;
573
+ transform: none;
574
+ box-shadow: none;
575
+ }
576
+ }
577
+
578
+ /* 重置按钮样式 */
579
+ .resetButton {
580
+ padding: 0.625rem 1.5rem;
581
+ background: transparent;
582
+ color: var(--vp-c-text-2);
583
+ border: 1px solid var(--vp-c-divider);
584
+ border-radius: 8px;
585
+ font-size: 0.95rem;
586
+ font-weight: 500;
587
+ cursor: pointer;
588
+ transition: all 0.2s ease;
589
+
590
+ &:hover {
591
+ color: var(--vp-c-text-1);
592
+ border-color: var(--vp-c-brand-1);
593
+ background: var(--vp-c-bg-soft);
594
+ }
595
+
596
+ &:active {
597
+ transform: scale(0.98);
598
+ }
599
+ }
600
+
601
+ /* Toast 提示样式 */
602
+ .toast {
603
+ position: fixed;
604
+ bottom: 2rem;
605
+ right: 2rem;
606
+ padding: 0.75rem 1.5rem;
607
+ background: var(--vp-c-brand-1);
608
+ color: white;
609
+ border-radius: 8px;
610
+ font-size: 0.9rem;
611
+ font-weight: 500;
612
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
613
+ z-index: 9999;
614
+ }
615
+
616
+ /* Loading Toast 样式 */
617
+ .loadingToast {
618
+ position: fixed;
619
+ bottom: 2rem;
620
+ right: 2rem;
621
+ padding: 0.75rem 1.5rem;
622
+ background: var(--vp-c-bg-soft);
623
+ color: var(--vp-c-text-1);
624
+ border: 1px solid var(--vp-c-divider);
625
+ border-radius: 8px;
626
+ font-size: 0.9rem;
627
+ font-weight: 500;
628
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
629
+ z-index: 9999;
630
+ display: flex;
631
+ align-items: center;
632
+ gap: 0.75rem;
633
+ }
634
+
635
+ /* Loading 旋转动画 */
636
+ .loadingSpinner {
637
+ width: 16px;
638
+ height: 16px;
639
+ border: 2px solid var(--vp-c-divider);
640
+ border-top-color: var(--vp-c-brand-1);
641
+ border-radius: 50%;
642
+ animation: spin 0.8s linear infinite;
643
+ }
644
+
645
+ @keyframes spin {
646
+ to {
647
+ transform: rotate(360deg);
648
+ }
649
+ }
650
+
651
+ /* Toast 过渡动画 */
652
+ :global(.toast-enter-active),
653
+ :global(.toast-leave-active) {
654
+ transition: all 0.3s ease;
655
+ }
656
+
657
+ :global(.toast-enter-from),
658
+ :global(.toast-leave-to) {
659
+ opacity: 0;
660
+ transform: translateY(20px);
661
+ }