hexo-theme-stellar 1.17.1 → 1.18.0
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/_config.yml +35 -28
- package/_data/widgets.yml +11 -15
- package/layout/_partial/sidebar/header.ejs +4 -4
- package/layout/_partial/sidebar/index.ejs +13 -7
- package/layout/_partial/widgets/search.ejs +14 -5
- package/layout/index.ejs +1 -1
- package/layout/wiki.ejs +2 -2
- package/package.json +1 -1
- package/scripts/generators/search.js +93 -87
- package/scripts/tags/{border.js → ablock.js} +8 -10
- package/scripts/tags/{split.js → grid.js} +5 -5
- package/scripts/tags/note.js +5 -7
- package/scripts/tags/poetry.js +4 -5
- package/scripts/tags/quot.js +8 -4
- package/scripts/tags/tag.js +35 -0
- package/scripts/tags/toc.js +2 -2
- package/source/css/_common/highlight.styl +0 -3
- package/source/css/_custom.styl +13 -27
- package/source/css/_defines/theme.styl +47 -34
- package/source/css/_layout/md.styl +6 -4
- package/source/css/_layout/partial/paginator.styl +2 -1
- package/source/css/_layout/partial/related.styl +1 -1
- package/source/css/_layout/sidebar/header.styl +2 -2
- package/source/css/_layout/tag-plugins/common.styl +51 -65
- package/source/css/_layout/tag-plugins/folding.styl +10 -11
- package/source/css/_layout/tag-plugins/{split.styl → grid.styl} +4 -4
- package/source/css/_layout/tag-plugins/link.styl +1 -1
- package/source/css/_layout/tag-plugins/mark.styl +2 -2
- package/source/css/_layout/tag-plugins/navbar.styl +1 -1
- package/source/css/_layout/tag-plugins/note.styl +3 -1
- package/source/css/_layout/tag-plugins/poetry.styl +26 -25
- package/source/css/_layout/tag-plugins/quot.styl +47 -58
- package/source/css/_layout/tag-plugins/tag.styl +13 -0
- package/source/css/_layout/widgets/ghuser.styl +19 -15
- package/source/css/_layout/widgets/search.styl +101 -1
- package/source/css/_layout/widgets/toc_common.styl +1 -1
- package/source/css/_plugins/comments/twikoo.styl +0 -1
- package/source/css/_plugins/index.styl +0 -3
- package/source/js/plugins/weibo.js +116 -0
- package/source/js/search/local-search.js +6 -21
- package/source/css/_plugins/search/local-search.styl +0 -89
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tag.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% tag text href [color:color] %}
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
const tag_colors = ['red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple']
|
|
12
|
+
var tag_index = 0;
|
|
13
|
+
|
|
14
|
+
hexo.extend.tag.register('tag', function(args) {
|
|
15
|
+
args = hexo.args.map(args, ['color'], ['text', 'href']);
|
|
16
|
+
if (args.color == null) {
|
|
17
|
+
const default_color = hexo.theme.config.tag_plugins.tag?.default_color
|
|
18
|
+
if (default_color) {
|
|
19
|
+
args.color = default_color
|
|
20
|
+
} else {
|
|
21
|
+
args.color = tag_colors[tag_index]
|
|
22
|
+
tag_index += 1
|
|
23
|
+
if (tag_index >= tag_colors.length) {
|
|
24
|
+
tag_index = 0
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
var el = '';
|
|
29
|
+
el += '<a class="tag-plugin tag"';
|
|
30
|
+
el += ' ' + hexo.args.joinTags(args, ['color', 'href']).join(' ');
|
|
31
|
+
el += '>';
|
|
32
|
+
el += args.text;
|
|
33
|
+
el += '</a>';
|
|
34
|
+
return el;
|
|
35
|
+
});
|
package/scripts/tags/toc.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* toc.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
4
|
*
|
|
5
|
-
* {% toc wiki:xxx [open:true] [display:mobile]
|
|
5
|
+
* {% toc wiki:xxx [title] [open:true] [display:mobile] %}
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
@@ -33,7 +33,7 @@ hexo.extend.tag.register('toc', function(args) {
|
|
|
33
33
|
el += '>';
|
|
34
34
|
|
|
35
35
|
el += '<details class="toc"';
|
|
36
|
-
if (args.open
|
|
36
|
+
if (args.open != 'false') {
|
|
37
37
|
el += ' open';
|
|
38
38
|
}
|
|
39
39
|
el += '>';
|
|
@@ -15,7 +15,6 @@ p>code:not([class]),li>code:not([class])
|
|
|
15
15
|
border-radius: $border-block
|
|
16
16
|
overflow: hidden
|
|
17
17
|
background: var(--block)
|
|
18
|
-
border: 1px solid var(--block-border)
|
|
19
18
|
line-height: 1.5
|
|
20
19
|
font-family: $ff-code
|
|
21
20
|
box-sizing: border-box
|
|
@@ -35,7 +34,6 @@ p>code:not([class]),li>code:not([class])
|
|
|
35
34
|
background: var(--block-hover)
|
|
36
35
|
border-top-left-radius: "calc(%s - 1px)" % $border-block
|
|
37
36
|
border-top-right-radius: "calc(%s - 1px)" % $border-block
|
|
38
|
-
border-bottom: 1px solid var(--block-border)
|
|
39
37
|
span
|
|
40
38
|
margin-right: 4px
|
|
41
39
|
>table
|
|
@@ -102,7 +100,6 @@ table:not([class])
|
|
|
102
100
|
>.hljs
|
|
103
101
|
padding: 1rem
|
|
104
102
|
border-radius: $border-block
|
|
105
|
-
border: 1px solid var(--block-border)
|
|
106
103
|
line-height: 1.5
|
|
107
104
|
box-sizing: border-box
|
|
108
105
|
|
package/source/css/_custom.styl
CHANGED
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
@require('_defines/const')
|
|
2
2
|
|
|
3
3
|
// 通用主题色
|
|
4
|
-
$color-theme = convert(hexo-config('style.color.
|
|
5
|
-
$color-accent = convert(hexo-config('style.color.
|
|
6
|
-
$color-link = convert(hexo-config('style.color.
|
|
7
|
-
$color-button = convert(hexo-config('style.color.
|
|
8
|
-
$color-hover = convert(hexo-config('style.color.
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
$
|
|
12
|
-
$
|
|
13
|
-
$
|
|
14
|
-
$
|
|
15
|
-
$light-text = convert(hexo-config('style.color.light.text'))
|
|
16
|
-
$light-code = convert(hexo-config('style.color.light.code'))
|
|
17
|
-
|
|
18
|
-
// 深色
|
|
19
|
-
$dark-background = convert(hexo-config('style.color.dark.background'))
|
|
20
|
-
$dark-block = convert(hexo-config('style.color.dark.block'))
|
|
21
|
-
$dark-card = convert(hexo-config('style.color.dark.card'))
|
|
22
|
-
$dark-title = convert(hexo-config('style.color.dark.title'))
|
|
23
|
-
$dark-text = convert(hexo-config('style.color.dark.text'))
|
|
24
|
-
$dark-code = convert(hexo-config('style.color.dark.code'))
|
|
25
|
-
|
|
26
|
-
// 移动端深色背景(OLED调成纯黑可以省电)
|
|
27
|
-
$dark-background-mobile = convert(hexo-config('style.color.dark.background-mobile'))
|
|
28
|
-
|
|
4
|
+
$color-theme = convert(hexo-config('style.color.theme'))
|
|
5
|
+
$color-accent = convert(hexo-config('style.color.accent'))
|
|
6
|
+
$color-link = convert(hexo-config('style.color.link'))
|
|
7
|
+
$color-button = convert(hexo-config('style.color.button'))
|
|
8
|
+
$color-hover = convert(hexo-config('style.color.hover'))
|
|
9
|
+
|
|
10
|
+
// 动态颜色
|
|
11
|
+
$color-background = convert(hexo-config('style.color.background'))
|
|
12
|
+
$color-block = convert(hexo-config('style.color.block'))
|
|
13
|
+
$color-code = convert(hexo-config('style.color.code'))
|
|
14
|
+
$color-text = convert(hexo-config('style.color.text'))
|
|
29
15
|
|
|
30
16
|
// @font-face
|
|
31
17
|
// font-family: 'Dosis'
|
|
@@ -55,7 +41,7 @@ $fs-13 = .8125rem
|
|
|
55
41
|
$fs-12 = .75rem
|
|
56
42
|
|
|
57
43
|
$fs-h1 = 1.75rem // 32px
|
|
58
|
-
$fs-h2 = 1.5rem
|
|
44
|
+
$fs-h2 = 1.5rem // 24px
|
|
59
45
|
$fs-h3 = 1.375rem // 22px
|
|
60
46
|
$fs-h4 = 1.125rem // 18px
|
|
61
47
|
$fs-h5 = $fs-15
|
|
@@ -64,7 +50,7 @@ $fs-p = $fs-15
|
|
|
64
50
|
$fs-code = $fs-13
|
|
65
51
|
|
|
66
52
|
$border-card = 12px
|
|
67
|
-
$border-block =
|
|
53
|
+
$border-block = 6px
|
|
68
54
|
$border-image = 6px
|
|
69
55
|
|
|
70
56
|
// 可以动态变化的属性
|
|
@@ -1,46 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
$color-background-h = hue($color-background)
|
|
2
|
+
$color-background-s = saturation($color-background)
|
|
3
|
+
$color-background-l = lightness($color-background)
|
|
4
|
+
|
|
5
|
+
$color-block-h = hue($color-block)
|
|
6
|
+
$color-block-s = saturation($color-block)
|
|
7
|
+
$color-block-l = lightness($color-block)
|
|
8
|
+
|
|
9
|
+
$color-code-h = hue($color-code)
|
|
10
|
+
$color-code-s = saturation($color-code)
|
|
11
|
+
$color-code-l = lightness($color-code)
|
|
12
|
+
|
|
13
|
+
$color-text-h = hue($color-text)
|
|
14
|
+
$color-text-s = saturation($color-text)
|
|
15
|
+
$color-text-l = lightness($color-text)
|
|
16
|
+
|
|
9
17
|
set_text_dark()
|
|
10
|
-
--text-p0: $
|
|
11
|
-
--text-p1: $
|
|
12
|
-
--text-p2:
|
|
13
|
-
--text-p3:
|
|
14
|
-
--text-p4:
|
|
15
|
-
--text-meta:
|
|
16
|
-
--text-code: $
|
|
18
|
+
--text-p0: hsl($color-text-h, $color-text-s, 0)
|
|
19
|
+
--text-p1: hsl($color-text-h, $color-text-s, $color-text-l)
|
|
20
|
+
--text-p2: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 0.75)
|
|
21
|
+
--text-p3: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.25)
|
|
22
|
+
--text-p4: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.5)
|
|
23
|
+
--text-meta: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 2)
|
|
24
|
+
--text-code: hsl($color-code-h, $color-code-s, $color-code-l * 1)
|
|
25
|
+
|
|
26
|
+
set_text_light()
|
|
27
|
+
--text-p0: hsl($color-text-h, $color-text-s, 100)
|
|
28
|
+
--text-p1: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 0.5)
|
|
29
|
+
--text-p2: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 0.75)
|
|
30
|
+
--text-p3: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.2)
|
|
31
|
+
--text-p4: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.4)
|
|
32
|
+
--text-meta: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.75)
|
|
33
|
+
--text-code: hsl($color-code-h, $color-code-s, $color-code-l * 1.25)
|
|
34
|
+
|
|
17
35
|
:root
|
|
18
|
-
--site-bg: $
|
|
19
|
-
--card: $
|
|
20
|
-
--block: $
|
|
21
|
-
--block-border:
|
|
22
|
-
--block-hover:
|
|
36
|
+
--site-bg: hsl($color-background-h, $color-background-s, 98)
|
|
37
|
+
--card: hsl($color-block-h, $color-block-s, 100)
|
|
38
|
+
--block: hsl($color-block-h, $color-block-s, 95)
|
|
39
|
+
--block-border: hsl($color-block-h, $color-block-s, 90)
|
|
40
|
+
--block-hover: hsl($color-block-h, $color-block-s, 92)
|
|
41
|
+
--block-lighten: hsl($color-block-h, $color-block-s, 100)
|
|
23
42
|
set_text_dark()
|
|
24
|
-
--theme-
|
|
25
|
-
--theme-bg: mix($color-theme, $light-card, 10)
|
|
43
|
+
--theme-bg2: $color-theme
|
|
26
44
|
--theme-link: $color-link
|
|
27
45
|
|
|
28
46
|
set_darkmode()
|
|
29
47
|
:root
|
|
30
|
-
--site-bg: $
|
|
31
|
-
--card: $
|
|
32
|
-
--block: $
|
|
33
|
-
--block-border:
|
|
34
|
-
--block-hover:
|
|
48
|
+
--site-bg: hsl($color-background-h, $color-background-s / 2, 16)
|
|
49
|
+
--card: hsl($color-block-h, $color-block-s * 1.5, 25)
|
|
50
|
+
--block: hsl($color-block-h, $color-block-s, 12)
|
|
51
|
+
--block-border: hsl($color-block-h, $color-block-s, 24)
|
|
52
|
+
--block-hover: hsl($color-block-h, $color-block-s, 9)
|
|
53
|
+
--block-lighten: hsl($color-block-h, $color-block-s, 30)
|
|
35
54
|
set_text_light()
|
|
36
|
-
--theme-highlight: $color-theme
|
|
37
|
-
--theme-bg: mix($color-theme, $dark-card, 10)
|
|
38
55
|
@media screen and (max-width: $device-mobile-max)
|
|
39
|
-
--site-bg:
|
|
40
|
-
--card: darken($dark-card, 6)
|
|
41
|
-
--block: darken($dark-block, 4)
|
|
42
|
-
--block-border: lighten($dark-block, 2)
|
|
43
|
-
--block-hover: darken($dark-block,8)
|
|
56
|
+
--site-bg: black
|
|
44
57
|
|
|
45
58
|
if hexo-config('style.darkmode') == 'auto'
|
|
46
59
|
// 系统的dark模式
|
|
@@ -22,8 +22,8 @@ h1.article-title
|
|
|
22
22
|
.md-text.content
|
|
23
23
|
position: relative
|
|
24
24
|
margin-bottom: 2rem
|
|
25
|
-
display: flex
|
|
26
|
-
flex-direction: column
|
|
25
|
+
// display: flex
|
|
26
|
+
// flex-direction: column
|
|
27
27
|
&.indent
|
|
28
28
|
>p:not([class])
|
|
29
29
|
text-indent: 'calc(%s * 2)' % $fs-p
|
|
@@ -129,7 +129,7 @@ h1.article-title
|
|
|
129
129
|
padding: 2px 0
|
|
130
130
|
text-decoration: none
|
|
131
131
|
line-height: 1.2
|
|
132
|
-
&:
|
|
132
|
+
&:before
|
|
133
133
|
content: ''
|
|
134
134
|
position: absolute
|
|
135
135
|
border-radius: 2px
|
|
@@ -143,9 +143,11 @@ h1.article-title
|
|
|
143
143
|
&:hover
|
|
144
144
|
border-bottom: none
|
|
145
145
|
color: var(--theme-link)
|
|
146
|
-
|
|
146
|
+
z-index 0
|
|
147
|
+
&:before
|
|
147
148
|
height: 100%
|
|
148
149
|
opacity: 0.2
|
|
150
|
+
z-index -1
|
|
149
151
|
bottom: 0
|
|
150
152
|
left: -2px
|
|
151
153
|
right: -2px
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
border-radius: $border-card
|
|
10
10
|
overflow: hidden
|
|
11
11
|
box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.03)
|
|
12
|
-
.page-number
|
|
12
|
+
.page-number
|
|
13
13
|
padding: 4px 8px
|
|
14
14
|
border-radius: 8px
|
|
15
15
|
background: var(--block)
|
|
16
|
+
margin: 2px
|
|
16
17
|
.extend
|
|
17
18
|
text-align: center
|
|
18
19
|
background-size: contain
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
nav.menu
|
|
6
6
|
margin: 1rem 0
|
|
7
7
|
background: var(--block)
|
|
8
|
+
border: 1px solid var(--block-border)
|
|
8
9
|
border-radius: 6px
|
|
9
10
|
display: flex
|
|
10
|
-
padding: 1px
|
|
11
11
|
flex-wrap: wrap
|
|
12
12
|
&::-webkit-scrollbar
|
|
13
13
|
display: none
|
|
@@ -28,7 +28,7 @@ nav.menu
|
|
|
28
28
|
text-align: center
|
|
29
29
|
&.active, &:hover
|
|
30
30
|
color: var(--text-p1)
|
|
31
|
-
background: var(--
|
|
31
|
+
background: var(--block-lighten)
|
|
32
32
|
box-shadow: $boxshadow-button
|
|
33
33
|
|
|
34
34
|
.l_left .menu a.nav-item
|
|
@@ -1,120 +1,106 @@
|
|
|
1
1
|
set_text_white()
|
|
2
2
|
--text-p0: white
|
|
3
3
|
--text-p1: white
|
|
4
|
-
--text-p2:
|
|
4
|
+
--text-p2: hsl(0 0 88%)
|
|
5
5
|
--text-p3: #ddd
|
|
6
6
|
--text-code: white
|
|
7
|
-
--card: $dark-card
|
|
8
|
-
--block: $dark-block
|
|
9
|
-
--block-border: lighten($dark-block, 6)
|
|
10
|
-
--block-hover: darken($dark-block, 4)
|
|
11
7
|
set_text_black()
|
|
12
8
|
--text-p0: black
|
|
13
9
|
--text-p1: #111
|
|
14
|
-
--text-p2:
|
|
10
|
+
--text-p2: hsl(0 0 12%)
|
|
15
11
|
--text-p3: #555
|
|
16
12
|
--text-code: white
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--
|
|
20
|
-
--
|
|
13
|
+
|
|
14
|
+
set_dynamic_color($theme)
|
|
15
|
+
--theme: $theme
|
|
16
|
+
--theme-bg1: hsl(hue($theme), 90, 90)
|
|
17
|
+
--theme-bg2: hsl(hue($theme), 80, 95)
|
|
18
|
+
--theme-border: hsl(hue($theme), 50, 80)
|
|
19
|
+
--text-p0: hsl(hue($theme), 60, 16)
|
|
20
|
+
--text-p1: hsl(hue($theme), 50, 24)
|
|
21
|
+
--text-p2: hsl(hue($theme), 90, 24)
|
|
21
22
|
|
|
22
23
|
.tag-plugin
|
|
23
24
|
--theme: var(--text-p1)
|
|
24
25
|
--theme-border: var(--block-border)
|
|
25
|
-
--theme-
|
|
26
|
+
--theme-bg1: hsl(hue($color-theme), 90, 90)
|
|
27
|
+
--theme-bg2: var(--block)
|
|
28
|
+
&.tag
|
|
29
|
+
--text-p2: hsl(hue($color-theme), 90, 24)
|
|
26
30
|
|
|
27
31
|
.tag-plugin[color='red']
|
|
28
|
-
|
|
29
|
-
--theme-border: mix($c-red, white, 60)
|
|
30
|
-
--theme-bg: mix($c-red, white, 15)
|
|
31
|
-
|
|
32
|
+
set_dynamic_color($c-red)
|
|
32
33
|
.tag-plugin[color='orange']
|
|
33
|
-
|
|
34
|
-
--theme-border: mix($c-orange, white, 60)
|
|
35
|
-
--theme-bg: mix($c-orange, white, 15)
|
|
36
|
-
|
|
34
|
+
set_dynamic_color($c-orange)
|
|
37
35
|
.tag-plugin[color='yellow']
|
|
38
|
-
|
|
39
|
-
--theme-border: mix($c-yellow, white, 60)
|
|
40
|
-
--theme-bg: mix($c-yellow, white, 20)
|
|
41
|
-
|
|
36
|
+
set_dynamic_color($c-yellow)
|
|
42
37
|
.tag-plugin[color='green']
|
|
43
|
-
|
|
44
|
-
--theme-border: mix($c-green, white, 60)
|
|
45
|
-
--theme-bg: mix($c-green, white, 15)
|
|
46
|
-
|
|
38
|
+
set_dynamic_color($c-green)
|
|
47
39
|
.tag-plugin[color='cyan']
|
|
48
|
-
|
|
49
|
-
--theme-border: mix($c-cyan, white, 60)
|
|
50
|
-
--theme-bg: mix($c-cyan, white, 15)
|
|
51
|
-
|
|
40
|
+
set_dynamic_color($c-cyan)
|
|
52
41
|
.tag-plugin[color='blue']
|
|
53
|
-
|
|
54
|
-
--theme-border: mix($c-blue, white, 60)
|
|
55
|
-
--theme-bg: mix($c-blue, white, 15)
|
|
56
|
-
|
|
42
|
+
set_dynamic_color($c-blue)
|
|
57
43
|
.tag-plugin[color='purple']
|
|
58
|
-
|
|
59
|
-
--theme-border: mix($c-purple, white, 60)
|
|
60
|
-
--theme-bg: mix($c-purple, white, 15)
|
|
44
|
+
set_dynamic_color($c-purple)
|
|
61
45
|
|
|
62
46
|
.tag-plugin[color='light']
|
|
63
|
-
--theme-
|
|
47
|
+
--theme-bg1: hsl(0 0 88%)
|
|
48
|
+
--theme-bg2: white
|
|
49
|
+
set_text_black()
|
|
64
50
|
|
|
65
51
|
.tag-plugin[color='dark']
|
|
66
|
-
--theme-
|
|
52
|
+
--theme-bg1: hsl(0 0 12%)
|
|
53
|
+
--theme-bg2: #333
|
|
67
54
|
set_text_white()
|
|
68
55
|
|
|
69
56
|
.tag-plugin[color='warning']
|
|
70
57
|
--theme: $c-yellow
|
|
71
58
|
--theme-border: #ffe659
|
|
72
|
-
--theme-
|
|
59
|
+
--theme-bg2: #ffe659
|
|
73
60
|
--theme-link: #ff453a
|
|
74
61
|
|
|
75
62
|
.tag-plugin[color='error']
|
|
76
63
|
--theme: $c-yellow
|
|
77
64
|
--theme-border: #ff453a
|
|
78
|
-
--theme-
|
|
65
|
+
--theme-bg2: #ff453a
|
|
79
66
|
--theme-link: #ffe659
|
|
80
67
|
set_text_white()
|
|
81
68
|
|
|
82
69
|
set_darkmode_tags()
|
|
70
|
+
set_dynamic_color($theme)
|
|
71
|
+
--theme: $theme
|
|
72
|
+
--theme-bg1: hsl(hue($theme), 80, 20)
|
|
73
|
+
--theme-bg2: hsl(hue($theme), 16, 16)
|
|
74
|
+
--theme-border: hsl(hue($theme), 50, 24)
|
|
75
|
+
--text-p0: hsl(hue($theme), 80, 80)
|
|
76
|
+
--text-p1: hsl(hue($theme), 64, 80)
|
|
77
|
+
--text-p2: hsl(hue($theme), 80, 72)
|
|
78
|
+
.tag-plugin.tag
|
|
79
|
+
set_dynamic_color($color-theme)
|
|
83
80
|
.tag-plugin[color='red']
|
|
84
|
-
|
|
85
|
-
--theme-bg: mix($c-red, black, 35)
|
|
86
|
-
|
|
81
|
+
set_dynamic_color($c-red)
|
|
87
82
|
.tag-plugin[color='orange']
|
|
88
|
-
|
|
89
|
-
--theme-bg: mix($c-orange, black, 35)
|
|
90
|
-
|
|
83
|
+
set_dynamic_color($c-orange)
|
|
91
84
|
.tag-plugin[color='yellow']
|
|
92
|
-
|
|
93
|
-
--theme-bg: mix($c-yellow, black, 30)
|
|
94
|
-
|
|
85
|
+
set_dynamic_color($c-yellow)
|
|
95
86
|
.tag-plugin[color='green']
|
|
96
|
-
|
|
97
|
-
--theme-bg: mix($c-green, black, 30)
|
|
98
|
-
|
|
87
|
+
set_dynamic_color($c-green)
|
|
99
88
|
.tag-plugin[color='cyan']
|
|
100
|
-
|
|
101
|
-
--theme-bg: mix($c-cyan, black, 30)
|
|
102
|
-
|
|
89
|
+
set_dynamic_color($c-cyan)
|
|
103
90
|
.tag-plugin[color='blue']
|
|
104
|
-
|
|
105
|
-
--theme-bg: mix($c-blue, black, 35)
|
|
106
|
-
|
|
91
|
+
set_dynamic_color($c-blue)
|
|
107
92
|
.tag-plugin[color='purple']
|
|
108
|
-
|
|
109
|
-
--theme-bg: mix($c-purple, black, 40)
|
|
110
|
-
|
|
93
|
+
set_dynamic_color($c-purple)
|
|
111
94
|
.tag-plugin[color='light']
|
|
112
95
|
--theme-border: white
|
|
113
|
-
--theme-
|
|
96
|
+
--theme-bg1: hsl(0 0 88%)
|
|
97
|
+
--theme-bg2: #fff
|
|
98
|
+
set_text_black()
|
|
114
99
|
|
|
115
100
|
.tag-plugin[color='dark']
|
|
116
101
|
--theme-border: black
|
|
117
|
-
--theme-
|
|
102
|
+
--theme-bg1: hsl(0 0 12%)
|
|
103
|
+
--theme-bg2: #111
|
|
118
104
|
set_text_white()
|
|
119
105
|
|
|
120
106
|
.tag-plugin[color='warning'],.tag-plugin[color='light']
|
|
@@ -4,7 +4,7 @@ details.folding
|
|
|
4
4
|
margin: 1rem 0
|
|
5
5
|
border-radius: $border-block
|
|
6
6
|
font-size: $fs-14
|
|
7
|
-
background: var(--theme-
|
|
7
|
+
background: var(--theme-bg2)
|
|
8
8
|
border: 1px solid var(--theme-border)
|
|
9
9
|
summary
|
|
10
10
|
cursor: pointer
|
|
@@ -22,13 +22,13 @@ details.folding
|
|
|
22
22
|
border-bottom: none !important
|
|
23
23
|
&:hover
|
|
24
24
|
color: var(--text-p0)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
&:after
|
|
26
|
+
position: absolute
|
|
27
|
+
content: '+'
|
|
28
|
+
text-align: center
|
|
29
|
+
top: 50%
|
|
30
|
+
transform: translateY(-50%)
|
|
31
|
+
right: 1rem
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
details.folding[open]
|
|
@@ -38,9 +38,8 @@ details.folding[open]
|
|
|
38
38
|
border-bottom-right-radius: 0
|
|
39
39
|
color: var(--text-p1)
|
|
40
40
|
margin-bottom: 0
|
|
41
|
-
&:
|
|
42
|
-
|
|
43
|
-
content: '-'
|
|
41
|
+
&:after
|
|
42
|
+
content: '-'
|
|
44
43
|
>div.body
|
|
45
44
|
display: flex;
|
|
46
45
|
flex-direction: column;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.tag-plugin.
|
|
1
|
+
.tag-plugin.grid
|
|
2
2
|
display: grid
|
|
3
3
|
grid-gap: 16px
|
|
4
4
|
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 16px)
|
|
5
5
|
>.cell
|
|
6
6
|
margin: 1rem 0
|
|
7
7
|
p:first-child>strong:only-child
|
|
8
|
-
font-size:
|
|
8
|
+
font-size: 1rem
|
|
9
9
|
>.cell>
|
|
10
10
|
p
|
|
11
11
|
line-height: 1.5
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
margin-bottom: -0.25em
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
.tag-plugin.
|
|
22
|
+
.tag-plugin.grid
|
|
23
23
|
@media screen and (max-width: $device-tablet)
|
|
24
24
|
display: block
|
|
25
25
|
|
|
26
|
-
.tag-plugin.
|
|
26
|
+
.tag-plugin.grid
|
|
27
27
|
&[bg]>.cell
|
|
28
28
|
padding: 1rem
|
|
29
29
|
border-radius: $border-card
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.md-text .tag-plugin.mark
|
|
2
2
|
padding: 0 1px
|
|
3
3
|
border-radius: 2px
|
|
4
|
-
background: var(--theme-
|
|
4
|
+
background: var(--theme-bg2)
|
|
5
5
|
border: 1px solid var(--theme-border)
|
|
6
6
|
color: var(--text-p0)
|
|
7
7
|
&[color=dark]
|
|
8
|
-
border-color: var(--theme-
|
|
8
|
+
border-color: var(--theme-bg2)
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
margin-bottom: 1rem
|
|
5
5
|
padding: 0 1rem
|
|
6
6
|
border-radius: $border-block
|
|
7
|
-
background: var(--theme-
|
|
7
|
+
background: var(--theme-bg2)
|
|
8
8
|
border: 1px solid var(--theme-border)
|
|
9
9
|
color: var(--text-p1)
|
|
10
10
|
>.title
|
|
11
11
|
font-size: $fs-15
|
|
12
12
|
line-height: 1.2
|
|
13
13
|
margin-top: 1rem
|
|
14
|
+
font-weight: 500
|
|
15
|
+
color: var(--text-p0)
|
|
14
16
|
>.body
|
|
15
17
|
&,p
|
|
16
18
|
font-size: $fs-14
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
.md-text .tag-plugin.poetry
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
display: flex
|
|
3
|
+
flex-direction: column
|
|
4
|
+
align-items: center
|
|
5
|
+
.content
|
|
6
|
+
>.title
|
|
7
|
+
font-weight: 500
|
|
8
|
+
font-size: 1rem
|
|
9
|
+
margin-top: var(--gap-p)
|
|
10
|
+
>.meta
|
|
11
|
+
color: var(--text-p2)
|
|
12
|
+
font-size: $fs-12
|
|
13
|
+
font-weight: 500
|
|
14
|
+
span+span
|
|
15
|
+
margin-left: 4px
|
|
16
|
+
>.body
|
|
17
|
+
margin: var(--gap-p) 0
|
|
18
|
+
border-top: 1px dashed var(--block-border)
|
|
19
|
+
border-bottom: 1px dashed var(--block-border)
|
|
20
|
+
p
|
|
21
|
+
font-size: $fs-14
|
|
22
|
+
>.footer
|
|
23
|
+
font-style: italic
|
|
24
|
+
color: var(--text-p4)
|
|
25
|
+
margin: var(--gap-p) 0
|
|
26
|
+
font-size: $fs-12
|
|
26
27
|
|
|
27
28
|
// 描边修饰
|
|
28
|
-
.md-text .tag-plugin.poetry
|
|
29
|
+
.md-text .tag-plugin.poetry .content
|
|
29
30
|
padding-left: 1rem
|
|
30
31
|
position: relative
|
|
31
32
|
&:before
|