hexo-theme-stellar 1.28.0 → 1.29.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 +55 -6
- package/_data/icons.yml +3 -1
- package/_data/widgets.yml +6 -0
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +7 -0
- package/languages/zh-TW.yml +7 -0
- package/layout/_partial/comments/artalk/script.ejs +9 -13
- package/layout/_partial/comments/beaudar/script.ejs +20 -23
- package/layout/_partial/comments/giscus/script.ejs +11 -11
- package/layout/_partial/comments/twikoo/script.ejs +12 -17
- package/layout/_partial/comments/utterances/script.ejs +20 -23
- package/layout/_partial/comments/waline/script.ejs +9 -16
- package/layout/_partial/head.ejs +1 -1
- package/layout/_partial/main/article/article_footer.ejs +6 -2
- package/layout/_partial/main/article/related_posts.ejs +1 -1
- package/layout/_partial/main/navbar/article_banner.ejs +2 -0
- package/layout/_partial/main/navbar/breadcrumb/note.ejs +8 -0
- package/layout/_partial/main/navbar/dateinfo.ejs +11 -0
- package/layout/_partial/main/notebook/note_card.ejs +36 -0
- package/layout/_partial/main/notebook/note_tags.ejs +9 -0
- package/layout/_partial/main/notebook/notebook_card.ejs +10 -0
- package/layout/_partial/main/notebook/paginator.ejs +9 -0
- package/layout/_partial/scripts/tagtree.ejs +29 -0
- package/layout/_partial/scripts/theme.ejs +62 -0
- package/layout/_partial/scripts.ejs +4 -1
- package/layout/_partial/sidebar/index_leftbar.ejs +10 -0
- package/layout/_partial/sidebar/index_rightbar.ejs +10 -0
- package/layout/_partial/sidebar/search.ejs +4 -0
- package/layout/_partial/widgets/recent.ejs +10 -0
- package/layout/_partial/widgets/tagtree.ejs +59 -0
- package/layout/_partial/widgets/toc.ejs +7 -5
- package/layout/_plugins/fancybox.ejs +2 -2
- package/layout/_plugins/tianli_gpt.ejs +1 -1
- package/layout/layout.ejs +5 -1
- package/layout/notebooks.ejs +8 -0
- package/layout/notes.ejs +12 -0
- package/layout/page.ejs +11 -1
- package/package.json +1 -1
- package/scripts/events/index.js +1 -0
- package/scripts/events/lib/notebooks.js +153 -0
- package/scripts/generators/notebooks.js +71 -0
- package/scripts/tags/index.js +5 -0
- package/scripts/tags/lib/image.js +16 -4
- package/scripts/tags/lib/quot.js +1 -2
- package/scripts/tags/lib/read/paper.js +90 -0
- package/scripts/tags/lib/read/reel.js +43 -0
- package/scripts/tags/lib/video.js +11 -6
- package/source/css/_common/button.styl +3 -3
- package/source/css/_common/device.styl +3 -3
- package/source/css/_common/highlight.styl +4 -2
- package/source/css/{_layout → _components}/md.styl +21 -19
- package/source/css/_components/pages/notebook.styl +65 -0
- package/source/css/{_layout → _components}/partial/article-banner.styl +4 -4
- package/source/css/{_layout → _components}/tag-plugins/common.styl +2 -2
- package/source/css/_components/tag-plugins/index.styl +1 -0
- package/source/css/{_layout → _components}/tag-plugins/media.styl +1 -1
- package/source/css/{_layout → _components}/tag-plugins/quot.styl +0 -2
- package/source/css/_components/tag-plugins/read/paper.styl +98 -0
- package/source/css/_components/tag-plugins/read/reel.styl +103 -0
- package/source/css/_defines/func.styl +4 -6
- package/source/css/_defines/theme.styl +36 -38
- package/source/css/_plugins/comments/waline.styl +3 -3
- package/source/css/_plugins/fancybox.styl +1 -1
- package/source/css/_plugins/mermaid.styl +2 -2
- package/source/css/main.styl +1 -1
- package/source/js/main.js +14 -0
- package/source/js/plugins/copycode.js +1 -1
- package/source/js/search/local-search.js +2 -2
- /package/source/css/{_layout → _components}/index.styl +0 -0
- /package/source/css/{_layout → _components}/layout.styl +0 -0
- /package/source/css/{_layout → _components}/list.styl +0 -0
- /package/source/css/{_layout → _components}/main.styl +0 -0
- /package/source/css/{_layout → _components}/pages/archives.styl +0 -0
- /package/source/css/{_layout → _components}/pages/error.styl +0 -0
- /package/source/css/{_layout → _components}/partial/article-footer.styl +0 -0
- /package/source/css/{_layout → _components}/partial/bread-nav.styl +0 -0
- /package/source/css/{_layout → _components}/partial/cover.styl +0 -0
- /package/source/css/{_layout → _components}/partial/footer.styl +0 -0
- /package/source/css/{_layout → _components}/partial/navbar.styl +0 -0
- /package/source/css/{_layout → _components}/partial/paginator.styl +0 -0
- /package/source/css/{_layout → _components}/partial/related.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/footer.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/logo.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/menu.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/nav-area.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/search.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/sidebar.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/about.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/banner.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/button.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/checkbox.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/copy.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/emoji.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/folders.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/folding.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/frame.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/friends.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/gallery.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/ghcard.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/grid.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/hashtag.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/icon.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/image.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/inline-labels.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/link.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/mark.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/navbar.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/note.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/okr.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/override.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/poetry.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/sites.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/tabs.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/timeline.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/toc.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/components.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/ghrepo.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/ghuser.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/list.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/markdown.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/related.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/tagcloud.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/timeline.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/toc.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/tree.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/widgets.styl +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* image.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
4
|
*
|
|
5
|
-
* {% image src [alt] [width:400px] [bg:#eee] [download:true/false/url] %}
|
|
5
|
+
* {% image src [alt] [width:400px] [bg:#eee] [download:true/false/url] [fancybox:true/false/url] %}
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
'use strict'
|
|
@@ -18,6 +18,7 @@ module.exports = ctx => function(args) {
|
|
|
18
18
|
}
|
|
19
19
|
// fancybox
|
|
20
20
|
var fancybox = false
|
|
21
|
+
var fancyboxHref = null
|
|
21
22
|
if (ctx.theme.config.plugins.fancybox && ctx.theme.config.plugins.fancybox.enable) {
|
|
22
23
|
// 主题配置
|
|
23
24
|
if (ctx.theme.config.tag_plugins.image && ctx.theme.config.tag_plugins.image.fancybox) {
|
|
@@ -27,8 +28,11 @@ module.exports = ctx => function(args) {
|
|
|
27
28
|
if (args.fancybox && args.fancybox.length > 0) {
|
|
28
29
|
if (args.fancybox == 'false') {
|
|
29
30
|
fancybox = false
|
|
30
|
-
} else {
|
|
31
|
+
} else if (args.fancybox === 'true') {
|
|
31
32
|
fancybox = args.fancybox
|
|
33
|
+
} else {
|
|
34
|
+
fancybox = true
|
|
35
|
+
fancyboxHref = args.fancybox
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
}
|
|
@@ -36,16 +40,24 @@ module.exports = ctx => function(args) {
|
|
|
36
40
|
function img(src, alt, style) {
|
|
37
41
|
let img = ''
|
|
38
42
|
img += '<img src="' + src + '"'
|
|
43
|
+
let a = '<a data-fancybox'
|
|
39
44
|
if (alt) {
|
|
40
45
|
img += ' alt="' + alt + '"'
|
|
46
|
+
a += ` data-caption="${alt}"`
|
|
41
47
|
}
|
|
42
|
-
if (fancybox) {
|
|
48
|
+
if (fancybox && !fancyboxHref) {
|
|
43
49
|
img += ` data-fancybox="${fancybox}"`
|
|
44
50
|
}
|
|
45
51
|
if (style.length > 0) {
|
|
46
52
|
img += ' style="' + style + '"'
|
|
47
53
|
}
|
|
48
54
|
img += '/>'
|
|
55
|
+
|
|
56
|
+
if (fancyboxHref) {
|
|
57
|
+
a += ` href="${fancyboxHref}">${img}</a>`
|
|
58
|
+
return a
|
|
59
|
+
}
|
|
60
|
+
|
|
49
61
|
return img
|
|
50
62
|
}
|
|
51
63
|
|
|
@@ -87,4 +99,4 @@ module.exports = ctx => function(args) {
|
|
|
87
99
|
|
|
88
100
|
el += '</div>'
|
|
89
101
|
return el
|
|
90
|
-
}
|
|
102
|
+
}
|
package/scripts/tags/lib/quot.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
'use strict'
|
|
11
11
|
|
|
12
|
-
module.exports = ctx => function(args) {
|
|
12
|
+
module.exports = ctx => function (args) {
|
|
13
13
|
var el = ''
|
|
14
14
|
args = ctx.args.map(args, ['el', 'icon', 'prefix', 'suffix'], ['text'])
|
|
15
15
|
if (!args.el) {
|
|
@@ -43,7 +43,6 @@ module.exports = ctx => function(args) {
|
|
|
43
43
|
if (args.el.includes('h')) {
|
|
44
44
|
el += '<div' + ' class="tag-plugin quot">'
|
|
45
45
|
el += '<' + args.el + ' class="content" id="' + args.text + '"' + type + '>'
|
|
46
|
-
el += '<a href="#' + args.text + '" class="headerlink" title="' + args.text + '"></a>'
|
|
47
46
|
el += content()
|
|
48
47
|
el += '</' + args.el + '>'
|
|
49
48
|
el += '</div>'
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* paper.js v1.1 | https://github.com/HcGys/stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* paper:
|
|
6
|
+
* {% paper [style:underline|无] [title:标题] [author:作者] [date:日期] [footer:footer] %}
|
|
7
|
+
*
|
|
8
|
+
* <!-- section section-title -->
|
|
9
|
+
* section-content
|
|
10
|
+
*
|
|
11
|
+
* <!-- paragraph -->
|
|
12
|
+
* paragraph-content
|
|
13
|
+
*
|
|
14
|
+
* <!-- line [right|left] -->
|
|
15
|
+
* line-content
|
|
16
|
+
*
|
|
17
|
+
* {% endpaper %}
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
'use strict'
|
|
22
|
+
|
|
23
|
+
module.exports = ctx => function(args, content) {
|
|
24
|
+
var el = ''
|
|
25
|
+
args = ctx.args.map(args, ['style','title', 'author', 'date', 'footer'])
|
|
26
|
+
|
|
27
|
+
el += '<div class="tag-plugin paper">'
|
|
28
|
+
|
|
29
|
+
el += '<div class="content' + (typeof args.style === 'undefined' ? '' : ' ' + args.style) + '">'
|
|
30
|
+
el += '<div class="title">' // 布局需要
|
|
31
|
+
if (args.title) el += args.title
|
|
32
|
+
el += '</div>'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
el += '<div class="body">'
|
|
36
|
+
|
|
37
|
+
var arr = content.split(/<!--\s*(paragraph|section|line) (.*?)\s*-->/g).filter(item => item.trim().length > 0)
|
|
38
|
+
if (arr.length > 0) {
|
|
39
|
+
var nodeType = ''
|
|
40
|
+
var innerTitle = ''
|
|
41
|
+
arr.forEach((node, i) => {
|
|
42
|
+
if (node == 'paragraph' || node == 'section' || node == 'line') {
|
|
43
|
+
nodeType = node
|
|
44
|
+
} else if (nodeType == 'paragraph'){
|
|
45
|
+
el += '<div class="paragraph">'
|
|
46
|
+
el += ctx.render.renderSync({text: (node || ''), engine: 'markdown'}).split('\n').join('')
|
|
47
|
+
el += '</div>'
|
|
48
|
+
} else if (nodeType == 'line'){
|
|
49
|
+
if (innerTitle == '') {
|
|
50
|
+
innerTitle = node
|
|
51
|
+
} else {
|
|
52
|
+
el += '<div class="line'
|
|
53
|
+
el += innerTitle == 'right' ? ' right">' : '">'
|
|
54
|
+
el += ctx.render.renderSync({text: (node || ''), engine: 'markdown'}).split('\n').join('')
|
|
55
|
+
el += '</div>'
|
|
56
|
+
innerTitle = '' // 防止被下一个section|line使用
|
|
57
|
+
}
|
|
58
|
+
} else if (nodeType == 'section') {
|
|
59
|
+
if (innerTitle == '') {
|
|
60
|
+
innerTitle = node
|
|
61
|
+
} else {
|
|
62
|
+
el += '<div class="section">'
|
|
63
|
+
el += '<div class="section-title">'
|
|
64
|
+
el += innerTitle + '</div>'
|
|
65
|
+
el += '<div class="section-content">'
|
|
66
|
+
el += ctx.render.renderSync({text: (node || ''), engine: 'markdown'}).split('\n').join('')
|
|
67
|
+
el += '</div></div>'
|
|
68
|
+
innerTitle = '' // 防止被下一个section|line使用
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
el += '</div>'
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
el += '<div class="footer">' // 布局需要
|
|
78
|
+
if (args.author || args.date) {
|
|
79
|
+
el += '<div class="author-date">'
|
|
80
|
+
if (args.author) el += '<span class="author">' + args.author + '</span>'
|
|
81
|
+
if (args.date) el += '<span class="date">' + args.date + '</span>'
|
|
82
|
+
el += '</div>'
|
|
83
|
+
}
|
|
84
|
+
if (args.footer) el += args.footer
|
|
85
|
+
el += '</div>'
|
|
86
|
+
|
|
87
|
+
el += '</div>'
|
|
88
|
+
el += '</div>'
|
|
89
|
+
return el
|
|
90
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reel.js v1.1 | https://github.com/HcGys/stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* reel:
|
|
6
|
+
* {% reel [title] [author:作者] [date:日期] [footer:footer] %}
|
|
7
|
+
* body
|
|
8
|
+
* {% endreel %}
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict'
|
|
13
|
+
|
|
14
|
+
module.exports = ctx => function(args, content) {
|
|
15
|
+
var el = ''
|
|
16
|
+
args = ctx.args.map(args, ['author', 'date', 'footer'], ['title'])
|
|
17
|
+
|
|
18
|
+
el += '<div class="tag-plugin reel"'
|
|
19
|
+
el += '>'
|
|
20
|
+
el += '<div class="content">'
|
|
21
|
+
el += '<div class="title">'
|
|
22
|
+
if (args.title) el += args.title // 布局需要
|
|
23
|
+
el += '</div>'
|
|
24
|
+
if (args.author) {
|
|
25
|
+
el += '<div class="meta">'
|
|
26
|
+
if (args.author) {
|
|
27
|
+
el += '<span>' + args.author + '</span>'
|
|
28
|
+
}
|
|
29
|
+
el += '</div>'
|
|
30
|
+
}
|
|
31
|
+
el += '<div class="body"><div class="main">'
|
|
32
|
+
el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
|
|
33
|
+
el += '</div></div>'
|
|
34
|
+
if (args.date) {
|
|
35
|
+
el += '<div class="date">' + args.date + '</div>'
|
|
36
|
+
}
|
|
37
|
+
el += '<div class="footer">'
|
|
38
|
+
if(args.footer) el += args.footer // 布局需要
|
|
39
|
+
el += '</div>'
|
|
40
|
+
el += '</div>'
|
|
41
|
+
el += '</div>'
|
|
42
|
+
return el
|
|
43
|
+
}
|
|
@@ -8,21 +8,26 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
-
module.exports = ctx => function(args) {
|
|
12
|
-
args = ctx.args.map(args, ['type', 'bilibili', 'ratio', 'width', 'autoplay'], ['src'])
|
|
11
|
+
module.exports = ctx => function (args) {
|
|
12
|
+
args = ctx.args.map(args, ['type', 'bilibili', 'youtube', 'ratio', 'width', 'autoplay'], ['src'])
|
|
13
13
|
if (args.width == null) {
|
|
14
14
|
args.width = '100%'
|
|
15
15
|
}
|
|
16
16
|
if (args.bilibili) {
|
|
17
|
-
return
|
|
18
|
-
<div class="tag-plugin video" style="aspect-ratio:${args.ratio || 16/9};max-width:${args.width};">
|
|
17
|
+
return `<div class="tag-plugin video" style="aspect-ratio:${args.ratio || 16 / 9};max-width:${args.width};">
|
|
19
18
|
<iframe src="https://player.bilibili.com/player.html?bvid=${args.bilibili}&autoplay=${args.autoplay || 'false'}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true">
|
|
20
19
|
</iframe>
|
|
21
20
|
</div>
|
|
22
21
|
`
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (args.youtube) {
|
|
24
|
+
return `<div class="tag-plugin video" style="aspect-ratio:${args.ratio || 16/9};max-width:${args.width};">
|
|
25
|
+
<iframe src="https://www.youtube.com/embed/${args.youtube}?rel=0&color=white&disablekb=1&playsinline=1&&rel=0&autoplay=${args.autoplay || '0'}" picture-in-picture="true" allowfullscreen="true" >
|
|
26
|
+
</iframe>
|
|
27
|
+
</div>
|
|
28
|
+
`
|
|
29
|
+
}
|
|
30
|
+
return `<div class="tag-plugin video" style="max-width:${args.width};">
|
|
26
31
|
<video controls preload>
|
|
27
32
|
<source src="${args.src}" type="${args.type || 'video/mp4'}">Your browser does not support the video tag.
|
|
28
33
|
</video>
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
trans1: all
|
|
28
28
|
ondark()
|
|
29
29
|
--blur-bg: alpha(#000, .4)
|
|
30
|
-
|
|
30
|
+
:root[data-theme="dark"] &
|
|
31
31
|
ondark()
|
|
32
|
-
|
|
32
|
+
:root:not([data-theme]) &
|
|
33
33
|
@media (prefers-color-scheme: dark)
|
|
34
34
|
ondark()
|
|
35
35
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
// 侧边栏弹出后
|
|
53
53
|
.l_body[leftbar] .float-panel, .l_body[rightbar] .float-panel
|
|
54
54
|
box-shadow: 0 0 4px -1px $color-theme, 0 0 16px -4px $color-theme, 0 0 32px -12px $color-theme, 0 0 128px -32px $color-theme
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
.l_body[leftbar] .float-panel button.leftbar-toggle
|
|
57
57
|
background: var(--alpha100)
|
|
58
58
|
|
|
@@ -75,7 +75,6 @@ p>code:not([class]),li>code:not([class])
|
|
|
75
75
|
padding-left: 0.25em
|
|
76
76
|
|
|
77
77
|
.md-text .gist
|
|
78
|
-
--fgColor-default: var(--text-p1)
|
|
79
78
|
.gist-file
|
|
80
79
|
border: 1px solid var(--block-border)
|
|
81
80
|
border-radius: $border-card
|
|
@@ -86,9 +85,12 @@ p>code:not([class]),li>code:not([class])
|
|
|
86
85
|
display: inherit
|
|
87
86
|
border: none
|
|
88
87
|
border-radius: 0
|
|
89
|
-
background:
|
|
88
|
+
background: var(--block)
|
|
90
89
|
margin: 0
|
|
91
90
|
padding: 1em 0
|
|
91
|
+
.blob-code-inner
|
|
92
|
+
color: var(--text-p1)
|
|
93
|
+
font-family: $ff-codeblock
|
|
92
94
|
.gist-meta
|
|
93
95
|
background: var(--block-border)
|
|
94
96
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
margin-left: 0.5em
|
|
31
31
|
h1,h2,h3,h4,h5,h6
|
|
32
32
|
text-align: center
|
|
33
|
-
a
|
|
33
|
+
>a:first-child
|
|
34
34
|
display: none
|
|
35
35
|
h2
|
|
36
36
|
margin: 2em 0 1.5em
|
|
@@ -71,29 +71,29 @@
|
|
|
71
71
|
h1,h2,h3,h4,h5,h6
|
|
72
72
|
color: var(--text)
|
|
73
73
|
line-height: 1.8
|
|
74
|
+
>a:first-child
|
|
75
|
+
background: $color-theme
|
|
76
|
+
border-radius: 2px
|
|
77
|
+
margin-right: 8px
|
|
78
|
+
trans1 background
|
|
79
|
+
&:hover
|
|
80
|
+
background: $color-hover
|
|
81
|
+
&:before
|
|
82
|
+
content: ''
|
|
83
|
+
color: white
|
|
84
|
+
font-weight: 700
|
|
85
|
+
padding: 0 2px
|
|
86
|
+
font-size: $fs-12
|
|
87
|
+
h2
|
|
88
|
+
font-weight: 500
|
|
89
|
+
>a:first-child:before
|
|
90
|
+
content: ':'
|
|
91
|
+
|
|
74
92
|
blockquote, .tag-plugin
|
|
75
93
|
h2,h3,h4,h5,h6
|
|
76
94
|
margin-top: 0.25em
|
|
77
95
|
margin-bottom: 0.25em
|
|
78
96
|
|
|
79
|
-
a.headerlink
|
|
80
|
-
background: $color-theme
|
|
81
|
-
border-radius: 2px
|
|
82
|
-
margin-right: 8px
|
|
83
|
-
trans1 background
|
|
84
|
-
a.headerlink:hover
|
|
85
|
-
background: $color-hover
|
|
86
|
-
a.headerlink:before
|
|
87
|
-
content: ''
|
|
88
|
-
color: white
|
|
89
|
-
font-weight: 700
|
|
90
|
-
padding: 0 2px
|
|
91
|
-
font-size: $fs-12
|
|
92
|
-
h2
|
|
93
|
-
font-weight: 500
|
|
94
|
-
a.headerlink:before
|
|
95
|
-
content: ':'
|
|
96
|
-
|
|
97
97
|
.md-text.content:first-child .tag-plugin:first-child
|
|
98
98
|
margin-top: 0
|
|
99
99
|
|
|
@@ -103,6 +103,8 @@
|
|
|
103
103
|
.md-text pre
|
|
104
104
|
-webkit-font-smoothing: auto
|
|
105
105
|
-moz-osx-font-smoothing: auto
|
|
106
|
+
&.mermaid
|
|
107
|
+
overflow: auto
|
|
106
108
|
|
|
107
109
|
.md-text
|
|
108
110
|
.center
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.md-text .tag-list
|
|
2
|
+
display: flex
|
|
3
|
+
flex-wrap: wrap
|
|
4
|
+
padding: 0
|
|
5
|
+
margin-top: 2rem
|
|
6
|
+
a.tag
|
|
7
|
+
display: inline-flex
|
|
8
|
+
align-items: center
|
|
9
|
+
position: relative
|
|
10
|
+
color: var(--text-p2)
|
|
11
|
+
margin: 4px
|
|
12
|
+
padding: .5em .75rem
|
|
13
|
+
border-radius: 4px
|
|
14
|
+
background: var(--block)
|
|
15
|
+
font-size: $fs-13
|
|
16
|
+
font-weight: 500
|
|
17
|
+
&:before
|
|
18
|
+
content: "#"
|
|
19
|
+
margin-left: -2px
|
|
20
|
+
margin-right: 2px
|
|
21
|
+
opacity: .4
|
|
22
|
+
&:hover
|
|
23
|
+
&:before
|
|
24
|
+
color $color-theme
|
|
25
|
+
opacity: 1
|
|
26
|
+
color: var(--text)
|
|
27
|
+
background: var(--block-hover)
|
|
28
|
+
|
|
29
|
+
.post-list .post-card .meta.cap .tag
|
|
30
|
+
&:before
|
|
31
|
+
content: "#"
|
|
32
|
+
margin-left: -2px
|
|
33
|
+
margin-right: 2px
|
|
34
|
+
opacity: .4
|
|
35
|
+
|
|
36
|
+
.widget-body.tag-tree .tag-subtree > a > .tag-switcher-wrapper
|
|
37
|
+
width: 1.75rem
|
|
38
|
+
height: 0.875rem
|
|
39
|
+
display: flex
|
|
40
|
+
justify-content: end
|
|
41
|
+
align-items: center
|
|
42
|
+
&:hover
|
|
43
|
+
color: $color-theme
|
|
44
|
+
|
|
45
|
+
.widget-body.tag-tree .tag-subtree.parent-tag > a .tag-switcher
|
|
46
|
+
display: inline-block
|
|
47
|
+
height: 0.5rem
|
|
48
|
+
width: 0.5rem
|
|
49
|
+
border-width: 1px
|
|
50
|
+
border-style: none solid solid none
|
|
51
|
+
transform: translateX(-25%) rotate(-45deg)
|
|
52
|
+
|
|
53
|
+
.widget-body.tag-tree .tag-subtree.parent-tag.expanded > a .tag-switcher
|
|
54
|
+
transform: translateY(-25%) rotate(45deg)
|
|
55
|
+
|
|
56
|
+
.widget-body.tag-tree .tag-subtree.parent-tag > .tag-subtree
|
|
57
|
+
display: none
|
|
58
|
+
|
|
59
|
+
.widget-body.tag-tree .tag-subtree.parent-tag.expanded > .tag-subtree
|
|
60
|
+
display: block
|
|
61
|
+
|
|
62
|
+
.widget-body.tag-tree .tag-subtree .tagcon
|
|
63
|
+
font-size: smaller
|
|
64
|
+
opacity: 0.4
|
|
65
|
+
margin-right: 0.25rem
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
.article.banner .content
|
|
14
14
|
.top
|
|
15
15
|
align-items: flex-start
|
|
16
|
-
margin: 1rem
|
|
16
|
+
margin: 1rem calc(1rem - 4px)
|
|
17
17
|
.title
|
|
18
18
|
font-size: $fsh1
|
|
19
19
|
color: var(--text-banner)
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
.l_body[text-indent] .article.banner .content .bottom.only-title
|
|
28
28
|
justify-content: center
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
|
|
31
31
|
// 动画配置
|
|
32
32
|
.article.banner
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
--button-hover-bg: rgba(black, 0.05)
|
|
51
51
|
ondark()
|
|
52
52
|
--button-hover-bg: rgba(white, 0.15)
|
|
53
|
-
|
|
53
|
+
:root[data-theme="dark"] &
|
|
54
54
|
ondark()
|
|
55
|
-
|
|
55
|
+
:root:not([data-theme]) &
|
|
56
56
|
@media (prefers-color-scheme: dark)
|
|
57
57
|
ondark()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'read/*'
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
.md-text .tag-plugin.paper
|
|
2
|
+
display: flex
|
|
3
|
+
flex-direction: column
|
|
4
|
+
align-items: center
|
|
5
|
+
padding-top: var(--gap-padding)
|
|
6
|
+
padding-bottom: var(--gap-padding)
|
|
7
|
+
>.content
|
|
8
|
+
border-left: 1px dashed var(--text-meta)
|
|
9
|
+
border-right: 1px dashed var(--text-meta)
|
|
10
|
+
border-bottom: 1px dashed var(--text-meta)
|
|
11
|
+
border-bottom-left-radius: $border-card
|
|
12
|
+
border-bottom-right-radius: $border-card
|
|
13
|
+
padding: 1rem
|
|
14
|
+
// max-width: calc(100% - 80px)
|
|
15
|
+
max-width: calc(95%)
|
|
16
|
+
>.title
|
|
17
|
+
font-weight: 500
|
|
18
|
+
text-align: center
|
|
19
|
+
>.meta
|
|
20
|
+
color: var(--text-p2)
|
|
21
|
+
font-size: $fs-12
|
|
22
|
+
font-weight: 500
|
|
23
|
+
>.body
|
|
24
|
+
>.paragraph
|
|
25
|
+
text-indent: 2em
|
|
26
|
+
>.section
|
|
27
|
+
>.section-title
|
|
28
|
+
text-align: center
|
|
29
|
+
>.section-content
|
|
30
|
+
text-indent: 2em
|
|
31
|
+
>.line.right
|
|
32
|
+
>p
|
|
33
|
+
text-align: right
|
|
34
|
+
.tag-plugin
|
|
35
|
+
margin: 0
|
|
36
|
+
>.footer
|
|
37
|
+
color: var(--text-p4)
|
|
38
|
+
font-size: $fs-12
|
|
39
|
+
text-align: right
|
|
40
|
+
>.author-date
|
|
41
|
+
text-align: right
|
|
42
|
+
>span
|
|
43
|
+
color: var(--text-p2)
|
|
44
|
+
font-size: $fs-12
|
|
45
|
+
font-weight: 500
|
|
46
|
+
>.author
|
|
47
|
+
margin-right: calc(0.5*var(--gap-p))
|
|
48
|
+
|
|
49
|
+
// 描边修饰
|
|
50
|
+
.md-text .tag-plugin.paper>.content
|
|
51
|
+
position: relative
|
|
52
|
+
&:before
|
|
53
|
+
content: ''
|
|
54
|
+
position: absolute
|
|
55
|
+
height: 4px
|
|
56
|
+
left: -16px
|
|
57
|
+
top: -4px
|
|
58
|
+
right: -16px
|
|
59
|
+
border-radius: 4px
|
|
60
|
+
background: var(--block)
|
|
61
|
+
>.title
|
|
62
|
+
position: relative
|
|
63
|
+
&:before
|
|
64
|
+
content: ''
|
|
65
|
+
position: absolute
|
|
66
|
+
height: 4px
|
|
67
|
+
left: calc(-1rem - 6px)
|
|
68
|
+
top: calc(-1rem - 4px)
|
|
69
|
+
right: calc(100% + 1rem - 6px)
|
|
70
|
+
border-radius: 4px
|
|
71
|
+
background: $color-accent
|
|
72
|
+
&:after
|
|
73
|
+
content: ''
|
|
74
|
+
position: absolute
|
|
75
|
+
height: 4px
|
|
76
|
+
right: calc(-1rem - 6px)
|
|
77
|
+
top: calc(-1rem - 4px)
|
|
78
|
+
left: calc(100% + 1rem - 6px)
|
|
79
|
+
border-radius: 4px
|
|
80
|
+
background: $color-accent
|
|
81
|
+
|
|
82
|
+
// 下划线修饰
|
|
83
|
+
.md-text .tag-plugin.paper > .content.underline > .title,
|
|
84
|
+
.md-text .tag-plugin.paper > .content.underline > .meta,
|
|
85
|
+
.md-text .tag-plugin.paper > .content.underline > .author-date,
|
|
86
|
+
.md-text .tag-plugin.paper > .content.underline > .footer,
|
|
87
|
+
.md-text .tag-plugin.paper > .content.underline > .body
|
|
88
|
+
background: linear-gradient(transparent 1.5rem,var(--text-meta) 1px)
|
|
89
|
+
background-size: 100% calc(1.5rem + 1px)
|
|
90
|
+
line-height: calc(1.5rem + 1px)
|
|
91
|
+
// 若要前后有一定的间隙,可以打开下面的代码;反之,可以注释掉。注意:这里的间隙不是指段落开头的空两个字,而是指每行文字距离下划线开头(末尾)的距离
|
|
92
|
+
padding: 0 3px
|
|
93
|
+
|
|
94
|
+
.md-text .tag-plugin.paper > .content.underline
|
|
95
|
+
p
|
|
96
|
+
margin: 0
|
|
97
|
+
>.title
|
|
98
|
+
border-top: 1px solid var(--text-meta)
|