@tnotesjs/core 0.1.21 → 0.1.23
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 +87 -87
- package/dist/{chunk-4MO7F7Q4.js → chunk-BSTQOJVE.js} +1 -1
- package/dist/{chunk-SQVHJR2Z.js → chunk-O4DCXHOV.js} +0 -3
- package/dist/cli/index.js +2 -2
- package/dist/index.js +1 -1
- package/dist/vitepress/config/index.js +2 -2
- package/package.json +3 -4
- package/types/config.ts +60 -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 +39 -39
- package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +20 -20
- package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +369 -369
- package/vitepress/components/CodeBlockFullscreen/index.ts +209 -213
- package/vitepress/components/CodeBlockFullscreen/styles.css +126 -126
- package/vitepress/components/Discussions/Discussions.vue +244 -211
- package/vitepress/components/EnWordList/EnWordList.vue +663 -543
- package/vitepress/components/EnWordList/RightClickMenu.vue +89 -66
- package/vitepress/components/Footprints/Footprints.vue +472 -377
- package/vitepress/components/Layout/AboutModal.vue +331 -105
- package/vitepress/components/Layout/AboutPanel.vue +484 -270
- package/vitepress/components/Layout/ContentCollapse.vue +590 -603
- package/vitepress/components/Layout/CustomSidebar.vue +817 -817
- package/vitepress/components/Layout/DocBeforeControls.vue +351 -149
- package/vitepress/components/Layout/DocFooter.vue +233 -233
- package/vitepress/components/Layout/ImagePreview.vue +484 -281
- package/vitepress/components/Layout/Layout.vue +744 -621
- package/vitepress/components/Layout/NavBarSettingsTrigger.vue +0 -2
- package/vitepress/components/Layout/NoteStatus.vue +140 -140
- package/vitepress/components/Layout/SidebarItems.vue +1083 -1083
- package/vitepress/components/Layout/SidebarNavBefore.vue +170 -171
- package/vitepress/components/Layout/SidebarResizeHandle.vue +311 -319
- package/vitepress/components/Layout/Swiper.vue +167 -167
- package/vitepress/components/Layout/ToggleFullContent.vue +47 -35
- package/vitepress/components/Layout/ToggleSidebar.vue +37 -26
- package/vitepress/components/Layout/composables/useCollapseControl.ts +88 -88
- package/vitepress/components/Layout/composables/useNoteConfig.ts +119 -119
- package/vitepress/components/Layout/composables/useNoteSave.ts +178 -178
- package/vitepress/components/Layout/composables/useNoteValidation.ts +85 -85
- package/vitepress/components/Layout/composables/useRedirect.ts +113 -113
- package/vitepress/components/Layout/composables/useSidebarLayout.ts +122 -122
- package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +85 -85
- package/vitepress/components/Layout/homeReadme.data.ts +124 -124
- package/vitepress/components/LoadingPage/LoadingPage.vue +1 -6
- package/vitepress/components/MarkMap/MarkMap.vue +564 -405
- package/vitepress/components/Mermaid/Mermaid.vue +643 -365
- package/vitepress/components/NotesTable/NotesTable.vue +174 -98
- package/vitepress/components/NotesTable/README.md +67 -67
- package/vitepress/components/Settings/Settings.vue +711 -334
- package/vitepress/components/Settings/SettingsDialog.vue +1 -11
- package/vitepress/components/SidebarCard/MindMapView.vue +484 -484
- package/vitepress/components/SidebarCard/NotesTrendChart.vue +108 -108
- package/vitepress/components/SidebarCard/SidebarCard.vue +945 -946
- package/vitepress/components/Tooltip/Tooltip.vue +70 -70
- package/vitepress/components/constants.ts +109 -109
- 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 +169 -169
- 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 +368 -367
- package/vitepress/configs/theme.config.ts +108 -108
- package/vitepress/plugins/buildProgressPlugin.ts +434 -434
- package/vitepress/plugins/getNoteByConfigIdPlugin.ts +107 -107
- package/vitepress/plugins/renameNotePlugin.ts +68 -68
- package/vitepress/plugins/sidebarStructurePlugin.ts +260 -260
- package/vitepress/plugins/updateConfigPlugin.ts +63 -63
- package/vitepress/theme/index.ts +137 -137
- package/vitepress/theme/styles/base.scss +66 -64
- package/vitepress/theme/styles/components/404.scss +31 -31
- package/vitepress/theme/styles/components/collapse.scss +172 -172
- 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 +78 -78
- package/vitepress/theme/styles/utilities.scss +39 -39
- package/vitepress/theme/styles/vitepress-override.scss +25 -25
- package/vitepress/components/Discussions/Discussions.module.scss +0 -32
- package/vitepress/components/EnWordList/EnWordList.module.scss +0 -124
- package/vitepress/components/EnWordList/RightClickMenu.module.scss +0 -22
- package/vitepress/components/Footprints/Footprints.module.scss +0 -93
- package/vitepress/components/Layout/AboutModal.module.scss +0 -233
- package/vitepress/components/Layout/ImagePreview.module.scss +0 -201
- package/vitepress/components/Layout/Layout.module.scss +0 -661
- package/vitepress/components/Layout/ToggleFullContent.module.scss +0 -11
- package/vitepress/components/Layout/ToggleSidebar.module.scss +0 -11
- package/vitepress/components/MarkMap/MarkMap.module.scss +0 -159
- package/vitepress/components/Mermaid/Mermaid.module.scss +0 -275
- package/vitepress/components/NotesTable/NotesTable.module.scss +0 -77
- package/vitepress/components/Settings/Settings.module.scss +0 -375
|
@@ -1,149 +1,351 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
<div
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
v-show="!isFullContentMode"
|
|
7
|
-
>
|
|
8
|
-
<ToggleSidebar />
|
|
9
|
-
</div>
|
|
10
|
-
<div
|
|
11
|
-
<a
|
|
12
|
-
:href="vscodeNotesDir"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
import
|
|
90
|
-
import {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="docBeforeContainer">
|
|
3
|
+
<div class="leftArea">
|
|
4
|
+
<div
|
|
5
|
+
class="toggleSidebarBox pcOnly"
|
|
6
|
+
v-show="!isFullContentMode"
|
|
7
|
+
>
|
|
8
|
+
<ToggleSidebar />
|
|
9
|
+
</div>
|
|
10
|
+
<div class="vscodeBox pcOnly" v-show="vscodeNotesDir">
|
|
11
|
+
<a
|
|
12
|
+
:href="vscodeNotesDir"
|
|
13
|
+
title="open in vscode"
|
|
14
|
+
target="_blank"
|
|
15
|
+
>
|
|
16
|
+
<img :src="icon__vscode" alt="open in vscode" />
|
|
17
|
+
</a>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="contentToggleBox pcOnly">
|
|
20
|
+
<ToggleFullContent />
|
|
21
|
+
</div>
|
|
22
|
+
<!-- 知识库的 GitHub 链接(仅首页显示,PC 端) -->
|
|
23
|
+
<div class="githubRepoBox pcOnly" v-show="isHomeReadme">
|
|
24
|
+
<a
|
|
25
|
+
:href="`https://github.com/tnotesjs/${vpData.page.value.title.toLowerCase()}/blob/main/README.md`"
|
|
26
|
+
:title="`tnotesjs github - ${vpData.page.value.title.toLowerCase()} 笔记仓库链接`"
|
|
27
|
+
target="_blank"
|
|
28
|
+
rel="noopener"
|
|
29
|
+
>
|
|
30
|
+
<img :src="icon__github" alt="github icon" />
|
|
31
|
+
</a>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="rightArea">
|
|
35
|
+
<!-- 一键复制笔记内容按钮 -->
|
|
36
|
+
<div class="collapseAllBtn" v-show="currentNoteId">
|
|
37
|
+
<button
|
|
38
|
+
class="collapseAllButton"
|
|
39
|
+
@click="copyNoteContent"
|
|
40
|
+
title="复制笔记原始内容"
|
|
41
|
+
type="button"
|
|
42
|
+
>
|
|
43
|
+
<img :src="icon__clipboard" alt="copy note content" />
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
46
|
+
<Transition name="toast">
|
|
47
|
+
<div v-if="showCopyToast" class="toast">✓ 复制成功</div>
|
|
48
|
+
</Transition>
|
|
49
|
+
<!-- 全局折叠/展开按钮 -->
|
|
50
|
+
<div
|
|
51
|
+
class="collapseAllBtn"
|
|
52
|
+
v-show="currentNoteId || isHomeReadme"
|
|
53
|
+
>
|
|
54
|
+
<button
|
|
55
|
+
class="collapseAllButton"
|
|
56
|
+
@click="toggleAllCollapse"
|
|
57
|
+
:title="allCollapsed ? '展开所有区域' : '折叠所有区域'"
|
|
58
|
+
type="button"
|
|
59
|
+
>
|
|
60
|
+
<img :src="icon__fold" alt="collapse all" />
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- 单个图标,点击打开 modal,只在有笔记数据的页面显示 -->
|
|
64
|
+
<div
|
|
65
|
+
class="aboutBtn"
|
|
66
|
+
v-show="
|
|
67
|
+
(currentNoteId && created_at && updated_at) ||
|
|
68
|
+
(isHomeReadme && homeReadmeCreatedAt && homeReadmeUpdatedAt)
|
|
69
|
+
"
|
|
70
|
+
>
|
|
71
|
+
<button
|
|
72
|
+
class="aboutIconButton"
|
|
73
|
+
@click="$emit('open-time-modal')"
|
|
74
|
+
:title="isHomeReadme ? '关于这个知识库' : '关于这篇笔记'"
|
|
75
|
+
type="button"
|
|
76
|
+
>
|
|
77
|
+
!
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script setup lang="ts">
|
|
85
|
+
import { useData } from 'vitepress'
|
|
86
|
+
import { ref } from 'vue'
|
|
87
|
+
|
|
88
|
+
import ToggleFullContent from './ToggleFullContent.vue'
|
|
89
|
+
import ToggleSidebar from './ToggleSidebar.vue'
|
|
90
|
+
import {
|
|
91
|
+
icon__github,
|
|
92
|
+
icon__vscode,
|
|
93
|
+
icon__fold,
|
|
94
|
+
icon__clipboard,
|
|
95
|
+
} from '../../assets/icons'
|
|
96
|
+
|
|
97
|
+
const props = defineProps<{
|
|
98
|
+
isFullContentMode: boolean
|
|
99
|
+
vscodeNotesDir: string
|
|
100
|
+
isHomeReadme: boolean
|
|
101
|
+
currentNoteId: string | null
|
|
102
|
+
created_at: string | undefined
|
|
103
|
+
updated_at: string | undefined
|
|
104
|
+
homeReadmeCreatedAt: string | undefined
|
|
105
|
+
homeReadmeUpdatedAt: string | undefined
|
|
106
|
+
timeModalOpen: boolean
|
|
107
|
+
allCollapsed: boolean
|
|
108
|
+
}>()
|
|
109
|
+
|
|
110
|
+
const showCopyToast = ref(false)
|
|
111
|
+
let copyToastTimer: ReturnType<typeof setTimeout> | null = null
|
|
112
|
+
|
|
113
|
+
async function copyNoteContent() {
|
|
114
|
+
const encoded = vpData.frontmatter.value.rawContent
|
|
115
|
+
if (!encoded) return
|
|
116
|
+
try {
|
|
117
|
+
// rawContent 为 base64(UTF-8) —— 在构建期编码以规避 VitePress 把
|
|
118
|
+
// `<script>` 字面量注入 SFC 时的多重正则误匹配。
|
|
119
|
+
const bin = atob(encoded)
|
|
120
|
+
const bytes = Uint8Array.from(bin, (c) => c.charCodeAt(0))
|
|
121
|
+
const raw = new TextDecoder('utf-8').decode(bytes)
|
|
122
|
+
await navigator.clipboard.writeText(raw)
|
|
123
|
+
if (copyToastTimer) clearTimeout(copyToastTimer)
|
|
124
|
+
showCopyToast.value = true
|
|
125
|
+
copyToastTimer = setTimeout(() => {
|
|
126
|
+
showCopyToast.value = false
|
|
127
|
+
}, 2000)
|
|
128
|
+
} catch (e) {
|
|
129
|
+
console.error('复制失败', e)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const emit = defineEmits<{
|
|
134
|
+
(e: 'open-time-modal'): void
|
|
135
|
+
(e: 'toggle-all-collapse'): void
|
|
136
|
+
}>()
|
|
137
|
+
|
|
138
|
+
const vpData = useData()
|
|
139
|
+
|
|
140
|
+
function toggleAllCollapse() {
|
|
141
|
+
emit('toggle-all-collapse')
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style scoped lang="scss">
|
|
146
|
+
/* doc-before-container 主容器 */
|
|
147
|
+
.docBeforeContainer {
|
|
148
|
+
display: flex;
|
|
149
|
+
margin-bottom: 1rem;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
animation: slideDown 0.3s ease-out;
|
|
153
|
+
|
|
154
|
+
.leftArea {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 1rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.rightArea {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
gap: 0.75rem;
|
|
164
|
+
font-style: italic;
|
|
165
|
+
font-size: 0.7rem;
|
|
166
|
+
position: relative;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* 默认隐藏,当屏幕宽度 >= 960px 时显示,因为当宽度小于 960px 时,侧边栏会自动隐藏 */
|
|
170
|
+
.toggleSidebarBox,
|
|
171
|
+
.contentToggleBox {
|
|
172
|
+
display: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.vscodeBox,
|
|
176
|
+
.githubRepoBox {
|
|
177
|
+
width: 1.5rem;
|
|
178
|
+
height: 1.5rem;
|
|
179
|
+
padding: 3px;
|
|
180
|
+
transition: all 0.2s ease;
|
|
181
|
+
border-radius: 4px;
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
background: var(--vp-c-bg-alt);
|
|
185
|
+
transform: scale(1.05);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
a {
|
|
189
|
+
display: block;
|
|
190
|
+
width: 100%;
|
|
191
|
+
height: 100%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
img {
|
|
195
|
+
width: 100%;
|
|
196
|
+
height: 100%;
|
|
197
|
+
display: block;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* collapse all button */
|
|
202
|
+
.collapseAllBtn {
|
|
203
|
+
display: inline-block;
|
|
204
|
+
margin-right: 8px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.collapseAllButton {
|
|
208
|
+
background: none;
|
|
209
|
+
border: none;
|
|
210
|
+
cursor: pointer;
|
|
211
|
+
padding: 4px;
|
|
212
|
+
display: inline-flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
border-radius: 4px;
|
|
216
|
+
transition: all 0.2s ease;
|
|
217
|
+
|
|
218
|
+
&:hover {
|
|
219
|
+
background: var(--vp-c-bg-soft);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
img {
|
|
223
|
+
width: 16px;
|
|
224
|
+
height: 16px;
|
|
225
|
+
opacity: 0.6;
|
|
226
|
+
transition: opacity 0.2s ease;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&:hover img {
|
|
230
|
+
opacity: 1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* about icon button */
|
|
235
|
+
.aboutBtn {
|
|
236
|
+
display: inline-block;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.aboutIconButton {
|
|
240
|
+
background: transparent;
|
|
241
|
+
border: none;
|
|
242
|
+
cursor: pointer;
|
|
243
|
+
padding: 0.15rem;
|
|
244
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
245
|
+
color: var(--vp-c-brand-1);
|
|
246
|
+
font-weight: 700;
|
|
247
|
+
font-size: 1rem;
|
|
248
|
+
border-radius: 50%;
|
|
249
|
+
width: 1.5rem;
|
|
250
|
+
height: 1.5rem;
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
justify-content: center;
|
|
254
|
+
position: relative;
|
|
255
|
+
|
|
256
|
+
&::before {
|
|
257
|
+
content: '';
|
|
258
|
+
position: absolute;
|
|
259
|
+
inset: -2px;
|
|
260
|
+
border-radius: 50%;
|
|
261
|
+
border: 2px solid var(--vp-c-brand-1);
|
|
262
|
+
opacity: 0;
|
|
263
|
+
transition: opacity 0.3s ease;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&:hover {
|
|
267
|
+
font-size: 1.3rem;
|
|
268
|
+
background: var(--vp-c-brand-soft);
|
|
269
|
+
transform: rotate(180deg);
|
|
270
|
+
|
|
271
|
+
&::before {
|
|
272
|
+
opacity: 0.3;
|
|
273
|
+
animation: pulse 1s ease-in-out infinite;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&:active {
|
|
278
|
+
transform: rotate(180deg) scale(0.95);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.toast {
|
|
283
|
+
position: fixed;
|
|
284
|
+
bottom: 2rem;
|
|
285
|
+
right: 2rem;
|
|
286
|
+
padding: 0.75rem 1.5rem;
|
|
287
|
+
background: var(--vp-c-brand-1);
|
|
288
|
+
color: white;
|
|
289
|
+
border-radius: 8px;
|
|
290
|
+
font-size: 0.9rem;
|
|
291
|
+
font-weight: 500;
|
|
292
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
293
|
+
z-index: 9999;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* PC 端专用按钮(移动端隐藏) */
|
|
298
|
+
.pcOnly {
|
|
299
|
+
display: block;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@media (max-width: 768px) {
|
|
303
|
+
.pcOnly {
|
|
304
|
+
display: none !important;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@media (min-width: 960px) {
|
|
309
|
+
.docBeforeContainer {
|
|
310
|
+
.toggleSidebarBox,
|
|
311
|
+
.contentToggleBox {
|
|
312
|
+
display: block;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
@keyframes slideDown {
|
|
318
|
+
from {
|
|
319
|
+
opacity: 0;
|
|
320
|
+
transform: translateY(-10px);
|
|
321
|
+
}
|
|
322
|
+
to {
|
|
323
|
+
opacity: 1;
|
|
324
|
+
transform: translateY(0);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@keyframes pulse {
|
|
329
|
+
0%,
|
|
330
|
+
100% {
|
|
331
|
+
transform: scale(1);
|
|
332
|
+
opacity: 0.3;
|
|
333
|
+
}
|
|
334
|
+
50% {
|
|
335
|
+
transform: scale(1.1);
|
|
336
|
+
opacity: 0.5;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* Toast 过渡动画 */
|
|
341
|
+
:global(.toast-enter-active),
|
|
342
|
+
:global(.toast-leave-active) {
|
|
343
|
+
transition: all 0.3s ease;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
:global(.toast-enter-from),
|
|
347
|
+
:global(.toast-leave-to) {
|
|
348
|
+
opacity: 0;
|
|
349
|
+
transform: translateY(20px);
|
|
350
|
+
}
|
|
351
|
+
</style>
|