@sugarat/theme 0.5.11 → 0.5.12-beta.1
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/node.d.ts +2 -4
- package/node.js +206 -156
- package/node.mjs +205 -154
- package/package.json +10 -15
- package/src/components/Alert.vue +269 -0
- package/src/components/Avatar.vue +65 -0
- package/src/components/BlogAlert.vue +8 -8
- package/src/components/BlogApp.vue +5 -8
- package/src/components/BlogArticleAnalyze.vue +99 -66
- package/src/components/BlogAuthor.vue +13 -15
- package/src/components/BlogBackToTop.vue +21 -24
- package/src/components/BlogButtonAfterArticle.vue +12 -15
- package/src/components/BlogCommentWrapper.vue +34 -41
- package/src/components/BlogDocCover.vue +1 -1
- package/src/components/BlogFooter.vue +26 -32
- package/src/components/BlogFriendLink.vue +91 -73
- package/src/components/BlogHomeBanner.vue +25 -31
- package/src/components/BlogHomeHeaderAvatar.vue +16 -23
- package/src/components/BlogHomeInfo.vue +2 -4
- package/src/components/BlogHomeOverview.vue +12 -15
- package/src/components/BlogHomeTags.vue +22 -31
- package/src/components/BlogHotArticle.vue +69 -80
- package/src/components/BlogImagePreview.vue +3 -3
- package/src/components/BlogItem.vue +14 -23
- package/src/components/BlogList.vue +15 -19
- package/src/components/BlogRecommendArticle.vue +56 -72
- package/src/components/BlogSidebar.vue +1 -1
- package/src/components/Button.vue +150 -0
- package/src/components/Carousel.vue +249 -0
- package/src/components/CarouselItem.vue +139 -0
- package/src/components/CommentArtalk.vue +1 -1
- package/src/components/Image.vue +33 -0
- package/src/components/ImageViewer.vue +407 -0
- package/src/components/Pagination.vue +369 -0
- package/src/components/Tag.vue +144 -0
- package/src/components/UserWorks.vue +132 -175
- package/src/composables/config/blog.ts +6 -1
- package/src/composables/config/index.ts +2 -2
- package/src/index.ts +12 -19
- package/src/node.ts +0 -3
- package/src/styles/el-base.css +340 -0
- package/src/styles/{index.scss → index.css} +56 -91
- package/src/utils/client/index.ts +17 -0
- package/src/utils/node/mdPlugins.ts +1 -1
- package/src/utils/node/theme.ts +5 -2
- package/src/utils/node/vitePlugins.ts +51 -18
- package/src/styles/scss/algolia.scss +0 -231
- package/src/styles/scss/global.scss +0 -156
- package/src/styles/scss/highlight.scss +0 -12
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--el-color-white: #ffffff;
|
|
5
|
+
--el-color-black: #000000;
|
|
6
|
+
--el-color-primary-rgb: 64, 158, 255;
|
|
7
|
+
--el-color-success-rgb: 103, 194, 58;
|
|
8
|
+
--el-color-warning-rgb: 230, 162, 60;
|
|
9
|
+
--el-color-danger-rgb: 245, 108, 108;
|
|
10
|
+
--el-color-error-rgb: 245, 108, 108;
|
|
11
|
+
--el-color-info-rgb: 144, 147, 153;
|
|
12
|
+
--el-font-size-extra-large: 20px;
|
|
13
|
+
--el-font-size-large: 18px;
|
|
14
|
+
--el-font-size-medium: 16px;
|
|
15
|
+
--el-font-size-base: 14px;
|
|
16
|
+
--el-font-size-small: 13px;
|
|
17
|
+
--el-font-size-extra-small: 12px;
|
|
18
|
+
--el-font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
19
|
+
--el-font-weight-primary: 500;
|
|
20
|
+
--el-font-line-height-primary: 24px;
|
|
21
|
+
--el-index-normal: 1;
|
|
22
|
+
--el-index-top: 1000;
|
|
23
|
+
--el-index-popper: 2000;
|
|
24
|
+
--el-border-radius-base: 4px;
|
|
25
|
+
--el-border-radius-small: 2px;
|
|
26
|
+
--el-border-radius-round: 20px;
|
|
27
|
+
--el-border-radius-circle: 100%;
|
|
28
|
+
--el-transition-duration: 0.3s;
|
|
29
|
+
--el-transition-duration-fast: 0.2s;
|
|
30
|
+
--el-transition-function-ease-in-out-bezier: cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
31
|
+
--el-transition-function-fast-bezier: cubic-bezier(0.23, 1, 0.32, 1);
|
|
32
|
+
--el-transition-all: all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);
|
|
33
|
+
--el-transition-fade: opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);
|
|
34
|
+
--el-transition-md-fade: transform var(--el-transition-duration) var(--el-transition-function-fast-bezier), opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);
|
|
35
|
+
--el-transition-fade-linear: opacity var(--el-transition-duration-fast) linear;
|
|
36
|
+
--el-transition-border: border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);
|
|
37
|
+
--el-transition-box-shadow: box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);
|
|
38
|
+
--el-transition-color: color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);
|
|
39
|
+
--el-component-size-large: 40px;
|
|
40
|
+
--el-component-size: 32px;
|
|
41
|
+
--el-component-size-small: 24px
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:root {
|
|
45
|
+
color-scheme: light;
|
|
46
|
+
--el-color-primary: #409eff;
|
|
47
|
+
--el-color-primary-light-3: #79bbff;
|
|
48
|
+
--el-color-primary-light-5: #a0cfff;
|
|
49
|
+
--el-color-primary-light-7: #c6e2ff;
|
|
50
|
+
--el-color-primary-light-8: #d9ecff;
|
|
51
|
+
--el-color-primary-light-9: #ecf5ff;
|
|
52
|
+
--el-color-primary-dark-2: #337ecc;
|
|
53
|
+
--el-color-success: #67c23a;
|
|
54
|
+
--el-color-success-light-3: #95d475;
|
|
55
|
+
--el-color-success-light-5: #b3e19d;
|
|
56
|
+
--el-color-success-light-7: #d1edc4;
|
|
57
|
+
--el-color-success-light-8: #e1f3d8;
|
|
58
|
+
--el-color-success-light-9: #f0f9eb;
|
|
59
|
+
--el-color-success-dark-2: #529b2e;
|
|
60
|
+
--el-color-warning: #e6a23c;
|
|
61
|
+
--el-color-warning-light-3: #eebe77;
|
|
62
|
+
--el-color-warning-light-5: #f3d19e;
|
|
63
|
+
--el-color-warning-light-7: #f8e3c5;
|
|
64
|
+
--el-color-warning-light-8: #faecd8;
|
|
65
|
+
--el-color-warning-light-9: #fdf6ec;
|
|
66
|
+
--el-color-warning-dark-2: #b88230;
|
|
67
|
+
--el-color-danger: #f56c6c;
|
|
68
|
+
--el-color-danger-light-3: #f89898;
|
|
69
|
+
--el-color-danger-light-5: #fab6b6;
|
|
70
|
+
--el-color-danger-light-7: #fcd3d3;
|
|
71
|
+
--el-color-danger-light-8: #fde2e2;
|
|
72
|
+
--el-color-danger-light-9: #fef0f0;
|
|
73
|
+
--el-color-danger-dark-2: #c45656;
|
|
74
|
+
--el-color-error: #f56c6c;
|
|
75
|
+
--el-color-error-light-3: #f89898;
|
|
76
|
+
--el-color-error-light-5: #fab6b6;
|
|
77
|
+
--el-color-error-light-7: #fcd3d3;
|
|
78
|
+
--el-color-error-light-8: #fde2e2;
|
|
79
|
+
--el-color-error-light-9: #fef0f0;
|
|
80
|
+
--el-color-error-dark-2: #c45656;
|
|
81
|
+
--el-color-info: #909399;
|
|
82
|
+
--el-color-info-light-3: #b1b3b8;
|
|
83
|
+
--el-color-info-light-5: #c8c9cc;
|
|
84
|
+
--el-color-info-light-7: #dedfe0;
|
|
85
|
+
--el-color-info-light-8: #e9e9eb;
|
|
86
|
+
--el-color-info-light-9: #f4f4f5;
|
|
87
|
+
--el-color-info-dark-2: #73767a;
|
|
88
|
+
--el-bg-color: #ffffff;
|
|
89
|
+
--el-bg-color-page: #f2f3f5;
|
|
90
|
+
--el-bg-color-overlay: #ffffff;
|
|
91
|
+
--el-text-color-primary: #303133;
|
|
92
|
+
--el-text-color-regular: #606266;
|
|
93
|
+
--el-text-color-secondary: #909399;
|
|
94
|
+
--el-text-color-placeholder: #a8abb2;
|
|
95
|
+
--el-text-color-disabled: #c0c4cc;
|
|
96
|
+
--el-border-color: #dcdfe6;
|
|
97
|
+
--el-border-color-light: #e4e7ed;
|
|
98
|
+
--el-border-color-lighter: #ebeef5;
|
|
99
|
+
--el-border-color-extra-light: #f2f6fc;
|
|
100
|
+
--el-border-color-dark: #d4d7de;
|
|
101
|
+
--el-border-color-darker: #cdd0d6;
|
|
102
|
+
--el-fill-color: #f0f2f5;
|
|
103
|
+
--el-fill-color-light: #f5f7fa;
|
|
104
|
+
--el-fill-color-lighter: #fafafa;
|
|
105
|
+
--el-fill-color-extra-light: #fafcff;
|
|
106
|
+
--el-fill-color-dark: #ebedf0;
|
|
107
|
+
--el-fill-color-darker: #e6e8eb;
|
|
108
|
+
--el-fill-color-blank: #ffffff;
|
|
109
|
+
--el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.04), 0px 8px 20px rgba(0, 0, 0, 0.08);
|
|
110
|
+
--el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.12);
|
|
111
|
+
--el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.12);
|
|
112
|
+
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.08), 0px 12px 32px rgba(0, 0, 0, 0.12), 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
|
|
113
|
+
--el-disabled-bg-color: var(--el-fill-color-light);
|
|
114
|
+
--el-disabled-text-color: var(--el-text-color-placeholder);
|
|
115
|
+
--el-disabled-border-color: var(--el-border-color-light);
|
|
116
|
+
--el-overlay-color: rgba(0, 0, 0, 0.8);
|
|
117
|
+
--el-overlay-color-light: rgba(0, 0, 0, 0.7);
|
|
118
|
+
--el-overlay-color-lighter: rgba(0, 0, 0, 0.5);
|
|
119
|
+
--el-mask-color: rgba(255, 255, 255, 0.9);
|
|
120
|
+
--el-mask-color-extra-light: rgba(255, 255, 255, 0.3);
|
|
121
|
+
--el-border-width: 1px;
|
|
122
|
+
--el-border-style: solid;
|
|
123
|
+
--el-border-color-hover: var(--el-text-color-disabled);
|
|
124
|
+
--el-border: var(--el-border-width) var(--el-border-style) var(--el-border-color);
|
|
125
|
+
--el-svg-monochrome-grey: var(--el-border-color)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.fade-in-linear-enter-active,
|
|
129
|
+
.fade-in-linear-leave-active {
|
|
130
|
+
transition: var(--el-transition-fade-linear)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.fade-in-linear-enter-from,
|
|
134
|
+
.fade-in-linear-leave-to {
|
|
135
|
+
opacity: 0
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.el-fade-in-linear-enter-active,
|
|
139
|
+
.el-fade-in-linear-leave-active {
|
|
140
|
+
transition: var(--el-transition-fade-linear)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.el-fade-in-linear-enter-from,
|
|
144
|
+
.el-fade-in-linear-leave-to {
|
|
145
|
+
opacity: 0
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.el-fade-in-enter-active,
|
|
149
|
+
.el-fade-in-leave-active {
|
|
150
|
+
transition: all var(--el-transition-duration) cubic-bezier(.55, 0, .1, 1)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.el-fade-in-enter-from,
|
|
154
|
+
.el-fade-in-leave-active {
|
|
155
|
+
opacity: 0
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.el-zoom-in-center-enter-active,
|
|
159
|
+
.el-zoom-in-center-leave-active {
|
|
160
|
+
transition: all var(--el-transition-duration) cubic-bezier(.55, 0, .1, 1)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.el-zoom-in-center-enter-from,
|
|
164
|
+
.el-zoom-in-center-leave-active {
|
|
165
|
+
opacity: 0;
|
|
166
|
+
transform: scaleX(0)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.el-zoom-in-top-enter-active,
|
|
170
|
+
.el-zoom-in-top-leave-active {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
transform: scaleY(1);
|
|
173
|
+
transform-origin: center top;
|
|
174
|
+
transition: var(--el-transition-md-fade)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.el-zoom-in-top-enter-active[data-popper-placement^=top],
|
|
178
|
+
.el-zoom-in-top-leave-active[data-popper-placement^=top] {
|
|
179
|
+
transform-origin: center bottom
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.el-zoom-in-top-enter-from,
|
|
183
|
+
.el-zoom-in-top-leave-active {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
transform: scaleY(0)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.el-zoom-in-bottom-enter-active,
|
|
189
|
+
.el-zoom-in-bottom-leave-active {
|
|
190
|
+
opacity: 1;
|
|
191
|
+
transform: scaleY(1);
|
|
192
|
+
transform-origin: center bottom;
|
|
193
|
+
transition: var(--el-transition-md-fade)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.el-zoom-in-bottom-enter-from,
|
|
197
|
+
.el-zoom-in-bottom-leave-active {
|
|
198
|
+
opacity: 0;
|
|
199
|
+
transform: scaleY(0)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.el-zoom-in-left-enter-active,
|
|
203
|
+
.el-zoom-in-left-leave-active {
|
|
204
|
+
opacity: 1;
|
|
205
|
+
transform: scale(1);
|
|
206
|
+
transform-origin: top left;
|
|
207
|
+
transition: var(--el-transition-md-fade)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.el-zoom-in-left-enter-from,
|
|
211
|
+
.el-zoom-in-left-leave-active {
|
|
212
|
+
opacity: 0;
|
|
213
|
+
transform: scale(.45)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.collapse-transition {
|
|
217
|
+
transition: var(--el-transition-duration) height ease-in-out, var(--el-transition-duration) padding-top ease-in-out, var(--el-transition-duration) padding-bottom ease-in-out
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.el-collapse-transition-enter-active,
|
|
221
|
+
.el-collapse-transition-leave-active {
|
|
222
|
+
transition: var(--el-transition-duration) max-height ease-in-out, var(--el-transition-duration) padding-top ease-in-out, var(--el-transition-duration) padding-bottom ease-in-out
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.horizontal-collapse-transition {
|
|
226
|
+
transition: var(--el-transition-duration) width ease-in-out, var(--el-transition-duration) padding-left ease-in-out, var(--el-transition-duration) padding-right ease-in-out
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.el-list-enter-active,
|
|
230
|
+
.el-list-leave-active {
|
|
231
|
+
transition: all 1s
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.el-list-enter-from,
|
|
235
|
+
.el-list-leave-to {
|
|
236
|
+
opacity: 0;
|
|
237
|
+
transform: translateY(-30px)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.el-list-leave-active {
|
|
241
|
+
position: absolute !important
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.el-opacity-transition {
|
|
245
|
+
transition: opacity var(--el-transition-duration) cubic-bezier(.55, 0, .1, 1)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
@-webkit-keyframes rotating {
|
|
250
|
+
0% {
|
|
251
|
+
transform: rotate(0deg)
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
to {
|
|
255
|
+
transform: rotate(1turn)
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@keyframes rotating {
|
|
260
|
+
0% {
|
|
261
|
+
transform: rotate(0deg)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
to {
|
|
265
|
+
transform: rotate(1turn)
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
html.dark {
|
|
270
|
+
color-scheme: dark;
|
|
271
|
+
--el-color-primary: #409eff;
|
|
272
|
+
--el-color-primary-light-3: #3375b9;
|
|
273
|
+
--el-color-primary-light-5: #2a598a;
|
|
274
|
+
--el-color-primary-light-7: #213d5b;
|
|
275
|
+
--el-color-primary-light-8: #1d3043;
|
|
276
|
+
--el-color-primary-light-9: #18222c;
|
|
277
|
+
--el-color-primary-dark-2: #66b1ff;
|
|
278
|
+
--el-color-success: #67c23a;
|
|
279
|
+
--el-color-success-light-3: #4e8e2f;
|
|
280
|
+
--el-color-success-light-5: #3e6b27;
|
|
281
|
+
--el-color-success-light-7: #2d481f;
|
|
282
|
+
--el-color-success-light-8: #25371c;
|
|
283
|
+
--el-color-success-light-9: #1c2518;
|
|
284
|
+
--el-color-success-dark-2: #85ce61;
|
|
285
|
+
--el-color-warning: #e6a23c;
|
|
286
|
+
--el-color-warning-light-3: #a77730;
|
|
287
|
+
--el-color-warning-light-5: #7d5b28;
|
|
288
|
+
--el-color-warning-light-7: #533f20;
|
|
289
|
+
--el-color-warning-light-8: #3e301c;
|
|
290
|
+
--el-color-warning-light-9: #292218;
|
|
291
|
+
--el-color-warning-dark-2: #ebb563;
|
|
292
|
+
--el-color-danger: #f56c6c;
|
|
293
|
+
--el-color-danger-light-3: #b25252;
|
|
294
|
+
--el-color-danger-light-5: #854040;
|
|
295
|
+
--el-color-danger-light-7: #582e2e;
|
|
296
|
+
--el-color-danger-light-8: #412626;
|
|
297
|
+
--el-color-danger-light-9: #2b1d1d;
|
|
298
|
+
--el-color-danger-dark-2: #f78989;
|
|
299
|
+
--el-color-error: #f56c6c;
|
|
300
|
+
--el-color-error-light-3: #b25252;
|
|
301
|
+
--el-color-error-light-5: #854040;
|
|
302
|
+
--el-color-error-light-7: #582e2e;
|
|
303
|
+
--el-color-error-light-8: #412626;
|
|
304
|
+
--el-color-error-light-9: #2b1d1d;
|
|
305
|
+
--el-color-error-dark-2: #f78989;
|
|
306
|
+
--el-color-info: #909399;
|
|
307
|
+
--el-color-info-light-3: #6b6d71;
|
|
308
|
+
--el-color-info-light-5: #525457;
|
|
309
|
+
--el-color-info-light-7: #393a3c;
|
|
310
|
+
--el-color-info-light-8: #2d2d2f;
|
|
311
|
+
--el-color-info-light-9: #202121;
|
|
312
|
+
--el-color-info-dark-2: #a6a9ad;
|
|
313
|
+
--el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.36), 0px 8px 20px rgba(0, 0, 0, 0.72);
|
|
314
|
+
--el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.72);
|
|
315
|
+
--el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.72);
|
|
316
|
+
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.72), 0px 12px 32px #000000, 0px 8px 16px -8px #000000;
|
|
317
|
+
--el-bg-color-page: #0a0a0a;
|
|
318
|
+
--el-bg-color: #141414;
|
|
319
|
+
--el-bg-color-overlay: #1d1e1f;
|
|
320
|
+
--el-text-color-primary: #E5EAF3;
|
|
321
|
+
--el-text-color-regular: #CFD3DC;
|
|
322
|
+
--el-text-color-secondary: #A3A6AD;
|
|
323
|
+
--el-text-color-placeholder: #8D9095;
|
|
324
|
+
--el-text-color-disabled: #6C6E72;
|
|
325
|
+
--el-border-color-darker: #636466;
|
|
326
|
+
--el-border-color-dark: #58585B;
|
|
327
|
+
--el-border-color: #4C4D4F;
|
|
328
|
+
--el-border-color-light: #414243;
|
|
329
|
+
--el-border-color-lighter: #363637;
|
|
330
|
+
--el-border-color-extra-light: #2B2B2C;
|
|
331
|
+
--el-fill-color-darker: #424243;
|
|
332
|
+
--el-fill-color-dark: #39393A;
|
|
333
|
+
--el-fill-color: #303030;
|
|
334
|
+
--el-fill-color-light: #262727;
|
|
335
|
+
--el-fill-color-lighter: #1D1D1D;
|
|
336
|
+
--el-fill-color-extra-light: #191919;
|
|
337
|
+
--el-fill-color-blank: transparent;
|
|
338
|
+
--el-mask-color: rgba(0, 0, 0, 0.8);
|
|
339
|
+
--el-mask-color-extra-light: rgba(0, 0, 0, 0.3)
|
|
340
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
html {
|
|
2
3
|
--bg-gradient: 255, 255, 255, 0.1;
|
|
3
4
|
--bg-gradient-home: 255, 255, 255;
|
|
4
5
|
--box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.1);
|
|
5
|
-
|
|
6
|
-
// blog-item
|
|
7
6
|
--box-shadow-hover: 0 2px 16px 0 rgba(0, 0, 0, 0.2);
|
|
8
7
|
--nav-bgc: rgba(255, 255, 255, 0.9);
|
|
9
8
|
--badge-font-color: #4e5969;
|
|
10
9
|
--description-font-color: #86909c;
|
|
11
10
|
--blog-theme-color: var(--vp-c-brand-1);
|
|
12
|
-
// --blog-theme-color: #409eff;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
html.dark {
|
|
@@ -25,20 +23,18 @@ html.dark {
|
|
|
25
23
|
.VPHome {
|
|
26
24
|
min-height: 100vh;
|
|
27
25
|
background: radial-gradient(ellipse, rgba(var(--bg-gradient-home), 1) 0%, rgba(var(--bg-gradient-home), 0) 700%);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
26
|
+
}
|
|
27
|
+
.VPHome::before {
|
|
28
|
+
content: "";
|
|
29
|
+
inset: 0;
|
|
30
|
+
position: fixed;
|
|
31
|
+
top: 0;
|
|
32
|
+
z-index: -1;
|
|
33
|
+
background-image: url(./bg.png);
|
|
34
|
+
background-repeat: repeat;
|
|
35
|
+
min-height: 100%;
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
// 样式重写
|
|
42
38
|
.VPHome {
|
|
43
39
|
margin-bottom: 0 !important;
|
|
44
40
|
padding-bottom: 96px;
|
|
@@ -49,76 +45,51 @@ html.dark {
|
|
|
49
45
|
padding-bottom: 128px;
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
|
-
|
|
53
48
|
@media screen and (min-width: 960px) {
|
|
54
49
|
#VPContent.is-home.VPContent {
|
|
55
50
|
padding-top: 0;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|
|
51
|
+
}
|
|
52
|
+
#VPContent.is-home.VPContent .VPHome {
|
|
53
|
+
min-height: 100vh;
|
|
54
|
+
}
|
|
55
|
+
#VPContent.is-home.VPContent .VPHome .VPHero > .container {
|
|
56
|
+
padding-top: var(--vp-nav-height);
|
|
64
57
|
}
|
|
65
58
|
}
|
|
66
|
-
|
|
67
59
|
@media screen and (max-width: 959px) {
|
|
68
60
|
.VPNav {
|
|
69
61
|
background-color: var(--nav-bgc);
|
|
70
62
|
}
|
|
71
63
|
}
|
|
72
|
-
|
|
73
64
|
.el-pagination {
|
|
74
65
|
flex-wrap: wrap;
|
|
75
66
|
justify-content: center;
|
|
76
67
|
}
|
|
77
68
|
|
|
78
|
-
// .el-pagination > * {
|
|
79
|
-
// margin-bottom: 10px !important;
|
|
80
|
-
// }
|
|
81
|
-
|
|
82
69
|
@media screen and (min-width: 768px) and (max-width: 1200px) {
|
|
83
|
-
|
|
84
70
|
.VPNavBarMenuGroup .button span.text,
|
|
85
71
|
.VPNavBarMenuLink {
|
|
86
72
|
font-size: 12px !important;
|
|
87
73
|
}
|
|
88
|
-
|
|
89
74
|
.VPNavBar {
|
|
90
75
|
height: auto !important;
|
|
91
76
|
}
|
|
92
|
-
|
|
93
77
|
.VPNavBarMenu.menu {
|
|
94
78
|
flex-wrap: wrap;
|
|
95
79
|
}
|
|
96
80
|
}
|
|
97
|
-
|
|
98
81
|
@media screen and (min-width: 960px) and (max-width: 1120px) {
|
|
99
82
|
.VPContent.has-sidebar {
|
|
100
83
|
margin-top: 60px !important;
|
|
101
84
|
}
|
|
102
85
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
// }
|
|
111
|
-
|
|
112
|
-
.VPDoc .content main {
|
|
113
|
-
img {
|
|
114
|
-
max-height: 300px;
|
|
115
|
-
margin: 0 auto;
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.vp-doc a {
|
|
120
|
-
word-break: break-all;
|
|
121
|
-
}
|
|
86
|
+
.VPDoc .content main img {
|
|
87
|
+
max-height: 300px;
|
|
88
|
+
margin: 0 auto;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
.VPDoc .content main .vp-doc a {
|
|
92
|
+
word-break: break-all;
|
|
122
93
|
}
|
|
123
94
|
|
|
124
95
|
::-webkit-scrollbar {
|
|
@@ -150,51 +121,45 @@ main .vp-doc a:hover {
|
|
|
150
121
|
text-decoration: underline dotted;
|
|
151
122
|
}
|
|
152
123
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
height: 14px;
|
|
158
|
-
margin-right: 4px;
|
|
159
|
-
}
|
|
124
|
+
span.svg-icon svg {
|
|
125
|
+
width: 14px;
|
|
126
|
+
height: 14px;
|
|
127
|
+
margin-right: 4px;
|
|
160
128
|
}
|
|
161
129
|
|
|
162
130
|
.vp-doc ul.task-list {
|
|
163
131
|
list-style: none;
|
|
164
132
|
padding-left: 10px;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
font-weight: bold;
|
|
193
|
-
background-color: var(--vp-c-brand-1);
|
|
194
|
-
}
|
|
133
|
+
}
|
|
134
|
+
.vp-doc ul.task-list input[type=checkbox] {
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
position: relative;
|
|
137
|
+
width: 13px;
|
|
138
|
+
height: 13px;
|
|
139
|
+
}
|
|
140
|
+
.vp-doc ul.task-list input[type=checkbox]::after {
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 0;
|
|
143
|
+
color: #000;
|
|
144
|
+
width: 13px;
|
|
145
|
+
height: 13px;
|
|
146
|
+
display: inline-block;
|
|
147
|
+
visibility: visible;
|
|
148
|
+
padding-left: 0px;
|
|
149
|
+
text-align: center;
|
|
150
|
+
content: " ";
|
|
151
|
+
border-radius: 3px;
|
|
152
|
+
}
|
|
153
|
+
.vp-doc ul.task-list input[type=checkbox]:checked::after {
|
|
154
|
+
content: "✓";
|
|
155
|
+
color: #fff;
|
|
156
|
+
line-height: 14px;
|
|
157
|
+
font-size: 10px;
|
|
158
|
+
font-weight: bold;
|
|
159
|
+
background-color: var(--vp-c-brand-1);
|
|
195
160
|
}
|
|
196
161
|
|
|
197
|
-
.VPImage.logo{
|
|
162
|
+
.VPImage.logo {
|
|
198
163
|
width: 24px;
|
|
199
164
|
height: 24px;
|
|
200
165
|
}
|
|
@@ -174,3 +174,20 @@ export function wrapperCleanUrls(cleanUrls: boolean, route: string) {
|
|
|
174
174
|
export function replaceValue(str: string, value: any) {
|
|
175
175
|
return str.replace(/\{\{value\}\}/, value)
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
// https://github.com/mdit-vue/mdit-vue/blob/main/packages/shared/src/slugify.ts
|
|
179
|
+
// eslint-disable-next-line no-control-regex
|
|
180
|
+
const rControl = /[\u0000-\u001F]/g
|
|
181
|
+
const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g
|
|
182
|
+
const rCombining = /[\u0300-\u036F]/g
|
|
183
|
+
export function slugify(str: string) {
|
|
184
|
+
return str
|
|
185
|
+
.normalize('NFKD')
|
|
186
|
+
.replace(rCombining, '')
|
|
187
|
+
.replace(rControl, '')
|
|
188
|
+
.replace(rSpecial, '-')
|
|
189
|
+
.replace(/-{2,}/g, '-')
|
|
190
|
+
.replace(/^-+|-+$/g, '')
|
|
191
|
+
.replace(/^(\d)/, '_$1')
|
|
192
|
+
.toLowerCase()
|
|
193
|
+
}
|
|
@@ -78,7 +78,7 @@ export function patchOptimizeDeps(config: any) {
|
|
|
78
78
|
config.vite.optimizeDeps = {}
|
|
79
79
|
}
|
|
80
80
|
config.vite.optimizeDeps.exclude = ['vitepress-plugin-tabs', '@sugarat/theme']
|
|
81
|
-
config.vite.optimizeDeps.include = ['element-plus']
|
|
81
|
+
// config.vite.optimizeDeps.include = ['element-plus']
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export function supportRunExtendsPlugin(config: UserConfig<Theme.Config>) {
|
package/src/utils/node/theme.ts
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path'
|
|
|
3
3
|
import { getDefaultTitle, getFileLastModifyTime, getTextSummary, getVitePressPages, grayMatter, normalizePath, renderDynamicMarkdown } from '@sugarat/theme-shared'
|
|
4
4
|
import type { SiteConfig } from 'vitepress'
|
|
5
5
|
import type { Theme } from '../../composables/config/index'
|
|
6
|
-
import { formatDate } from '../client'
|
|
6
|
+
import { formatDate, shuffleArray } from '../client'
|
|
7
7
|
import { getFirstImagURLFromMD } from './index'
|
|
8
8
|
|
|
9
9
|
export function patchDefaultThemeSideBar(cfg?: Partial<Theme.BlogConfig>) {
|
|
@@ -147,5 +147,8 @@ export function patchVPThemeConfig(
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export function checkConfig(cfg?: Partial<Theme.BlogConfig>) {
|
|
150
|
-
|
|
150
|
+
const friendConfig = cfg?.friend
|
|
151
|
+
if (!Array.isArray(friendConfig) && friendConfig?.random) {
|
|
152
|
+
friendConfig.list = shuffleArray(friendConfig.list)
|
|
153
|
+
}
|
|
151
154
|
}
|