@sugarat/theme 0.5.20 → 0.5.21
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sugarat/theme",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
|
|
5
5
|
"author": "sugar",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"vitepress-plugin-mermaid": "2.0.13",
|
|
53
53
|
"vitepress-plugin-tabs": "0.7.3",
|
|
54
54
|
"@sugarat/theme-shared": "0.0.7",
|
|
55
|
-
"vitepress-plugin-announcement": "0.1.
|
|
56
|
-
"vitepress-plugin-artalk": "0.1.
|
|
57
|
-
"vitepress-plugin-back2top": "0.1.
|
|
58
|
-
"vitepress-plugin-giscus": "0.1.
|
|
55
|
+
"vitepress-plugin-announcement": "0.1.9",
|
|
56
|
+
"vitepress-plugin-artalk": "0.1.3",
|
|
57
|
+
"vitepress-plugin-back2top": "0.1.2",
|
|
58
|
+
"vitepress-plugin-giscus": "0.1.2",
|
|
59
59
|
"vitepress-plugin-image-preview": "0.1.3",
|
|
60
60
|
"vitepress-plugin-pagefind": "0.4.20",
|
|
61
61
|
"vitepress-plugin-rss": "0.4.4"
|
|
@@ -19,6 +19,8 @@ function createIcon(d: string | string[]) {
|
|
|
19
19
|
render: () => h('svg', {
|
|
20
20
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
21
21
|
viewBox: '0 0 1024 1024',
|
|
22
|
+
width: '1em',
|
|
23
|
+
height: '1em',
|
|
22
24
|
}, [d].flatMap(d => h('path', { fill: 'currentColor', d })))
|
|
23
25
|
})
|
|
24
26
|
}
|
|
@@ -267,21 +269,29 @@ const timeTitle = computed(() =>
|
|
|
267
269
|
align-items: center;
|
|
268
270
|
flex-wrap: wrap;
|
|
269
271
|
}
|
|
272
|
+
.doc-analyze .icon,
|
|
270
273
|
.meta-des > span .icon,
|
|
271
274
|
.new-line-meta-des > span .icon {
|
|
272
275
|
margin-right: 4px;
|
|
273
276
|
--color: inherit;
|
|
274
277
|
align-items: center;
|
|
275
278
|
display: inline-flex;
|
|
279
|
+
flex-shrink: 0;
|
|
276
280
|
height: 1em;
|
|
277
281
|
justify-content: center;
|
|
278
282
|
line-height: 1em;
|
|
279
283
|
position: relative;
|
|
280
284
|
width: 1em;
|
|
281
285
|
fill: currentColor;
|
|
282
|
-
color: var(--color)
|
|
286
|
+
color: var(--color);
|
|
283
287
|
font-size: inherit;
|
|
284
288
|
}
|
|
289
|
+
.doc-analyze .icon :deep(svg),
|
|
290
|
+
.meta-des > span .icon :deep(svg),
|
|
291
|
+
.new-line-meta-des > span .icon :deep(svg) {
|
|
292
|
+
width: 1em;
|
|
293
|
+
height: 1em;
|
|
294
|
+
}
|
|
285
295
|
.meta-des .link,
|
|
286
296
|
.new-line-meta-des .link {
|
|
287
297
|
color: var(--vp-c-text-2);
|
|
@@ -29,7 +29,7 @@ const iconSVGStr = computed(() => backToTopConfig?.value?.icon)
|
|
|
29
29
|
<div v-if="open" v-show="show" class="back-to-top">
|
|
30
30
|
<span class="icon-wrapper" @click="handleBackRoTop">
|
|
31
31
|
<Icon :size="20" :icon="iconSVGStr">
|
|
32
|
-
<svg width="
|
|
32
|
+
<svg width="1em" height="1em" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
33
33
|
<path
|
|
34
34
|
fill="currentColor"
|
|
35
35
|
d="m20 22l-3.86-1.55c.7-1.53 1.2-3.11 1.51-4.72zM7.86 20.45L4 22l2.35-6.27c.31 1.61.81 3.19 1.51 4.72M12 2s5 2 5 10c0 3.1-.75 5.75-1.67 7.83A2 2 0 0 1 13.5 21h-3a2 2 0 0 1-1.83-1.17C7.76 17.75 7 15.1 7 12c0-8 5-10 5-10m0 10c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2"
|
|
@@ -71,6 +71,9 @@ function toggleContent() {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.content-icon {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
flex-shrink: 0;
|
|
74
77
|
font-family: "iconfont" !important;
|
|
75
78
|
font-size: 16px;
|
|
76
79
|
margin-right: 8px;
|
|
@@ -78,6 +81,11 @@ function toggleContent() {
|
|
|
78
81
|
-webkit-font-smoothing: antialiased;
|
|
79
82
|
-moz-osx-font-smoothing: grayscale;
|
|
80
83
|
}
|
|
84
|
+
.content-icon :deep(svg) {
|
|
85
|
+
width: 1em;
|
|
86
|
+
height: 1em;
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
}
|
|
81
89
|
|
|
82
90
|
/* 进入动画 */
|
|
83
91
|
.content-enter-active {
|
package/src/components/Icon.vue
CHANGED
|
@@ -21,6 +21,7 @@ const size = computed(() => props.size && (typeof props.size === 'number' ? `${p
|
|
|
21
21
|
--color: inherit;
|
|
22
22
|
align-items: center;
|
|
23
23
|
display: inline-flex;
|
|
24
|
+
flex-shrink: 0;
|
|
24
25
|
height: 1em;
|
|
25
26
|
justify-content: center;
|
|
26
27
|
line-height: 1em;
|
|
@@ -30,4 +31,9 @@ const size = computed(() => props.size && (typeof props.size === 'number' ? `${p
|
|
|
30
31
|
color: var(--color);
|
|
31
32
|
font-size: inherit;
|
|
32
33
|
}
|
|
34
|
+
.sugar-theme-icon :deep(svg) {
|
|
35
|
+
width: 1em;
|
|
36
|
+
height: 1em;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
}
|
|
33
39
|
</style>
|
|
@@ -388,11 +388,21 @@ function handleChooseTag(tag: string) {
|
|
|
388
388
|
.work .times .icon,
|
|
389
389
|
.work .tags .icon {
|
|
390
390
|
color: var(--vp-c-text-1);
|
|
391
|
-
display:
|
|
391
|
+
display: inline-flex;
|
|
392
|
+
flex-shrink: 0;
|
|
393
|
+
align-items: center;
|
|
394
|
+
justify-content: center;
|
|
392
395
|
width: 20px;
|
|
393
396
|
height: 20px;
|
|
394
397
|
margin-right: 6px;
|
|
395
398
|
}
|
|
399
|
+
.work .links .icon svg,
|
|
400
|
+
.work .times .icon svg,
|
|
401
|
+
.work .tags .icon svg {
|
|
402
|
+
width: 100%;
|
|
403
|
+
height: 100%;
|
|
404
|
+
flex-shrink: 0;
|
|
405
|
+
}
|
|
396
406
|
.work .times {
|
|
397
407
|
margin-right: 18px;
|
|
398
408
|
}
|
package/src/constants/svg.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const fireSVG = `<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
|
|
1
|
+
export const fireSVG = `<svg width="1em" height="1em" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<radialGradient id="notoFire0" cx="68.884" cy="124.296" r="70.587" gradientTransform="matrix(-1 -.00434 -.00713 1.6408 131.986 -79.345)" gradientUnits="userSpaceOnUse">
|
|
3
3
|
<stop offset=".314" stop-color="#FF9800"/>
|
|
4
4
|
<stop offset=".662" stop-color="#FF6D00"/>
|
|
@@ -49,7 +49,7 @@ export const themeSVG = `<svg width="128" height="128" viewBox="0 0 24 24" xmlns
|
|
|
49
49
|
<path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10a2.5 2.5 0 0 0 2.5-2.5c0-.61-.23-1.2-.64-1.67a.528.528 0 0 1-.13-.33c0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6c0-4.96-4.49-9-10-9zm5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5s1.5.67 1.5 1.5s-.67 1.5-1.5 1.5zm-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9zM5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13S5 12.33 5 11.5zm6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5S8.67 6 9.5 6s1.5.67 1.5 1.5z"/>
|
|
50
50
|
</svg>`
|
|
51
51
|
|
|
52
|
-
export const icpSVG = '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-2f084f89=""><title data-v-2f084f89="">ICP备案号</title><path d="M778.24 163.84c-76.8-40.96-165.888-61.44-269.312-61.44s-192.512 20.48-269.312 61.44h-133.12l23.552 337.92c8.192 113.664 67.584 217.088 162.816 280.576l215.04 144.384 215.04-144.384c96.256-63.488 155.648-166.912 163.84-280.576l23.552-337.92H778.24z m47.104 333.824c-7.168 94.208-56.32 181.248-135.168 233.472l-181.248 120.832L327.68 731.136c-78.848-53.248-129.024-139.264-135.168-233.472L173.056 225.28h136.192v-26.624c58.368-23.552 124.928-34.816 199.68-34.816s141.312 12.288 199.68 34.816V225.28H844.8l-19.456 272.384z" data-v-2f084f89=""></path><path d="M685.056 328.704v-46.08H455.68c2.048-4.096 6.144-9.216 11.264-15.36 5.12-7.168 9.216-12.288 11.264-15.36L419.84 240.64c-31.744 46.08-75.776 87.04-133.12 123.904 4.096 4.096 10.24 11.264 18.432 21.504l17.408 17.408c23.552-15.36 45.056-31.744 63.488-50.176 26.624 25.6 49.152 43.008 67.584 51.2-46.08 15.36-104.448 27.648-175.104 35.84 2.048 5.12 6.144 13.312 9.216 24.576 4.096 11.264 6.144 19.456 7.168 24.576l39.936-7.168v218.112H389.12V680.96h238.592v19.456h54.272V481.28H348.16c60.416-12.288 114.688-27.648 163.84-46.08 49.152 19.456 118.784 34.816 210.944 46.08 5.12-17.408 10.24-34.816 17.408-51.2-62.464-4.096-116.736-12.288-161.792-24.576 38.912-20.48 74.752-46.08 106.496-76.8z m-150.528 194.56h94.208v41.984h-94.208v-41.984z m0 78.848h94.208v41.984h-94.208v-41.984z m-144.384-78.848h94.208v41.984H390.144v-41.984z m0 78.848h94.208v41.984H390.144v-41.984zM424.96 326.656h182.272c-26.624 22.528-57.344 41.984-94.208 57.344-31.744-15.36-61.44-34.816-88.064-57.344z" data-v-2f084f89=""></path></svg>'
|
|
52
|
+
export const icpSVG = '<svg width="1em" height="1em" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-2f084f89=""><title data-v-2f084f89="">ICP备案号</title><path d="M778.24 163.84c-76.8-40.96-165.888-61.44-269.312-61.44s-192.512 20.48-269.312 61.44h-133.12l23.552 337.92c8.192 113.664 67.584 217.088 162.816 280.576l215.04 144.384 215.04-144.384c96.256-63.488 155.648-166.912 163.84-280.576l23.552-337.92H778.24z m47.104 333.824c-7.168 94.208-56.32 181.248-135.168 233.472l-181.248 120.832L327.68 731.136c-78.848-53.248-129.024-139.264-135.168-233.472L173.056 225.28h136.192v-26.624c58.368-23.552 124.928-34.816 199.68-34.816s141.312 12.288 199.68 34.816V225.28H844.8l-19.456 272.384z" data-v-2f084f89=""></path><path d="M685.056 328.704v-46.08H455.68c2.048-4.096 6.144-9.216 11.264-15.36 5.12-7.168 9.216-12.288 11.264-15.36L419.84 240.64c-31.744 46.08-75.776 87.04-133.12 123.904 4.096 4.096 10.24 11.264 18.432 21.504l17.408 17.408c23.552-15.36 45.056-31.744 63.488-50.176 26.624 25.6 49.152 43.008 67.584 51.2-46.08 15.36-104.448 27.648-175.104 35.84 2.048 5.12 6.144 13.312 9.216 24.576 4.096 11.264 6.144 19.456 7.168 24.576l39.936-7.168v218.112H389.12V680.96h238.592v19.456h54.272V481.28H348.16c60.416-12.288 114.688-27.648 163.84-46.08 49.152 19.456 118.784 34.816 210.944 46.08 5.12-17.408 10.24-34.816 17.408-51.2-62.464-4.096-116.736-12.288-161.792-24.576 38.912-20.48 74.752-46.08 106.496-76.8z m-150.528 194.56h94.208v41.984h-94.208v-41.984z m0 78.848h94.208v41.984h-94.208v-41.984z m-144.384-78.848h94.208v41.984H390.144v-41.984z m0 78.848h94.208v41.984H390.144v-41.984zM424.96 326.656h182.272c-26.624 22.528-57.344 41.984-94.208 57.344-31.744-15.36-61.44-34.816-88.064-57.344z" data-v-2f084f89=""></path></svg>'
|
|
53
53
|
|
|
54
54
|
export const copyrightSVG = '<svg t="1695543755857" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="89399" width="200" height="200"><path d="M512 16C238.066 16 16 238.066 16 512s222.066 496 496 496 496-222.066 496-496S785.934 16 512 16z m234.268 693.506c-3.184 3.734-79.552 91.462-219.702 91.462-169.384 0-288.968-126.52-288.968-291.134 0-162.606 124.008-286.802 287.524-286.802 133.914 0 203.93 74.63 206.844 77.808a24 24 0 0 1 2.476 29.246l-44.76 69.31c-8.098 12.534-25.548 14.702-36.468 4.59-0.466-0.428-53.058-47.76-123.76-47.76-92.232 0-147.832 67.15-147.832 152.164 0 79.204 51.028 159.384 148.554 159.384 77.394 0 130.56-56.676 131.088-57.25 10.264-11.13 28.118-10.066 37.016 2.106l49.094 67.144a24.002 24.002 0 0 1-1.106 29.732z" p-id="89400"></path></svg>'
|
|
55
55
|
|