hexo-theme-stellar 1.11.0 → 1.13.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 +7 -7
- package/_config.yml +22 -37
- package/_data/links.yml +7 -0
- package/_data/widgets.yml +30 -6
- package/languages/zh-CN.yml +4 -4
- package/languages/zh-TW.yml +4 -4
- package/layout/_partial/head.ejs +2 -0
- package/layout/_partial/main/article/read_next.ejs +16 -17
- package/layout/_partial/main/navbar/breadcrumb.ejs +1 -1
- package/layout/_partial/main/navbar/list_post.ejs +57 -34
- package/layout/_partial/main/post_list/post_card.ejs +25 -15
- package/layout/_partial/main/post_list/wiki_card.ejs +1 -1
- package/layout/_partial/scripts/index.ejs +1 -0
- package/layout/_partial/sidebar/header.ejs +2 -26
- package/layout/_partial/sidebar/logo.ejs +2 -2
- package/layout/_partial/sidebar/menu.ejs +27 -0
- package/layout/_partial/sidebar/widgets/ghissues.ejs +45 -0
- package/layout/_partial/sidebar/widgets/ghrepo.ejs +3 -3
- package/layout/_partial/sidebar/widgets/ghuser.ejs +4 -0
- package/layout/_partial/sidebar/widgets/markdown.ejs +1 -1
- package/layout/_partial/sidebar/widgets/recent.ejs +8 -11
- package/layout/_partial/sidebar/widgets/{wiki_more.ejs → related.ejs} +7 -7
- package/layout/_partial/sidebar/widgets/tagcloud.ejs +24 -0
- package/layout/_partial/sidebar/widgets/timeline.ejs +27 -0
- package/layout/_partial/sidebar/widgets/toc.ejs +1 -5
- package/layout/index.ejs +1 -1
- package/layout/page.ejs +19 -10
- package/package.json +1 -1
- package/scripts/events/lib/config.js +1 -1
- package/scripts/events/lib/doc_tree.js +3 -0
- package/scripts/helpers/related_posts.js +11 -39
- package/scripts/tags/about.js +10 -7
- package/scripts/tags/{grid.js → border.js} +4 -4
- package/scripts/tags/friends.js +36 -75
- package/scripts/tags/link.js +11 -9
- package/scripts/tags/navbar.js +1 -1
- package/scripts/tags/sites.js +40 -79
- package/scripts/tags/split.js +51 -0
- package/scripts/tags/timeline.js +6 -4
- package/source/css/_common/base.styl +2 -2
- package/source/css/_common/blur.styl +3 -0
- package/source/css/_common/device.styl +2 -0
- package/source/css/_common/highlight.styl +1 -1
- package/source/css/_common/loading.styl +16 -3
- package/source/css/_common/title.styl +0 -13
- package/source/css/_custom.styl +4 -4
- package/source/css/_layout/list.styl +40 -12
- package/source/css/_layout/main.styl +1 -1
- package/source/css/_layout/md.styl +1 -4
- package/source/css/_layout/partial/navbar.styl +1 -1
- package/source/css/_layout/partial/related.styl +62 -93
- package/source/css/_layout/sidebar/footer.styl +4 -2
- package/source/css/_layout/sidebar/ghrepo.styl +11 -5
- package/source/css/_layout/sidebar/ghuser.styl +19 -1
- package/source/css/_layout/sidebar/sidebar.styl +11 -96
- package/source/css/_layout/sidebar/toc_common.styl +5 -3
- package/source/css/_layout/sidebar/widgets.styl +103 -0
- package/source/css/_layout/tag-plugins/about.styl +21 -18
- package/source/css/_layout/tag-plugins/common.styl +36 -31
- package/source/css/_layout/tag-plugins/link.styl +41 -27
- package/source/css/_layout/tag-plugins/navbar.styl +10 -4
- package/source/css/_layout/tag-plugins/quot.styl +1 -1
- package/source/css/_layout/tag-plugins/split.styl +32 -0
- package/source/css/_layout/tag-plugins/timeline.styl +40 -14
- package/source/css/_plugins/comments/twikoo.styl +11 -5
- package/source/css/_plugins/comments/waline.styl +5 -1
- package/source/css/_plugins/index.styl +0 -2
- package/source/js/main.js +15 -9
- package/source/js/plugins/fcircle.js +92 -0
- package/source/js/plugins/friends.js +3 -2
- package/source/js/plugins/ghinfo.js +14 -2
- package/source/js/plugins/linkcard.js +124 -0
- package/source/js/plugins/sites.js +4 -3
- package/source/js/plugins/timeline.js +58 -40
- package/layout/_partial/plugins/comments/valine/layout.ejs +0 -19
- package/layout/_partial/plugins/comments/valine/script.ejs +0 -48
- package/scripts/tags/issues.js +0 -30
- package/source/css/_plugins/comments/valine.styl +0 -218
package/scripts/tags/sites.js
CHANGED
|
@@ -1,96 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* sites.js
|
|
2
|
+
* sites.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
4
|
*
|
|
5
|
-
* {% sites [
|
|
5
|
+
* {% sites [group] [repo:owner/repo] [api:http] %}
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
hexo.extend.tag.register('sites', function(args) {
|
|
11
|
-
args = hexo.args.map(args, ['
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
args = hexo.args.map(args, ['repo', 'api'], ['group']);
|
|
12
|
+
var links = hexo.locals.get('data').links;
|
|
13
|
+
if (links == undefined) {
|
|
14
|
+
links = {};
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
sites = {};
|
|
21
|
-
}
|
|
22
|
-
if (args.repo) {
|
|
23
|
-
sites = {
|
|
24
|
-
group: {
|
|
25
|
-
api: args.api,
|
|
26
|
-
repo: args.repo
|
|
27
|
-
}
|
|
28
|
-
}
|
|
16
|
+
var api;
|
|
17
|
+
if (args.api) {
|
|
18
|
+
api = args.api;
|
|
19
|
+
} else if (args.repo) {
|
|
20
|
+
api = 'https://raw.github.xaoxuu.com/' + args.repo + '/output/v2/data.json';
|
|
29
21
|
}
|
|
22
|
+
|
|
30
23
|
var el = '<div class="tag-plugin sites-wrap">';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
cell += '</a></div>'
|
|
53
|
-
return cell;
|
|
54
|
-
} else {
|
|
55
|
-
return '';
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
for (let groupId of Object.keys(sites)) {
|
|
59
|
-
function f() {
|
|
60
|
-
if (args.not && args.not.includes(groupId)) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (groupId in sites) {
|
|
64
|
-
let group = sites[groupId];
|
|
65
|
-
if ((typeof group == 'object') && group.constructor == Array) {
|
|
66
|
-
group = {items: group};
|
|
67
|
-
}
|
|
68
|
-
if (group.title || group.description) {
|
|
69
|
-
el += groupHeader(group);
|
|
70
|
-
}
|
|
71
|
-
if (group.repo) {
|
|
72
|
-
el += '<div class="stellar-sites-api"';
|
|
73
|
-
el += ' api="' + (group.api || 'https://issues-api.xaoxuu.com') + '/v1/' + group.repo + '"';
|
|
74
|
-
el += '>';
|
|
75
|
-
el += '<div class="group-body"></div>';
|
|
76
|
-
el += '</div>';
|
|
77
|
-
} else if (group.items) {
|
|
78
|
-
el += '<div class="group-body">';
|
|
79
|
-
group.items.forEach((site, i) => {
|
|
80
|
-
el += cell(site);
|
|
81
|
-
});
|
|
82
|
-
el += '</div>';
|
|
83
|
-
}
|
|
24
|
+
if (api) {
|
|
25
|
+
el += '<div class="stellar-sites-api"';
|
|
26
|
+
el += ' api="' + api + '"';
|
|
27
|
+
el += '>';
|
|
28
|
+
el += '<div class="group-body"></div>';
|
|
29
|
+
el += '</div>';
|
|
30
|
+
} else if (args.group) {
|
|
31
|
+
function cell(item) {
|
|
32
|
+
if (item.url && item.title) {
|
|
33
|
+
var cell = '<div class="site-card">';
|
|
34
|
+
cell += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="' + item.url + '">';
|
|
35
|
+
cell += '<img src="' + (item.screenshot || ('https://screenshot-api.xaoxuu.com/api?url=' + item.url + '&width=1280&height=720')) + '" onerror="javascript:this.removeAttribute("data-src");this.src="' + hexo.theme.config.default.cover + '";"/>';
|
|
36
|
+
cell += '<div class="info">';
|
|
37
|
+
cell += '<img src="' + (item.avatar || hexo.theme.config.default.link) + '" onerror="javascript:this.removeAttribute("data-src");this.src="' + hexo.theme.config.default.link + '";"/>';
|
|
38
|
+
cell += '<span class="title">' + item.title + '</span>';
|
|
39
|
+
cell += '<span class="desc">' + (item.description || item.url) + '</span>';
|
|
40
|
+
cell += '</div>';
|
|
41
|
+
cell += '</a></div>'
|
|
42
|
+
return cell;
|
|
43
|
+
} else {
|
|
44
|
+
return '';
|
|
84
45
|
}
|
|
85
46
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
}
|
|
47
|
+
el += '<div class="group-body">';
|
|
48
|
+
const items = links[args.group] || [];
|
|
49
|
+
items.forEach((item, i) => {
|
|
50
|
+
el += cell(item);
|
|
51
|
+
});
|
|
52
|
+
el += '</div>';
|
|
93
53
|
}
|
|
54
|
+
|
|
94
55
|
el += '</div>';
|
|
95
56
|
return el;
|
|
96
57
|
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* split.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% split [style:block/card] %}
|
|
6
|
+
* <!-- cell -->
|
|
7
|
+
* left body
|
|
8
|
+
* <!-- cell -->
|
|
9
|
+
* right body
|
|
10
|
+
* {% endsplit %}
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
hexo.extend.tag.register('split', function(args, content) {
|
|
16
|
+
args = hexo.args.map(args, ['bg']);
|
|
17
|
+
var el = '';
|
|
18
|
+
el += '<div class="tag-plugin split"';
|
|
19
|
+
el += ' ' + hexo.args.joinTags(args, ['bg']).join(' ');
|
|
20
|
+
el += '>';
|
|
21
|
+
|
|
22
|
+
var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter((item, i) => {
|
|
23
|
+
return item.trim().length > 0;
|
|
24
|
+
});
|
|
25
|
+
if (arr.length > 0) {
|
|
26
|
+
var nodes = [];
|
|
27
|
+
arr.forEach((item, i) => {
|
|
28
|
+
if (item == 'cell') {
|
|
29
|
+
nodes.push({
|
|
30
|
+
header: ''
|
|
31
|
+
});
|
|
32
|
+
} else if (nodes.length > 0) {
|
|
33
|
+
var node = nodes[nodes.length-1];
|
|
34
|
+
if (node.body == undefined) {
|
|
35
|
+
node.body = item;
|
|
36
|
+
} else {
|
|
37
|
+
node.body += '\n' + item;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
nodes.forEach((node, i) => {
|
|
42
|
+
el += '<div class="cell" index="' + (i) + '">';
|
|
43
|
+
el += hexo.render.renderSync({text: node.body, engine: 'markdown'}).split('\n').join('');
|
|
44
|
+
el += '</div>';
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
el += '</div>';
|
|
49
|
+
|
|
50
|
+
return el;
|
|
51
|
+
}, {ends: true});
|
package/scripts/tags/timeline.js
CHANGED
|
@@ -36,12 +36,14 @@ function layoutNodeContent(content) {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
function postTimeline(args, content) {
|
|
39
|
-
args = hexo.args.map(args, ['api', 'user']);
|
|
39
|
+
args = hexo.args.map(args, ['api', 'user', 'type', 'limit', 'hide']);
|
|
40
40
|
var el = '';
|
|
41
|
-
|
|
41
|
+
if (!args.type) {
|
|
42
|
+
args.type = 'timeline';
|
|
43
|
+
}
|
|
42
44
|
if (args.api && args.api.length > 0) {
|
|
43
|
-
el += '<div class="tag-plugin timeline stellar-
|
|
44
|
-
el += ' ' + hexo.args.joinTags(args, ['api', 'user']).join(' ');
|
|
45
|
+
el += '<div class="tag-plugin timeline stellar-' + args.type + '-api"';
|
|
46
|
+
el += ' ' + hexo.args.joinTags(args, ['api', 'user', 'limit', 'hide']).join(' ');
|
|
45
47
|
el += '>';
|
|
46
48
|
} else {
|
|
47
49
|
el += '<div class="tag-plugin timeline">';
|
|
@@ -15,6 +15,19 @@ svg.loading
|
|
|
15
15
|
transform:rotate(360deg)
|
|
16
16
|
|
|
17
17
|
.loading-wrap
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
margin: 0
|
|
19
|
+
text-align: center
|
|
20
|
+
background: var(--block)
|
|
21
|
+
border-radius: $border-card
|
|
22
|
+
position relative
|
|
23
|
+
padding: 2rem
|
|
24
|
+
svg
|
|
25
|
+
margin: 4px
|
|
26
|
+
&:after
|
|
27
|
+
content: hexo-config('style.loading.loading')
|
|
28
|
+
color: var(--text-p1)
|
|
29
|
+
display: block
|
|
30
|
+
font-size: 14px
|
|
31
|
+
&.error
|
|
32
|
+
&:after
|
|
33
|
+
content: hexo-config('style.loading.error')
|
|
@@ -25,19 +25,6 @@ h6
|
|
|
25
25
|
.fs12
|
|
26
26
|
font-size: $fs-12
|
|
27
27
|
|
|
28
|
-
.post-list
|
|
29
|
-
.post-title
|
|
30
|
-
font-weight: 500
|
|
31
|
-
margin: .75rem 0 .5rem
|
|
32
|
-
line-height: 1.2
|
|
33
|
-
font-size: $fs-h3
|
|
34
|
-
border-bottom: none
|
|
35
|
-
color: var(--text-p0)
|
|
36
|
-
trans1 color
|
|
37
|
-
.wiki .post-title
|
|
38
|
-
margin-top: 0.5rem
|
|
39
|
-
font-weight: 700
|
|
40
|
-
|
|
41
28
|
.widgets
|
|
42
29
|
.post-title
|
|
43
30
|
margin: 0.75rem 0
|
package/source/css/_custom.styl
CHANGED
|
@@ -69,14 +69,14 @@ $border-image = 6px
|
|
|
69
69
|
|
|
70
70
|
// 可以动态变化的属性
|
|
71
71
|
:root
|
|
72
|
-
--width-left:
|
|
72
|
+
--width-left: 288px
|
|
73
73
|
--width-main: 720px
|
|
74
74
|
--gap-l: 16px
|
|
75
75
|
--gap-p: .75rem // gap for paragraph
|
|
76
76
|
// desktop 2k or larger
|
|
77
77
|
@media screen and (min-width: $device-2k)
|
|
78
78
|
--gap-l: 32px
|
|
79
|
-
--width-left:
|
|
79
|
+
--width-left: 352px
|
|
80
80
|
--width-main: 780px
|
|
81
81
|
// desktop 4k or larger
|
|
82
82
|
@media screen and (min-width: $device-4k)
|
|
@@ -84,10 +84,10 @@ $border-image = 6px
|
|
|
84
84
|
--gap-l: 64px
|
|
85
85
|
// iPad 竖屏
|
|
86
86
|
@media screen and (max-width: $device-tablet)
|
|
87
|
-
--width-left:
|
|
87
|
+
--width-left: 252px
|
|
88
88
|
// iPad 竖屏
|
|
89
89
|
@media screen and (max-width: $device-mobile-max)
|
|
90
|
-
--width-left:
|
|
90
|
+
--width-left: 288px
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
// list
|
|
2
2
|
.post-list
|
|
3
3
|
margin: 1rem
|
|
4
|
+
.post-title
|
|
5
|
+
margin-top: 1.5rem
|
|
6
|
+
.post-title:first-child
|
|
7
|
+
margin-top: .5rem
|
|
8
|
+
|
|
9
|
+
.post-list
|
|
10
|
+
.post-title
|
|
11
|
+
font-weight: 500
|
|
12
|
+
margin: .75rem 0
|
|
13
|
+
line-height: 1.2
|
|
14
|
+
font-size: $fs-h3
|
|
15
|
+
border-bottom: none
|
|
16
|
+
color: var(--text-p0)
|
|
17
|
+
trans1 color
|
|
18
|
+
@media screen and (max-width: $device-mobile)
|
|
19
|
+
font-size: $fs-h4
|
|
20
|
+
margin: 0.5rem 0
|
|
21
|
+
.wiki .post-title
|
|
22
|
+
margin-top: 0.5rem
|
|
4
23
|
|
|
5
24
|
// card
|
|
6
25
|
.post-list .post-card
|
|
@@ -14,14 +33,18 @@
|
|
|
14
33
|
position: relative
|
|
15
34
|
.excerpt
|
|
16
35
|
margin: 1rem 0
|
|
36
|
+
@media screen and (max-width: $device-mobile)
|
|
37
|
+
margin: 0.5rem 0
|
|
17
38
|
>p
|
|
18
39
|
margin: 1rem 0
|
|
40
|
+
@media screen and (max-width: $device-mobile)
|
|
41
|
+
margin: 0.5rem 0
|
|
19
42
|
line-height: 1.5
|
|
20
43
|
.meta.cap
|
|
21
44
|
display: flex
|
|
22
45
|
flex-wrap: wrap
|
|
23
46
|
align-items: center
|
|
24
|
-
margin: .
|
|
47
|
+
margin: 0.25rem 0
|
|
25
48
|
line-height: 1.5
|
|
26
49
|
span+span
|
|
27
50
|
margin-left: 0.5rem
|
|
@@ -37,10 +60,11 @@
|
|
|
37
60
|
// common article
|
|
38
61
|
.post-list article.md
|
|
39
62
|
padding: 1rem
|
|
63
|
+
@media screen and (max-width: $device-mobile)
|
|
64
|
+
padding: 0.5rem 1rem
|
|
40
65
|
p
|
|
41
66
|
color: var(--text-p2)
|
|
42
|
-
|
|
43
|
-
font-size: $fs-14
|
|
67
|
+
font-size: $fs-14
|
|
44
68
|
|
|
45
69
|
|
|
46
70
|
// posts
|
|
@@ -51,6 +75,7 @@
|
|
|
51
75
|
margin-left: -1rem
|
|
52
76
|
margin-top: -1rem
|
|
53
77
|
margin-right: -1rem
|
|
78
|
+
background: var(--block)
|
|
54
79
|
&:not(.lazy)
|
|
55
80
|
trans1: transform 1s
|
|
56
81
|
img
|
|
@@ -76,28 +101,31 @@
|
|
|
76
101
|
img
|
|
77
102
|
width: 100%
|
|
78
103
|
.cover-info
|
|
79
|
-
padding: 1rem
|
|
104
|
+
padding: 1.5rem 1rem
|
|
80
105
|
position: absolute
|
|
81
106
|
line-height: 1.2
|
|
82
107
|
width: 'calc(100% - %s * 2)' % 1rem
|
|
83
|
-
|
|
84
|
-
color: white
|
|
108
|
+
color: var(--text-p0)
|
|
85
109
|
&[position=top]
|
|
86
110
|
top: 0
|
|
87
|
-
background-image: linear-gradient(rgba(0,0,0,0.4),rgba(0,0,0,0.3),rgba(0,0,0,0))
|
|
88
111
|
&[position=bottom]
|
|
89
112
|
bottom: 0
|
|
90
|
-
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.3),rgba(0,0,0,0.4))
|
|
91
113
|
div+div
|
|
92
|
-
margin-top:
|
|
93
|
-
@media screen and (max-width: $device-mobile)
|
|
94
|
-
margin-top: 4px
|
|
114
|
+
margin-top: 4px
|
|
95
115
|
.cap
|
|
96
|
-
color: white
|
|
97
116
|
font-size: $fs-13
|
|
117
|
+
color: unset
|
|
98
118
|
.title
|
|
99
119
|
font-weight: 500
|
|
100
120
|
font-size: $fs-h3
|
|
121
|
+
@media screen and (max-width: $device-mobile)
|
|
122
|
+
padding: 1rem
|
|
123
|
+
div+div
|
|
124
|
+
margin-top: 2px
|
|
125
|
+
.title
|
|
126
|
+
font-size: $fs-h4
|
|
127
|
+
.cap
|
|
128
|
+
font-size: $fs-12
|
|
101
129
|
h2
|
|
102
130
|
margin: .25rem 0
|
|
103
131
|
font-size: $fs-h4
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
margin-left: "calc(2 * %s)" % var(--gap-l)
|
|
6
6
|
margin-right: "calc(2 * %s + %s / 2)" % (var(--gap-l) var(--width-left))
|
|
7
7
|
@media screen and (min-width: $device-mobile-max)
|
|
8
|
-
padding-top: "calc(
|
|
8
|
+
padding-top: "calc(1 * %s)" % var(--gap-l)
|
|
9
9
|
header
|
|
10
10
|
margin: 4rem 1rem 2rem
|
|
11
11
|
.logo-wrap
|
|
@@ -24,7 +24,7 @@ article.md.content
|
|
|
24
24
|
&.indent
|
|
25
25
|
>p:not([class])
|
|
26
26
|
text-indent: 'calc(%s * 2)' % $fs-p
|
|
27
|
-
text-align:
|
|
27
|
+
text-align: convert(hexo-config('style.text-align'))
|
|
28
28
|
a
|
|
29
29
|
text-indent: 0
|
|
30
30
|
h1,h2,h3,h4,h5,h6
|
|
@@ -68,9 +68,6 @@ article.md.content
|
|
|
68
68
|
.tag-plugin,iframe
|
|
69
69
|
margin-top: var(--gap-p)
|
|
70
70
|
margin-bottom: var(--gap-p)
|
|
71
|
-
p,.tag-plugin
|
|
72
|
-
.highlight,table
|
|
73
|
-
--gap-p: 1rem
|
|
74
71
|
iframe
|
|
75
72
|
display: block
|
|
76
73
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.related-wrap
|
|
2
|
-
padding:
|
|
2
|
+
padding: 1rem
|
|
3
|
+
margin: 2rem 0
|
|
3
4
|
&:empty
|
|
4
5
|
display: none
|
|
5
6
|
section.header
|
|
@@ -18,108 +19,76 @@
|
|
|
18
19
|
color: var(--text-p1)
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
padding-bottom:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
|
|
23
|
+
.related-posts
|
|
24
|
+
width: 100%
|
|
25
|
+
margin: 1rem 0
|
|
26
|
+
.item
|
|
27
|
+
line-height: 1.2
|
|
28
|
+
display: block
|
|
29
|
+
border-left: 0
|
|
30
|
+
margin-top: 1rem
|
|
31
|
+
.title
|
|
32
|
+
color: var(--text-p1)
|
|
33
|
+
font-weight: 500
|
|
34
|
+
font-size: 1rem
|
|
35
|
+
trans1 color
|
|
36
|
+
position: relative
|
|
37
|
+
padding-bottom: 4px
|
|
38
|
+
&:after
|
|
39
|
+
content: ''
|
|
40
|
+
position: absolute
|
|
41
|
+
left: 0
|
|
42
|
+
width: 0
|
|
43
|
+
height: 2px
|
|
44
|
+
bottom: 0
|
|
45
|
+
border-radius: 2px
|
|
46
|
+
background: $color-hover
|
|
47
|
+
trans1 width
|
|
48
|
+
.excerpt
|
|
49
|
+
color: var(--text-p3)
|
|
50
|
+
font-size: $fs-12
|
|
51
|
+
margin-top: 0.5rem
|
|
52
|
+
display: -webkit-box
|
|
53
|
+
-webkit-box-orient: vertical
|
|
40
54
|
overflow: hidden
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
max-width: 460px
|
|
44
|
-
border: 1px solid var(--block-hover)
|
|
45
|
-
z-index: 1
|
|
46
|
-
.img
|
|
47
|
-
min-width: 100%
|
|
48
|
-
min-height: 140px
|
|
49
|
-
height: "calc(%s * 0.5)" % @width
|
|
50
|
-
max-height: 230px
|
|
51
|
-
overflow: hidden
|
|
52
|
-
img
|
|
53
|
-
width: 100%
|
|
54
|
-
height: 100%
|
|
55
|
-
object-fit: cover
|
|
56
|
-
&:not(.lazy)
|
|
57
|
-
trans1: transform 1s
|
|
58
|
-
@media screen and (max-width: $device-tablet)
|
|
59
|
-
width: 70vw
|
|
60
|
-
.img
|
|
61
|
-
height: "calc(%s * 0.5)" % @width
|
|
55
|
+
-webkit-line-clamp: 2
|
|
56
|
+
&:hover
|
|
62
57
|
.title
|
|
63
|
-
color:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
margin: .75rem .75rem 0 .75rem
|
|
67
|
-
display: -webkit-box
|
|
68
|
-
-webkit-box-orient: vertical
|
|
69
|
-
overflow: hidden
|
|
70
|
-
-webkit-line-clamp: 2
|
|
71
|
-
.excerpt
|
|
72
|
-
color: var(--text-p2)
|
|
73
|
-
font-size: $fs-13
|
|
74
|
-
margin: 0.4rem .75rem 0 .75rem
|
|
75
|
-
display: -webkit-box
|
|
76
|
-
-webkit-box-orient: vertical
|
|
77
|
-
overflow: hidden
|
|
78
|
-
-webkit-line-clamp: 3
|
|
79
|
-
&:hover
|
|
80
|
-
img
|
|
81
|
-
transform: scale(1.04)
|
|
82
|
-
a+a
|
|
83
|
-
margin-left: 1rem
|
|
58
|
+
color: $color-hover
|
|
59
|
+
&:after
|
|
60
|
+
width: 100%
|
|
84
61
|
|
|
85
62
|
|
|
86
63
|
.related-wrap#read-next
|
|
87
64
|
.body
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
65
|
+
display: grid
|
|
66
|
+
grid-gap: 16px
|
|
67
|
+
grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 16px)
|
|
68
|
+
.item
|
|
69
|
+
border-top: 1px dashed var(--block-border)
|
|
70
|
+
border-bottom: 1px dashed var(--block-border)
|
|
71
|
+
padding: 1rem 0
|
|
72
|
+
.note
|
|
73
|
+
margin-bottom: 0.75rem
|
|
74
|
+
font-size: $fs-12
|
|
75
|
+
color: var(--text-p4)
|
|
76
|
+
font-weight: 500
|
|
77
|
+
a
|
|
101
78
|
margin: 0
|
|
102
79
|
line-height: 1.2
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
justify-content: space-between
|
|
106
|
-
align-items: center
|
|
107
|
-
font-weight: 500
|
|
108
|
-
font-size: $fs-12
|
|
109
|
-
&:first-child
|
|
110
|
-
color: var(--text-p1)
|
|
111
|
-
font-size: $fs-h4
|
|
112
|
-
font-weight: 400
|
|
113
|
-
.note
|
|
114
|
-
flex-shrink: 0
|
|
115
|
-
margin-left: 4px
|
|
116
|
-
font-size: $fs-12
|
|
117
|
-
color: var(--text-p4)
|
|
118
|
-
font-weight: 500
|
|
80
|
+
color: var(--text-p1)
|
|
81
|
+
font-size: $fs-h4
|
|
119
82
|
&:hover
|
|
120
83
|
color: $color-hover !important
|
|
121
|
-
|
|
122
|
-
|
|
84
|
+
#next
|
|
85
|
+
text-align: right
|
|
86
|
+
.wiki+.related-wrap#read-next
|
|
87
|
+
.item
|
|
88
|
+
a
|
|
89
|
+
font-size: $fs-h3
|
|
90
|
+
&#prev a
|
|
91
|
+
color: var(--text-p3)
|
|
123
92
|
|
|
124
93
|
|
|
125
94
|
.related-wrap#comments
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.l_left
|
|
2
|
-
margin
|
|
1
|
+
.l_left>.footer
|
|
2
|
+
margin: 0.5rem var(--gap-l) 0
|
|
3
3
|
@media screen and (max-width: $device-tablet)
|
|
4
4
|
margin-bottom: 1rem
|
|
5
5
|
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
if hexo-config('style.darkmode') == 'auto'
|
|
27
27
|
@media (prefers-color-scheme: dark)
|
|
28
28
|
box-shadow: none
|
|
29
|
+
if hexo-config('style.darkmode') == 'always'
|
|
30
|
+
box-shadow: none
|
|
29
31
|
|
|
30
32
|
.proj-wrap
|
|
31
33
|
display: grid
|