hexo-theme-stellar 1.17.2 → 1.18.1
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 +2 -2
- package/_config.yml +35 -57
- package/_data/widgets.yml +0 -15
- package/layout/_partial/plugins/comments/artalk/layout.ejs +19 -0
- package/layout/_partial/plugins/comments/artalk/script.ejs +25 -0
- package/layout/_partial/plugins/comments/layout.ejs +4 -4
- package/layout/_partial/scripts/index.ejs +1 -1
- package/layout/_partial/sidebar/header.ejs +4 -4
- package/layout/_partial/sidebar/index.ejs +4 -4
- package/layout/_partial/widgets/search.ejs +1 -0
- package/layout/_partial/widgets/toc.ejs +1 -1
- package/package.json +1 -1
- package/scripts/generators/search.js +2 -0
- package/scripts/tags/index.js +32 -6
- package/scripts/tags/inline-labels.js +27 -27
- package/scripts/tags/lib/ablock.js +33 -0
- package/scripts/tags/lib/about.js +48 -0
- package/scripts/tags/lib/checkbox.js +30 -0
- package/scripts/tags/{copy.js → lib/copy.js} +23 -23
- package/scripts/tags/lib/emoji.js +40 -0
- package/scripts/tags/{folders.js → lib/folders.js} +22 -22
- package/scripts/tags/lib/folding.js +30 -0
- package/scripts/tags/lib/frame.js +66 -0
- package/scripts/tags/lib/friends.js +53 -0
- package/scripts/tags/{ghcard.js → lib/ghcard.js} +18 -18
- package/scripts/tags/lib/grid.js +49 -0
- package/scripts/tags/{image.js → lib/image.js} +38 -38
- package/scripts/tags/lib/link.js +78 -0
- package/scripts/tags/lib/mark.js +23 -0
- package/scripts/tags/lib/navbar.js +57 -0
- package/scripts/tags/lib/note.js +35 -0
- package/scripts/tags/lib/poetry.js +47 -0
- package/scripts/tags/lib/quot.js +55 -0
- package/scripts/tags/lib/sites.js +57 -0
- package/scripts/tags/lib/swiper.js +36 -0
- package/scripts/tags/lib/tabs.js +33 -33
- package/scripts/tags/lib/tag.js +35 -0
- package/scripts/tags/lib/timeline.js +78 -0
- package/scripts/tags/lib/toc.js +73 -0
- 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 +14 -12
- package/source/css/_layout/partial/paginator.styl +2 -1
- package/source/css/_layout/partial/related.styl +8 -6
- 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/folders.styl +8 -8
- 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 +45 -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 +102 -1
- package/source/css/_layout/widgets/toc_common.styl +1 -1
- package/source/css/_plugins/aplayer.styl +3 -0
- package/source/css/_plugins/comments/artalk.styl +4 -0
- package/source/css/_plugins/comments/twikoo.styl +0 -1
- package/source/css/_plugins/comments/utterances.styl +1 -1
- package/source/css/_plugins/index.styl +4 -3
- package/source/css/_plugins/swiper.styl +7 -4
- package/source/js/main.js +7 -5
- package/source/js/plugins/weibo.js +116 -0
- package/scripts/tags/about.js +0 -48
- package/scripts/tags/border.js +0 -35
- package/scripts/tags/checkbox.js +0 -38
- package/scripts/tags/emoji.js +0 -40
- package/scripts/tags/folding.js +0 -30
- package/scripts/tags/frame.js +0 -66
- package/scripts/tags/friends.js +0 -53
- package/scripts/tags/lib/users.js +0 -22
- package/scripts/tags/link.js +0 -79
- package/scripts/tags/mark.js +0 -23
- package/scripts/tags/navbar.js +0 -57
- package/scripts/tags/note.js +0 -37
- package/scripts/tags/poetry.js +0 -48
- package/scripts/tags/quot.js +0 -51
- package/scripts/tags/sites.js +0 -57
- package/scripts/tags/split.js +0 -49
- package/scripts/tags/swiper.js +0 -38
- package/scripts/tags/timeline.js +0 -81
- package/scripts/tags/toc.js +0 -72
- package/source/css/_plugins/search/local-search.styl +0 -87
package/scripts/tags/timeline.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* timeline.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
-
*
|
|
4
|
-
* {% timeline %}
|
|
5
|
-
*
|
|
6
|
-
* <!-- node header1 -->
|
|
7
|
-
* what happened 1
|
|
8
|
-
*
|
|
9
|
-
* <!-- node header2 -->
|
|
10
|
-
* what happened 2
|
|
11
|
-
*
|
|
12
|
-
* {% endtimeline %}
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
'use strict';
|
|
16
|
-
|
|
17
|
-
function layoutNodeTitle(content) {
|
|
18
|
-
var el = '';
|
|
19
|
-
el += '<div class="header">';
|
|
20
|
-
if (content && content.length > 0) {
|
|
21
|
-
el += hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('');
|
|
22
|
-
}
|
|
23
|
-
el += '</div>';
|
|
24
|
-
return el;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function layoutNodeContent(content) {
|
|
28
|
-
var el = '';
|
|
29
|
-
el += '<div class="body fs14">';
|
|
30
|
-
if (content && content.length > 0) {
|
|
31
|
-
el += hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('');
|
|
32
|
-
}
|
|
33
|
-
el += '</div>';
|
|
34
|
-
return el;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function postTimeline(args, content) {
|
|
39
|
-
args = hexo.args.map(args, ['api', 'user', 'type', 'limit', 'hide']);
|
|
40
|
-
var el = '';
|
|
41
|
-
if (!args.type) {
|
|
42
|
-
args.type = 'timeline';
|
|
43
|
-
}
|
|
44
|
-
if (args.api && args.api.length > 0) {
|
|
45
|
-
el += '<div class="tag-plugin timeline stellar-' + args.type + '-api"';
|
|
46
|
-
el += ' ' + hexo.args.joinTags(args, ['api', 'user', 'limit', 'hide']).join(' ');
|
|
47
|
-
el += '>';
|
|
48
|
-
} else {
|
|
49
|
-
el += '<div class="tag-plugin timeline">';
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
var arr = content.split(/<!--\s*node (.*?)\s*-->/g).filter(item => item.trim().length > 0)
|
|
53
|
-
if (arr.length > 0) {
|
|
54
|
-
var nodes = [];
|
|
55
|
-
arr.forEach((item, i) => {
|
|
56
|
-
if (i % 2 == 0) {
|
|
57
|
-
nodes.push({
|
|
58
|
-
header: item
|
|
59
|
-
});
|
|
60
|
-
} else if (nodes.length > 0) {
|
|
61
|
-
var node = nodes[nodes.length-1];
|
|
62
|
-
if (node.body == undefined) {
|
|
63
|
-
node.body = item;
|
|
64
|
-
} else {
|
|
65
|
-
node.body += '\n' + item;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
nodes.forEach((node, i) => {
|
|
70
|
-
el += '<div class="timenode" index="' + (i) + '">';
|
|
71
|
-
el += layoutNodeTitle(node.header);
|
|
72
|
-
el += layoutNodeContent(node.body);
|
|
73
|
-
el += '</div>';
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
el += '</div>';
|
|
78
|
-
return el;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
hexo.extend.tag.register('timeline', postTimeline, {ends: true});
|
package/scripts/tags/toc.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* toc.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
-
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
-
*
|
|
5
|
-
* {% toc wiki:xxx [open:true] [display:mobile] title %}
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
function layoutDocTree(pages) {
|
|
11
|
-
var el = '';
|
|
12
|
-
el += '<ul class="toc">';
|
|
13
|
-
pages.forEach((p, i) => {
|
|
14
|
-
el += '<li>';
|
|
15
|
-
el += '<a class="list-link" href="' + p.permalink + '">';
|
|
16
|
-
el += '<span>' + (p.title || p.seo_title) + '</span>';
|
|
17
|
-
el += '</a>';
|
|
18
|
-
el += '</li>';
|
|
19
|
-
});
|
|
20
|
-
el += '</ul>';
|
|
21
|
-
return el;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
hexo.extend.tag.register('toc', function(args) {
|
|
25
|
-
args = hexo.args.map(args, ['wiki', 'open', 'display'], ['title']);
|
|
26
|
-
|
|
27
|
-
var el = '';
|
|
28
|
-
el += '<div class="tag-plugin toc"';
|
|
29
|
-
el += ' ' + hexo.args.joinTags(args, ['display']).join(' ');
|
|
30
|
-
if (args.display === 'mobile') {
|
|
31
|
-
el += ' style="display:none"';
|
|
32
|
-
}
|
|
33
|
-
el += '>';
|
|
34
|
-
|
|
35
|
-
el += '<details class="toc"';
|
|
36
|
-
if (args.open !== false) {
|
|
37
|
-
el += ' open';
|
|
38
|
-
}
|
|
39
|
-
el += '>';
|
|
40
|
-
el += '<summary>';
|
|
41
|
-
el += args.title || 'TOC';
|
|
42
|
-
el += '</summary>';
|
|
43
|
-
|
|
44
|
-
if (args.wiki) {
|
|
45
|
-
const proj = hexo.theme.config.wiki.projects[args.wiki];
|
|
46
|
-
if (proj == undefined) {
|
|
47
|
-
return '';
|
|
48
|
-
}
|
|
49
|
-
if (proj.sections && proj.sections.length > 1) {
|
|
50
|
-
el += '<div class="body fs14 multi">';
|
|
51
|
-
proj.sections.forEach((sec, i) => {
|
|
52
|
-
el += '<section>';
|
|
53
|
-
el += '<div class="header">';
|
|
54
|
-
el += sec.title;
|
|
55
|
-
el += '</div>';
|
|
56
|
-
el += layoutDocTree(sec.pages);
|
|
57
|
-
el += '</section>';
|
|
58
|
-
});
|
|
59
|
-
el += '</div>';
|
|
60
|
-
} else {
|
|
61
|
-
el += '<div class="body fs14">';
|
|
62
|
-
el += '<div class="body">';
|
|
63
|
-
el += layoutDocTree(proj.pages);
|
|
64
|
-
el += '</div>';
|
|
65
|
-
el += '</div>';
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
el += '</details>';
|
|
69
|
-
// end
|
|
70
|
-
el += '</div>';
|
|
71
|
-
return el;
|
|
72
|
-
});
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
.search-wrapper
|
|
2
|
-
width: 100%
|
|
3
|
-
>.search-form
|
|
4
|
-
position: sticky
|
|
5
|
-
top: 1rem
|
|
6
|
-
.search-input
|
|
7
|
-
width: 100%
|
|
8
|
-
padding: 0.75rem 1rem
|
|
9
|
-
line-height: 1
|
|
10
|
-
box-sizing: border-box
|
|
11
|
-
border-radius: $border-block
|
|
12
|
-
background-color: var(--card)
|
|
13
|
-
color: var(--text-p0)
|
|
14
|
-
box-shadow: $boxshadow-button
|
|
15
|
-
trans1 box-shadow
|
|
16
|
-
&:hover
|
|
17
|
-
box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.16), 0 0 8px 0px rgba(0, 0, 0, 0.08)
|
|
18
|
-
|
|
19
|
-
&.noresult
|
|
20
|
-
.search-input
|
|
21
|
-
&:hover
|
|
22
|
-
box-shadow: 0 0 2px 0px alpha($c-red, 0.2), 0 0 8px 0px alpha($c-red, 0.2)
|
|
23
|
-
&:focus
|
|
24
|
-
box-shadow: 0 0 2px 0px alpha($c-red, 0.5), 0 0 8px 0px alpha($c-red, 0.4)
|
|
25
|
-
|
|
26
|
-
.search-no-result
|
|
27
|
-
display: none
|
|
28
|
-
margin: 1em auto
|
|
29
|
-
color: var(--text-p1)
|
|
30
|
-
text-align: center
|
|
31
|
-
font-size: $fs-14
|
|
32
|
-
padding: 2rem
|
|
33
|
-
background: var(--block)
|
|
34
|
-
border-radius: $border-block
|
|
35
|
-
|
|
36
|
-
#search-result
|
|
37
|
-
ul.search-result-list
|
|
38
|
-
padding: 0
|
|
39
|
-
margin: 0
|
|
40
|
-
list-style-type: none
|
|
41
|
-
li
|
|
42
|
-
margin: 1em auto
|
|
43
|
-
&:hover
|
|
44
|
-
.search-result-title
|
|
45
|
-
color: $color-hover
|
|
46
|
-
.search-result-title
|
|
47
|
-
color: var(--text-p1)
|
|
48
|
-
font-weight: 700
|
|
49
|
-
line-height: 1.2
|
|
50
|
-
|
|
51
|
-
.search-result-content
|
|
52
|
-
overflow: hidden
|
|
53
|
-
color: var(--text-p3)
|
|
54
|
-
margin: .4em auto
|
|
55
|
-
max-height: 13em
|
|
56
|
-
text-align: justify
|
|
57
|
-
font-size: $fs-12
|
|
58
|
-
line-height: 1.2
|
|
59
|
-
display: -webkit-box
|
|
60
|
-
-webkit-box-orient: vertical
|
|
61
|
-
overflow: hidden
|
|
62
|
-
-webkit-line-clamp: 3
|
|
63
|
-
|
|
64
|
-
.search-keyword
|
|
65
|
-
border-bottom: 1px dashed $color-hover
|
|
66
|
-
color: $color-hover
|
|
67
|
-
font-weight: bold
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
.search-wrapper.noresult
|
|
72
|
-
.search-no-result
|
|
73
|
-
display: block
|
|
74
|
-
|
|
75
|
-
.widget-wrapper
|
|
76
|
-
.search-form
|
|
77
|
-
top: 0
|
|
78
|
-
background: var(--site-bg)
|
|
79
|
-
.search-input
|
|
80
|
-
margin-top: 1rem
|
|
81
|
-
margin-bottom: -1rem
|
|
82
|
-
#search-result,.search-no-result
|
|
83
|
-
margin-top: 2rem
|
|
84
|
-
|
|
85
|
-
.widget-wrapper:not(:first-child)
|
|
86
|
-
.search-wrapper
|
|
87
|
-
margin-top: -1rem
|