hexo-theme-stellar 1.20.0 → 1.22.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/README.md +3 -3
- package/_config.yml +26 -17
- package/languages/zh-CN.yml +1 -1
- package/languages/zh-TW.yml +1 -1
- package/layout/404.ejs +1 -1
- package/layout/_partial/cover/wiki_cover.ejs +9 -15
- package/layout/_partial/head.ejs +1 -1
- package/layout/_partial/main/article/article_footer.ejs +11 -16
- package/layout/_partial/main/navbar/breadcrumb.ejs +4 -4
- package/layout/_partial/main/post_list/post_card.ejs +1 -1
- package/layout/_partial/main/post_list/wiki_card.ejs +6 -11
- package/layout/_partial/plugins/comments/artalk/script.ejs +1 -1
- package/layout/_partial/sidebar/index.ejs +1 -1
- package/layout/_partial/widgets/ghuser.ejs +1 -1
- package/layout/_partial/widgets/related.ejs +12 -21
- package/layout/_partial/widgets/toc.ejs +5 -2
- package/layout/index.ejs +6 -7
- package/layout/post.ejs +1 -1
- package/layout/wiki.ejs +1 -1
- package/package.json +1 -1
- package/scripts/events/lib/doc_tree.js +24 -10
- package/scripts/helpers/category_color.js +18 -5
- package/scripts/tags/index.js +3 -1
- package/scripts/tags/lib/banner.js +67 -0
- package/scripts/tags/lib/{ablock.js → box.js} +3 -3
- package/scripts/tags/lib/gallery.js +58 -0
- package/scripts/tags/lib/navbar.js +15 -34
- package/scripts/tags/lib/swiper.js +1 -1
- package/scripts/tags/lib/timeline.js +3 -3
- package/source/css/_common/highlight.styl +1 -0
- package/source/css/_layout/list.styl +12 -4
- package/source/css/_layout/md.styl +1 -1
- package/source/css/_layout/partial/cover.styl +2 -0
- package/source/css/_layout/partial/paginator.styl +2 -2
- package/source/css/_layout/tag-plugins/banner.styl +107 -0
- package/source/css/_layout/tag-plugins/common.styl +5 -2
- package/source/css/_layout/tag-plugins/frame.styl +1 -1
- package/source/css/_layout/tag-plugins/gallery.styl +95 -0
- package/source/css/_layout/tag-plugins/grid.styl +0 -9
- package/source/css/_layout/tag-plugins/note.styl +1 -0
- package/source/css/_layout/tag-plugins/timeline.styl +14 -1
- package/source/css/_layout/widgets/ghuser.styl +5 -6
- package/source/css/_layout/widgets/toc_common.styl +12 -1
- package/source/css/_plugins/copycode.styl +17 -6
- package/source/css/_plugins/fancybox.styl +4 -0
- package/source/css/_plugins/index.styl +2 -0
- package/source/css/{_layout/partial/ai_abstract.styl → _plugins/tianli_gpt.styl} +2 -2
- package/source/js/main.js +29 -4
- package/source/js/plugins/copycode.js +0 -4
- package/source/js/plugins/fcircle.js +3 -3
- package/source/js/plugins/friends.js +3 -3
- package/source/js/plugins/memos.js +133 -0
- package/source/js/plugins/sites.js +4 -4
- package/source/js/plugins/timeline.js +3 -3
- package/source/js/plugins/weibo.js +3 -3
- /package/layout/_partial/{main/article/ai_abstract.ejs → plugins/ai/tianli_gpt.ejs} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* banner.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% banner title [subtitle] [bg:src] [avatar:src] [link] %}
|
|
6
|
+
* {% navbar xxx %}
|
|
7
|
+
* {% endbanner %}
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
module.exports = ctx => function(args, content) {
|
|
13
|
+
args = ctx.args.map(args, ['bg', 'avatar', 'link'], ['title', 'subtitle'])
|
|
14
|
+
var el = ''
|
|
15
|
+
el += `<div class="tag-plugin banner">`
|
|
16
|
+
// bg
|
|
17
|
+
el += `<img class="bg" src="${args.bg ? args.bg : ctx.theme.config.default.banner}">`
|
|
18
|
+
// content
|
|
19
|
+
el += `<div class="content">`
|
|
20
|
+
// content.top
|
|
21
|
+
el += `<div class="top">`
|
|
22
|
+
// content.top.back
|
|
23
|
+
if (args.link?.length > 0) {
|
|
24
|
+
el += `<div></div>`
|
|
25
|
+
} else {
|
|
26
|
+
el += `
|
|
27
|
+
<button class="back cap" onclick="window.history.back()">
|
|
28
|
+
<svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"></path></svg>
|
|
29
|
+
</button>
|
|
30
|
+
`
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// content.top.menus
|
|
34
|
+
const rows = content.split('\n').filter(item => item.trim().length > 0)
|
|
35
|
+
for (let row of rows) {
|
|
36
|
+
if (row.includes('tag-plugin navbar')) {
|
|
37
|
+
el += row
|
|
38
|
+
break
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
el += `</div>`
|
|
42
|
+
// content.bottom
|
|
43
|
+
el += `<div class="bottom">`
|
|
44
|
+
// content.bottom.avatar
|
|
45
|
+
if (args.avatar?.length > 0) {
|
|
46
|
+
el += `<img class="avatar" src="${args.avatar}">`
|
|
47
|
+
}
|
|
48
|
+
// content.bottom.text-area
|
|
49
|
+
if (args.title?.length > 0 || args.subtitle?.length > 0) {
|
|
50
|
+
el += `<div class="text-area">`
|
|
51
|
+
if (args.title?.length > 0) {
|
|
52
|
+
el += `<div class="text title">${args.title}</div>`
|
|
53
|
+
}
|
|
54
|
+
if (args.subtitle?.length > 0) {
|
|
55
|
+
el += `<div class="text subtitle">${args.subtitle}</div>`
|
|
56
|
+
}
|
|
57
|
+
el += `</div>`
|
|
58
|
+
}
|
|
59
|
+
el += `</div>`
|
|
60
|
+
el += `</div>`
|
|
61
|
+
// link
|
|
62
|
+
if (args.link?.length > 0) {
|
|
63
|
+
el += `<a class="banner-link" href="${args.link}"></a>`
|
|
64
|
+
}
|
|
65
|
+
el += `</div>`
|
|
66
|
+
return el
|
|
67
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* box.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
4
|
*
|
|
5
|
-
* {%
|
|
5
|
+
* {% box [color:color] [child:codeblock/tabs] title %}
|
|
6
6
|
* body
|
|
7
|
-
* {%
|
|
7
|
+
* {% endbox %}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gallery.js v2.1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% gallery [layout:grid/flow] [size:mix/s/m/l/xl] [ratio:origin/square] %}
|
|
6
|
+
* 
|
|
7
|
+
* 
|
|
8
|
+
* 
|
|
9
|
+
* 
|
|
10
|
+
* {% endgallery %}
|
|
11
|
+
*
|
|
12
|
+
* layout:grid 网格布局,支持通过 size/ratio 设置尺寸和长宽比
|
|
13
|
+
* layout:flow 瀑布流布局,竖排,适合图片量大的时候使用(体验不佳请慎用)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
'use strict'
|
|
17
|
+
|
|
18
|
+
function img(src, alt) {
|
|
19
|
+
let img = ''
|
|
20
|
+
img += `<img src="${src}"`
|
|
21
|
+
if (alt?.length > 0) {
|
|
22
|
+
img += ` alt="${alt}"`
|
|
23
|
+
}
|
|
24
|
+
img += `/>`
|
|
25
|
+
// cap
|
|
26
|
+
img += `<div class="image-meta">`
|
|
27
|
+
if (alt?.length > 0) {
|
|
28
|
+
img += `<span class="image-caption">${alt}</span>`
|
|
29
|
+
}
|
|
30
|
+
img += `</div>`
|
|
31
|
+
return img
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = ctx => function(args, content) {
|
|
35
|
+
args = ctx.args.map(args, ['layout', 'size', 'ratio'])
|
|
36
|
+
if (args.layout == null) {
|
|
37
|
+
args.layout = ctx.theme.config.tag_plugins.gallery.layout
|
|
38
|
+
}
|
|
39
|
+
if (args.size == null) {
|
|
40
|
+
args.size = ctx.theme.config.tag_plugins.gallery.size
|
|
41
|
+
}
|
|
42
|
+
if (args.ratio == null) {
|
|
43
|
+
args.ratio = ctx.theme.config.tag_plugins.gallery.ratio
|
|
44
|
+
}
|
|
45
|
+
var el = ''
|
|
46
|
+
el += `<div class="tag-plugin gallery" ${ctx.args.joinTags(args, ['layout', 'size', 'ratio']).join(' ')}>`
|
|
47
|
+
const img_mds = content.split('\n').filter(item => item.trim().length > 0)
|
|
48
|
+
for (let md of img_mds) {
|
|
49
|
+
const matches = md.match(/\!\[(.*?)\]\((.*?)\)/i)
|
|
50
|
+
if (matches?.length > 2) {
|
|
51
|
+
let alt = matches[1]
|
|
52
|
+
let src = matches[2]
|
|
53
|
+
el += `<div class="cell">${img(src, alt)}</div>`
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
el += `</div>`
|
|
57
|
+
return el
|
|
58
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* navbar.js
|
|
2
|
+
* navbar.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
4
|
*
|
|
5
|
-
* {% navbar [markdown
|
|
5
|
+
* {% navbar [active:url] [markdown-link] ... %}
|
|
6
6
|
*
|
|
7
7
|
* example:
|
|
8
|
-
* {% navbar active
|
|
8
|
+
* {% navbar active:/about/ [Home](/) [About](/about/) [Comments](#comments) %}
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict'
|
|
@@ -18,40 +18,21 @@ module.exports = ctx => function(args) {
|
|
|
18
18
|
if (args.links) {
|
|
19
19
|
args.links = args.links.split(' ')
|
|
20
20
|
}
|
|
21
|
-
var el =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
let tmp = a.split('](')
|
|
32
|
-
if (tmp.length > 1) {
|
|
33
|
-
text = tmp[0]
|
|
34
|
-
if (text.length > 1) {
|
|
35
|
-
text = text.substring(1, text.length)
|
|
36
|
-
}
|
|
37
|
-
href = tmp[1]
|
|
38
|
-
if (href.length > 1) {
|
|
39
|
-
href = href.substring(0, href.length-1)
|
|
40
|
-
}
|
|
41
|
-
el += ' href="' + href + '"'
|
|
21
|
+
var el = `<div class="tag-plugin navbar"><nav class="cap">`
|
|
22
|
+
for (let link of args.links) {
|
|
23
|
+
const matches = link.match(/\[(.*?)\]\((.*?)\)/i)
|
|
24
|
+
if (matches?.length > 2) {
|
|
25
|
+
let text = matches[1]
|
|
26
|
+
let href = matches[2]
|
|
27
|
+
if (href == args.active) {
|
|
28
|
+
el += `<a class="link blur active" href="${href}">${text}</a>`
|
|
29
|
+
} else {
|
|
30
|
+
el += `<a class="link" href="${href}">${text}</a>`
|
|
42
31
|
}
|
|
43
32
|
} else {
|
|
44
|
-
el +=
|
|
45
|
-
text = a
|
|
33
|
+
el += `<a class="link" href="#${link}">${link}</a>`
|
|
46
34
|
}
|
|
47
|
-
el += '>'
|
|
48
|
-
el += text
|
|
49
|
-
el += '</a>'
|
|
50
|
-
return el
|
|
51
35
|
}
|
|
52
|
-
|
|
53
|
-
el += layoutItem(item, i)
|
|
54
|
-
})
|
|
55
|
-
el += '</nav></div>'
|
|
36
|
+
el += `</nav></div>`
|
|
56
37
|
return el
|
|
57
38
|
}
|
|
@@ -22,7 +22,7 @@ module.exports = ctx => function(args, content) {
|
|
|
22
22
|
})
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
el += '<div class="tag-plugin
|
|
25
|
+
el += '<div class="tag-plugin swiper" id="swiper-api"'
|
|
26
26
|
el += ' ' + ctx.args.joinTags(args, ['width', 'effect']).join(' ')
|
|
27
27
|
el += '>'
|
|
28
28
|
el += '<div class="swiper-wrapper">'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* timeline.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
2
|
+
* timeline.js v2.1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
*
|
|
4
4
|
* {% timeline %}
|
|
5
5
|
*
|
|
@@ -35,14 +35,14 @@ function layoutNodeContent(ctx, content) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
module.exports = ctx => function(args, content = '') {
|
|
38
|
-
args = ctx.args.map(args, ['api', 'user', 'type', 'limit', 'hide'])
|
|
38
|
+
args = ctx.args.map(args, ['api', 'user', 'type', 'limit', 'hide', 'avatar'])
|
|
39
39
|
var el = ''
|
|
40
40
|
if (!args.type) {
|
|
41
41
|
args.type = 'timeline'
|
|
42
42
|
}
|
|
43
43
|
if (args.api && args.api.length > 0) {
|
|
44
44
|
el += '<div class="tag-plugin timeline stellar-' + args.type + '-api"'
|
|
45
|
-
el += ' ' + ctx.args.joinTags(args, ['api', 'user', 'limit', 'hide']).join(' ')
|
|
45
|
+
el += ' ' + ctx.args.joinTags(args, ['api', 'user', 'limit', 'hide', 'avatar']).join(' ')
|
|
46
46
|
el += '>'
|
|
47
47
|
} else {
|
|
48
48
|
el += '<div class="tag-plugin timeline">'
|
|
@@ -145,12 +145,11 @@
|
|
|
145
145
|
|
|
146
146
|
.post-list .post-card.wiki article .preview
|
|
147
147
|
display: flex
|
|
148
|
-
|
|
149
|
-
margin: 1rem .5rem
|
|
150
|
-
@media screen and (min-width: 950px)
|
|
151
|
-
margin: 1rem
|
|
148
|
+
margin: 1rem 3rem
|
|
152
149
|
align-items: center
|
|
153
150
|
img
|
|
151
|
+
width: 96px
|
|
152
|
+
max-height: 96px
|
|
154
153
|
object-fit: contain
|
|
155
154
|
&:not(.lazy)
|
|
156
155
|
trans1: transform 0.75s
|
|
@@ -162,5 +161,14 @@
|
|
|
162
161
|
flex: 1
|
|
163
162
|
overflow: hidden
|
|
164
163
|
word-wrap: break-word
|
|
164
|
+
.caps
|
|
165
|
+
line-height: 1
|
|
166
|
+
margin-bottom: 0.75rem
|
|
167
|
+
.cap
|
|
168
|
+
background: var(--theme-block)
|
|
169
|
+
padding: 2px 4px
|
|
170
|
+
border-radius: 2px
|
|
165
171
|
p:last-child
|
|
166
172
|
margin-bottom: 0
|
|
173
|
+
.cap+.cap
|
|
174
|
+
margin-left: 4px
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
background-clip: content-box
|
|
29
29
|
&.next
|
|
30
30
|
border-left: 1px dashed var(--block-border)
|
|
31
|
-
background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.
|
|
31
|
+
background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/arrow/064b95430caf4.svg')
|
|
32
32
|
&.prev
|
|
33
33
|
border-right: 1px dashed var(--block-border)
|
|
34
|
-
background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.
|
|
34
|
+
background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/arrow/f049bbd4e88ec.svg')
|
|
35
35
|
.current
|
|
36
36
|
font-family: $ff-code
|
|
37
37
|
background: var(--block)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
.tag-plugin.banner
|
|
2
|
+
border-radius: $border-card
|
|
3
|
+
position: relative
|
|
4
|
+
overflow: hidden
|
|
5
|
+
display: flex
|
|
6
|
+
flex-direction: column
|
|
7
|
+
justify-content: flex-end
|
|
8
|
+
align-items: flex-start
|
|
9
|
+
color: white
|
|
10
|
+
height: 240px
|
|
11
|
+
@media screen and (max-width: $device-mobile-max)
|
|
12
|
+
height: 200px
|
|
13
|
+
.bg
|
|
14
|
+
z-index: 0
|
|
15
|
+
.content
|
|
16
|
+
z-index: 1
|
|
17
|
+
width: 100%
|
|
18
|
+
height: 100%
|
|
19
|
+
display: flex
|
|
20
|
+
flex-direction: column
|
|
21
|
+
justify-content: space-between
|
|
22
|
+
.top
|
|
23
|
+
display: flex
|
|
24
|
+
justify-content: space-between
|
|
25
|
+
align-items: center
|
|
26
|
+
line-height: 1
|
|
27
|
+
margin: 1rem
|
|
28
|
+
.navbar
|
|
29
|
+
margin: 0
|
|
30
|
+
nav.cap
|
|
31
|
+
border-radius: 6px
|
|
32
|
+
background: rgba(black, 0.2)
|
|
33
|
+
.link
|
|
34
|
+
color: rgba(white, 0.8)
|
|
35
|
+
padding: 2px 6px
|
|
36
|
+
border-radius: 4px
|
|
37
|
+
background: none
|
|
38
|
+
line-height: 1.5
|
|
39
|
+
font-size: $fs-15
|
|
40
|
+
&:hover
|
|
41
|
+
color: white
|
|
42
|
+
background: rgba(black, 0.5)
|
|
43
|
+
&.active
|
|
44
|
+
color: white
|
|
45
|
+
background: rgba(white, 0.25)
|
|
46
|
+
.back
|
|
47
|
+
background: none
|
|
48
|
+
padding: 0
|
|
49
|
+
line-height: 0
|
|
50
|
+
visibility: hidden
|
|
51
|
+
@media screen and (max-width: $device-mobile-max)
|
|
52
|
+
visibility: visible
|
|
53
|
+
svg
|
|
54
|
+
width: 20px
|
|
55
|
+
height: 20px
|
|
56
|
+
fill: white
|
|
57
|
+
.banner-link
|
|
58
|
+
position: absolute
|
|
59
|
+
top: 0
|
|
60
|
+
bottom: 0
|
|
61
|
+
left: 0
|
|
62
|
+
right: 0
|
|
63
|
+
opacity: 0
|
|
64
|
+
z-index: 2
|
|
65
|
+
img
|
|
66
|
+
object-fit: cover
|
|
67
|
+
disable-select()
|
|
68
|
+
margin: 0
|
|
69
|
+
height: 100%
|
|
70
|
+
width: 100%
|
|
71
|
+
img.bg
|
|
72
|
+
position absolute
|
|
73
|
+
top: 0
|
|
74
|
+
bottom: 0
|
|
75
|
+
left: 0
|
|
76
|
+
right: 0
|
|
77
|
+
img.avatar
|
|
78
|
+
border-radius: 50%
|
|
79
|
+
width: 48px
|
|
80
|
+
height: 48px
|
|
81
|
+
border: 2px solid white
|
|
82
|
+
.bottom
|
|
83
|
+
display: flex
|
|
84
|
+
padding: 1rem
|
|
85
|
+
width: 100%
|
|
86
|
+
box-sizing: border-box
|
|
87
|
+
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
|
|
88
|
+
text-shadow: 0 0 1px rgba(0,0,0,0.12)
|
|
89
|
+
.title
|
|
90
|
+
font-size: 1.5rem
|
|
91
|
+
font-weight: 600
|
|
92
|
+
.avatar+.text-area
|
|
93
|
+
margin-left: 0.75rem
|
|
94
|
+
.text-area .text
|
|
95
|
+
line-height: 1.2
|
|
96
|
+
margin-top: 0.25rem
|
|
97
|
+
margin-bottom: 0.25rem
|
|
98
|
+
.avatar+.text-area .title
|
|
99
|
+
font-size: 1.2rem
|
|
100
|
+
.subtitle
|
|
101
|
+
font-size: $fs-14
|
|
102
|
+
|
|
103
|
+
.tag-plugin.banner
|
|
104
|
+
trans1(transform, 2s)
|
|
105
|
+
&:hover
|
|
106
|
+
img.bg
|
|
107
|
+
transform: scale(1.01)
|
|
@@ -13,8 +13,9 @@ set_text_black()
|
|
|
13
13
|
|
|
14
14
|
set_dynamic_color($theme)
|
|
15
15
|
--theme: $theme
|
|
16
|
-
--theme-block: hsl(hue($theme), 90, 92)
|
|
17
16
|
--theme-border: hsl(hue($theme), 50, 80)
|
|
17
|
+
--theme-block: hsl(hue($theme), 90, 92)
|
|
18
|
+
--theme-codeblock: hsl(hue($theme), 50, 95)
|
|
18
19
|
--text-p0: hsl(hue($theme), 55, 16)
|
|
19
20
|
--text-p1: hsl(hue($theme), 55, 20)
|
|
20
21
|
--text-p2: hsl(hue($theme), 90, 24)
|
|
@@ -23,6 +24,7 @@ set_dynamic_color($theme)
|
|
|
23
24
|
--theme: var(--text-p1)
|
|
24
25
|
--theme-border: var(--block-border)
|
|
25
26
|
--theme-block: var(--block)
|
|
27
|
+
--theme-codeblock: var(--block)
|
|
26
28
|
|
|
27
29
|
.colorful[color='red']
|
|
28
30
|
set_dynamic_color($c-red)
|
|
@@ -63,8 +65,9 @@ set_dynamic_color($theme)
|
|
|
63
65
|
set_darkmode_tags()
|
|
64
66
|
set_dynamic_color($theme)
|
|
65
67
|
--theme: $theme
|
|
66
|
-
--theme-block: hsl(hue($theme), 16, 16)
|
|
67
68
|
--theme-border: hsl(hue($theme), 50, 24)
|
|
69
|
+
--theme-block: hsl(hue($theme), 16, 16)
|
|
70
|
+
--theme-codeblock: hsl(hue($theme), 12, 18)
|
|
68
71
|
--text-p0: hsl(hue($theme), 100, 85)
|
|
69
72
|
--text-p1: hsl(hue($theme), 50, 75)
|
|
70
73
|
--text-p2: hsl(hue($theme), 80, 72)
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
margin-top: 19px
|
|
28
28
|
margin-bottom: 20px
|
|
29
29
|
.frame
|
|
30
|
-
background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.
|
|
30
|
+
background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/frame/iphone11.svg);
|
|
31
31
|
width: 329px
|
|
32
32
|
height: 658px
|
|
33
33
|
&[focus='top']
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.tag-plugin.gallery
|
|
2
|
+
.cell
|
|
3
|
+
display: block
|
|
4
|
+
overflow hidden
|
|
5
|
+
z-index 0
|
|
6
|
+
position: relative
|
|
7
|
+
&:hover
|
|
8
|
+
.image-meta
|
|
9
|
+
background: rgba(black, 0.5)
|
|
10
|
+
.image-caption
|
|
11
|
+
color: white
|
|
12
|
+
img
|
|
13
|
+
object-fit: cover
|
|
14
|
+
max-height: 100%
|
|
15
|
+
display: block
|
|
16
|
+
.image-meta
|
|
17
|
+
position: absolute
|
|
18
|
+
z-index: 1
|
|
19
|
+
top: 0
|
|
20
|
+
left: 0
|
|
21
|
+
right: 0
|
|
22
|
+
bottom: 0
|
|
23
|
+
pointer-events: none
|
|
24
|
+
background: transparent
|
|
25
|
+
trans1(background)
|
|
26
|
+
display: flex
|
|
27
|
+
flex-direction: column
|
|
28
|
+
justify-content: flex-end
|
|
29
|
+
.image-caption
|
|
30
|
+
display: block
|
|
31
|
+
font-size: $fs-13
|
|
32
|
+
color: transparent
|
|
33
|
+
line-height: 1.2
|
|
34
|
+
margin: 0.5rem
|
|
35
|
+
trans1(color)
|
|
36
|
+
&:empty
|
|
37
|
+
display: none
|
|
38
|
+
|
|
39
|
+
.tag-plugin.gallery[layout='grid'] .cell
|
|
40
|
+
trans1(transform, 0.5s)
|
|
41
|
+
&:hover
|
|
42
|
+
img
|
|
43
|
+
transform: scale(1.1)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// 网格布局
|
|
47
|
+
.tag-plugin.gallery[layout='grid']
|
|
48
|
+
display: grid
|
|
49
|
+
&[size='s']
|
|
50
|
+
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr))
|
|
51
|
+
grid-gap: 2px
|
|
52
|
+
.cell,img
|
|
53
|
+
border-radius: 2px
|
|
54
|
+
&[size='m']
|
|
55
|
+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
|
|
56
|
+
grid-gap: 4px
|
|
57
|
+
.cell,img
|
|
58
|
+
border-radius: 4px
|
|
59
|
+
&[size='l']
|
|
60
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr))
|
|
61
|
+
grid-gap: 8px
|
|
62
|
+
.cell,img
|
|
63
|
+
border-radius: 8px
|
|
64
|
+
&[size='xl'] // 2列
|
|
65
|
+
grid-template-columns: repeat(2, 1fr)
|
|
66
|
+
grid-gap: 16px
|
|
67
|
+
.cell,img
|
|
68
|
+
border-radius: 16px
|
|
69
|
+
&[size='mix'] // 1张大图+2张小图
|
|
70
|
+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
|
|
71
|
+
grid-gap: 4px
|
|
72
|
+
.cell,img
|
|
73
|
+
border-radius: 4px
|
|
74
|
+
.cell
|
|
75
|
+
&:nth-child(3n+1)
|
|
76
|
+
grid-column: auto / span 2
|
|
77
|
+
grid-row: auto / span 2
|
|
78
|
+
&[ratio='square']
|
|
79
|
+
.cell
|
|
80
|
+
aspect-ratio: 1
|
|
81
|
+
.cell
|
|
82
|
+
background: var(--block)
|
|
83
|
+
img
|
|
84
|
+
width: 100%
|
|
85
|
+
height: 100%
|
|
86
|
+
// 瀑布流布局
|
|
87
|
+
.tag-plugin.gallery[layout='flow']
|
|
88
|
+
column-count: 3
|
|
89
|
+
column-gap: 8px
|
|
90
|
+
.cell
|
|
91
|
+
border-radius: 8px
|
|
92
|
+
padding-bottom: 8px
|
|
93
|
+
.image-meta
|
|
94
|
+
border-radius: 8px
|
|
95
|
+
margin-bottom: 8px
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
grid-gap: 16px
|
|
4
4
|
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 16px)
|
|
5
5
|
>.cell
|
|
6
|
-
margin: 1rem 0
|
|
7
6
|
p:first-child>strong:only-child
|
|
8
7
|
font-size: 1rem
|
|
9
8
|
>.cell>
|
|
@@ -18,14 +17,6 @@
|
|
|
18
17
|
p:last-child
|
|
19
18
|
margin-bottom: -0.25em
|
|
20
19
|
|
|
21
|
-
.md-text .tag-plugin.grid
|
|
22
|
-
margin-top: -0.5rem
|
|
23
|
-
margin-bottom: -0.5rem
|
|
24
|
-
|
|
25
|
-
.tag-plugin.grid
|
|
26
|
-
@media screen and (max-width: $device-tablet)
|
|
27
|
-
display: block
|
|
28
|
-
|
|
29
20
|
.tag-plugin.grid
|
|
30
21
|
&[bg]>.cell
|
|
31
22
|
padding: 1rem
|
|
@@ -206,4 +206,17 @@
|
|
|
206
206
|
h5,h6
|
|
207
207
|
font-size: $fs-15
|
|
208
208
|
margin: 0.5rem 0
|
|
209
|
-
line-height: 1.2
|
|
209
|
+
line-height: 1.2
|
|
210
|
+
|
|
211
|
+
.tag-plugin.timeline.stellar-memos-api .body
|
|
212
|
+
p:first-child
|
|
213
|
+
margin-top: 2px
|
|
214
|
+
p:last-child
|
|
215
|
+
margin-bottom: 2px
|
|
216
|
+
img
|
|
217
|
+
margin: 0
|
|
218
|
+
max-height: 128px
|
|
219
|
+
.tag-plugin.image
|
|
220
|
+
display: flex
|
|
221
|
+
.image-bg+.image-bg
|
|
222
|
+
margin-left: 4px
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
padding: 1rem
|
|
9
9
|
box-shadow: $boxshadow-card
|
|
10
10
|
|
|
11
|
-
.widget-wrapper.ghuser
|
|
11
|
+
.widgets .widget-wrapper.ghuser
|
|
12
12
|
.avatar
|
|
13
13
|
display: block
|
|
14
14
|
border-radius: 100%
|
|
@@ -20,15 +20,14 @@
|
|
|
20
20
|
@media screen and (max-width: $device-tablet)
|
|
21
21
|
max-width: 50%
|
|
22
22
|
|
|
23
|
-
.username
|
|
23
|
+
p.username
|
|
24
24
|
font-weight: 900
|
|
25
25
|
font-size: $fs-h2
|
|
26
26
|
color: var(--text-p0)
|
|
27
|
-
margin: 0
|
|
28
|
-
|
|
29
|
-
.bio
|
|
27
|
+
margin: 0
|
|
28
|
+
p.bio
|
|
30
29
|
font-size: $fs-13
|
|
31
|
-
margin: 0
|
|
30
|
+
margin: 0
|
|
32
31
|
|
|
33
32
|
.follow
|
|
34
33
|
font-weight: 500
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
padding: 0.5rem
|
|
25
25
|
font-weight: 500
|
|
26
26
|
font-size: $fs-13
|
|
27
|
-
color: var(--text-
|
|
27
|
+
color: var(--text-p1)
|
|
28
28
|
.toc-child .toc-item .toc-link
|
|
29
29
|
padding: 0.25rem 0.5rem 0.25rem 1.3rem
|
|
30
30
|
font-weight: 400
|
|
@@ -69,3 +69,14 @@
|
|
|
69
69
|
color: $color-theme !important
|
|
70
70
|
&:before
|
|
71
71
|
visibility: visible
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
// 激活上级目录时显示子目录
|
|
75
|
+
.toc-item a.toc-link+ol
|
|
76
|
+
display: none
|
|
77
|
+
.toc a.toc-link.active+ol
|
|
78
|
+
display: block
|
|
79
|
+
ol:has(> .toc-item a.active)
|
|
80
|
+
display: block
|
|
81
|
+
.doc-tree:hover a.toc-link+ol
|
|
82
|
+
display: block
|