hexo-theme-stellar 1.16.2 → 1.17.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 +10 -5
- package/_data/widgets.yml +4 -1
- package/languages/en.yml +5 -0
- package/languages/zh-CN.yml +5 -0
- package/languages/zh-TW.yml +5 -0
- package/layout/404.ejs +1 -1
- package/layout/_partial/cover/wiki_cover.ejs +1 -1
- package/layout/_partial/main/post_list/paginator.ejs +5 -9
- package/layout/_partial/main/post_list/post_card.ejs +1 -1
- package/layout/_partial/main/post_list/wiki_card.ejs +1 -1
- package/layout/_partial/plugins/comments/layout.ejs +1 -1
- package/layout/_partial/scripts/index.ejs +9 -0
- package/layout/_partial/sidebar/index.ejs +3 -3
- package/layout/_partial/{sidebar/widgets → widgets}/ghissues.ejs +2 -2
- package/layout/_partial/{sidebar/widgets → widgets}/ghrepo.ejs +2 -2
- package/layout/_partial/{sidebar/widgets → widgets}/ghuser.ejs +3 -3
- package/layout/_partial/{sidebar/widgets → widgets}/markdown.ejs +2 -2
- package/layout/_partial/{sidebar/widgets → widgets}/recent.ejs +5 -6
- package/layout/_partial/{sidebar/widgets → widgets}/related.ejs +2 -2
- package/layout/_partial/widgets/search.ejs +31 -0
- package/layout/_partial/{sidebar/widgets → widgets}/tagcloud.ejs +2 -2
- package/layout/_partial/{sidebar/widgets → widgets}/timeline.ejs +2 -2
- package/layout/_partial/{sidebar/widgets → widgets}/toc.ejs +2 -2
- package/layout/page.ejs +1 -1
- package/layout/post.ejs +1 -1
- package/layout/wiki.ejs +1 -1
- package/package.json +1 -1
- package/source/css/_common/base.styl +1 -1
- package/source/css/_common/highlight.styl +5 -5
- package/source/css/_common/span.styl +1 -0
- package/source/css/_layout/index.styl +1 -0
- package/source/css/_layout/list.styl +1 -1
- package/source/css/_layout/md.styl +12 -13
- package/source/css/_layout/pages/error.styl +2 -2
- package/source/css/_layout/partial/article-footer.styl +4 -4
- package/source/css/_layout/partial/paginator.styl +16 -5
- package/source/css/_layout/partial/related.styl +6 -14
- package/source/css/_layout/sidebar/footer.styl +1 -3
- package/source/css/_layout/sidebar/header.styl +112 -0
- package/source/css/_layout/sidebar/sidebar.styl +3 -115
- package/source/css/_layout/tag-plugins/checkbox.styl +1 -1
- package/source/css/_layout/tag-plugins/copy.styl +1 -1
- package/source/css/_layout/tag-plugins/emoji.styl +1 -1
- package/source/css/_layout/tag-plugins/frame.styl +5 -5
- package/source/css/_layout/tag-plugins/inline-labels.styl +1 -1
- package/source/css/_layout/tag-plugins/link.styl +6 -6
- package/source/css/_layout/tag-plugins/mark.styl +3 -4
- package/source/css/_layout/tag-plugins/navbar.styl +1 -1
- package/source/css/_layout/tag-plugins/note.styl +7 -7
- package/source/css/_layout/tag-plugins/poetry.styl +2 -2
- package/source/css/_layout/tag-plugins/quot.styl +7 -7
- package/source/css/_layout/tag-plugins/tabs.styl +1 -1
- package/source/css/_layout/tag-plugins/timeline.styl +3 -3
- package/source/css/_layout/widgets/ghrepo.styl +34 -0
- package/source/css/_layout/widgets/ghuser.styl +95 -0
- package/source/css/_layout/widgets/recent.styl +15 -0
- package/source/css/_layout/widgets/related.styl +8 -0
- package/source/css/_layout/widgets/search.styl +3 -0
- package/source/css/_layout/widgets/tagcloud.styl +8 -0
- package/source/css/_layout/widgets/timeline.styl +17 -0
- package/source/css/_layout/{sidebar → widgets}/toc_blog.styl +1 -1
- package/source/css/_layout/{sidebar → widgets}/toc_common.styl +7 -4
- package/source/css/_layout/{sidebar → widgets}/toc_wiki.styl +3 -7
- package/source/css/_layout/widgets/widgets.styl +60 -0
- package/source/css/_plugins/index.styl +4 -0
- package/source/css/_plugins/search/local-search.styl +89 -0
- package/source/js/main.js +41 -5
- package/source/js/search/local-search.js +161 -0
- package/source/css/_layout/sidebar/ghrepo.styl +0 -36
- package/source/css/_layout/sidebar/ghuser.styl +0 -98
- package/source/css/_layout/sidebar/widgets.styl +0 -106
package/_config.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
######## Stellar info ########
|
|
2
2
|
stellar:
|
|
3
|
-
version: '1.
|
|
3
|
+
version: '1.17.0'
|
|
4
4
|
homepage: 'https://xaoxuu.com/wiki/stellar/'
|
|
5
5
|
repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
|
|
6
6
|
cdn_css: # Use cdn links instead of /css/main.css
|
|
@@ -25,10 +25,10 @@ sidebar:
|
|
|
25
25
|
# about: '[关于](/about/)'
|
|
26
26
|
# Sidebar widgets
|
|
27
27
|
widgets:
|
|
28
|
-
index: welcome, recent, timeline # for home/wiki/categories/tags/archives/404 pages
|
|
28
|
+
index: welcome, recent, search, timeline # for home/wiki/categories/tags/archives/404 pages
|
|
29
29
|
page: welcome, toc # for pages using 'layout:page'
|
|
30
|
-
post: toc, ghrepo, ghissues # for pages using 'layout:post'
|
|
31
|
-
wiki: ghrepo, toc, ghissues, related # for pages using 'layout:wiki'
|
|
30
|
+
post: toc, ghrepo, search, ghissues # for pages using 'layout:post'
|
|
31
|
+
wiki: search, ghrepo, toc, ghissues, related # for pages using 'layout:wiki'
|
|
32
32
|
|
|
33
33
|
######## Index ########
|
|
34
34
|
post-index: # 近期发布 分类 标签 归档 and ...
|
|
@@ -51,7 +51,7 @@ article:
|
|
|
51
51
|
category_color:
|
|
52
52
|
'探索号': '#f44336'
|
|
53
53
|
# 文章许可协议
|
|
54
|
-
license: '本文采用[署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/)许可协议,转载请注明出处。'
|
|
54
|
+
license: '本文采用 [署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议,转载请注明出处。'
|
|
55
55
|
# 分享
|
|
56
56
|
share: # [wechat, weibo, email, link]
|
|
57
57
|
# 相关文章,需要安装插件 (for layout: post)
|
|
@@ -61,6 +61,11 @@ article:
|
|
|
61
61
|
max_count: 5
|
|
62
62
|
|
|
63
63
|
|
|
64
|
+
search:
|
|
65
|
+
service: local_search # hexo, todo...
|
|
66
|
+
local_search: # npm i hexo-generator-search
|
|
67
|
+
|
|
68
|
+
|
|
64
69
|
######## Comments ########
|
|
65
70
|
comments:
|
|
66
71
|
service: # beaudar, utterances, twikoo, waline
|
package/_data/widgets.yml
CHANGED
package/languages/en.yml
CHANGED
package/languages/zh-CN.yml
CHANGED
package/languages/zh-TW.yml
CHANGED
package/layout/404.ejs
CHANGED
|
@@ -5,7 +5,7 @@ page.comment_title = '';
|
|
|
5
5
|
page.header = 'auto';
|
|
6
6
|
page.robots = 'none';
|
|
7
7
|
%>
|
|
8
|
-
<article class='md error-page'>
|
|
8
|
+
<article class='md-text error-page'>
|
|
9
9
|
<h1><img id='error' src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg' alt='404'></h1>
|
|
10
10
|
<p class='what'>
|
|
11
11
|
<strong>
|
|
@@ -19,7 +19,7 @@ function layoutWikiCover() {
|
|
|
19
19
|
cover = ['logo', 'title', 'description'];
|
|
20
20
|
}
|
|
21
21
|
el += '<div class="l_cover wiki' + scrollreveal() + '">';
|
|
22
|
-
el += '<article class="cover-wrap md">';
|
|
22
|
+
el += '<article class="cover-wrap md-text">';
|
|
23
23
|
|
|
24
24
|
if (logo && logo.src && cover.includes('logo')) {
|
|
25
25
|
el += '<div class="preview">';
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
<% if (is_home() && page.total > 1) { %>
|
|
2
2
|
<div class='paginator-wrap dis-select'>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</div>
|
|
9
|
-
<a class='paginator next<%- page.next != 0 ? "" : " disable" %>' href='<%- url_for(page.next_link) %>'>
|
|
10
|
-
<img src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/064b95430caf4.svg'/>
|
|
11
|
-
</a>
|
|
3
|
+
<%- paginator({
|
|
4
|
+
prev_text: '',
|
|
5
|
+
next_text: '',
|
|
6
|
+
force_prev_next:true
|
|
7
|
+
}) %>
|
|
12
8
|
</div>
|
|
13
9
|
<% } %>
|
|
@@ -31,7 +31,7 @@ if (cmt.service && page[cmt.service]) {
|
|
|
31
31
|
page.cmt = cmt;
|
|
32
32
|
%>
|
|
33
33
|
<% if (loadComment) { %>
|
|
34
|
-
<div class='related-wrap md reveal' id="comments">
|
|
34
|
+
<div class='related-wrap md-text reveal' id="comments">
|
|
35
35
|
<div class='cmt-title cap theme'>
|
|
36
36
|
<%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
|
|
37
37
|
</div>
|
|
@@ -107,6 +107,15 @@
|
|
|
107
107
|
jQuery: '<%- url_for(theme.plugins.jquery || "https://fastly.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js") %>'
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
+
if ('<%- theme.search.service %>') {
|
|
111
|
+
stellar.search = {};
|
|
112
|
+
stellar.search.service = '<%- theme.search.service %>';
|
|
113
|
+
if (stellar.search.service == 'local_search') {
|
|
114
|
+
let service_obj = Object.assign({}, <%- JSON.stringify(config.search) %>);
|
|
115
|
+
stellar.search[stellar.search.service] = service_obj;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
110
119
|
// stellar js
|
|
111
120
|
stellar.plugins.stellar = Object.assign(<%- JSON.stringify(theme.plugins.stellar) %>);
|
|
112
121
|
|
|
@@ -47,7 +47,7 @@ function layoutWidgets() {
|
|
|
47
47
|
var el = '';
|
|
48
48
|
el += '<div class="widgets">';
|
|
49
49
|
if (page.layout == 'wiki' && proj && page.menu_id == 'wiki') {
|
|
50
|
-
el += '<
|
|
50
|
+
el += '<widget class="widget-wrapper logo-wrap wiki"><div class="widget-body">';
|
|
51
51
|
// all products
|
|
52
52
|
el += '<a style="filter: grayscale(100%)" class="wiki-home cap" href="' + url_for(config.wiki_dir) + '">';
|
|
53
53
|
el += '<svg aria-hidden="true" viewBox="0 0 16 16" width="1rem" height="1rem" 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>';
|
|
@@ -69,7 +69,7 @@ function layoutWidgets() {
|
|
|
69
69
|
let sub = proj.subtitle;
|
|
70
70
|
el += layoutTitle(main, url, sub);
|
|
71
71
|
}
|
|
72
|
-
el += '</div></
|
|
72
|
+
el += '</div></widget>';
|
|
73
73
|
}
|
|
74
74
|
if (page.sidebar) {
|
|
75
75
|
page.sidebar.forEach((w, i) => {
|
|
@@ -87,7 +87,7 @@ function layoutWidgets() {
|
|
|
87
87
|
Object.assign(widget, w)
|
|
88
88
|
}
|
|
89
89
|
if (widget && widget.layout) {
|
|
90
|
-
el += partial('widgets/' + widget.layout, {item: widget})
|
|
90
|
+
el += partial('../widgets/' + widget.layout, {item: widget})
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -21,7 +21,7 @@ function layoutDiv() {
|
|
|
21
21
|
if (item.labels) {
|
|
22
22
|
item.api += '&labels=' + item.labels;
|
|
23
23
|
}
|
|
24
|
-
el += '<
|
|
24
|
+
el += '<widget class="widget-wrapper timeline">';
|
|
25
25
|
if (item.title) {
|
|
26
26
|
el += '<div class="widget-header cap theme dis-select">';
|
|
27
27
|
el += '<span class="name">' + item.title + '</span>';
|
|
@@ -37,7 +37,7 @@ function layoutDiv() {
|
|
|
37
37
|
el += '>';
|
|
38
38
|
el += '</div>';
|
|
39
39
|
el += '</div>';
|
|
40
|
-
el += '</
|
|
40
|
+
el += '</widget>';
|
|
41
41
|
return el;
|
|
42
42
|
}
|
|
43
43
|
%>
|
|
@@ -18,7 +18,7 @@ function layoutDiv() {
|
|
|
18
18
|
return el;
|
|
19
19
|
}
|
|
20
20
|
// 布局
|
|
21
|
-
el += '<
|
|
21
|
+
el += '<widget class="widget-wrapper ghrepo">';
|
|
22
22
|
// body
|
|
23
23
|
el += '<div class="widget-body">';
|
|
24
24
|
el += '<div class="items stellar-ghinfo-api" api="' + theme.api_host.ghapi + '/repos/' + repo + '">';
|
|
@@ -45,7 +45,7 @@ function layoutDiv() {
|
|
|
45
45
|
el += '</a>';
|
|
46
46
|
el += '</div>';
|
|
47
47
|
el += '</div>';
|
|
48
|
-
el += '</
|
|
48
|
+
el += '</widget>';
|
|
49
49
|
return el;
|
|
50
50
|
}
|
|
51
51
|
%>
|
|
@@ -22,7 +22,7 @@ function layoutDiv() {
|
|
|
22
22
|
return el;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
el += '<
|
|
25
|
+
el += '<widget class="widget-wrapper ghuser">';
|
|
26
26
|
// body
|
|
27
27
|
el += '<div class="widget-body stellar-ghinfo-api" api="' + theme.api_host.ghapi + '/users/' + item.username + '">';
|
|
28
28
|
if (item.avatar) {
|
|
@@ -47,10 +47,10 @@ function layoutDiv() {
|
|
|
47
47
|
el += '</a>';
|
|
48
48
|
// menu
|
|
49
49
|
if (item.menu) {
|
|
50
|
-
el += partial('../menu', {where: 'sidebar'});
|
|
50
|
+
el += partial('../sidebar/menu', {where: 'sidebar'});
|
|
51
51
|
}
|
|
52
52
|
el += '</div>';
|
|
53
|
-
el += '</
|
|
53
|
+
el += '</widget>';
|
|
54
54
|
return el;
|
|
55
55
|
}
|
|
56
56
|
%>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
function layoutDiv() {
|
|
3
3
|
if (!item.content?.length) return ''
|
|
4
4
|
var el = '';
|
|
5
|
-
el += '<
|
|
5
|
+
el += '<widget class="widget-wrapper markdown">';
|
|
6
6
|
if (item.title?.length > 0) {
|
|
7
7
|
el += '<div class="widget-header cap theme dis-select">';
|
|
8
8
|
el += '<span class="name">' + item.title + '</span>';
|
|
@@ -11,7 +11,7 @@ function layoutDiv() {
|
|
|
11
11
|
el += '<div class="widget-body fs14">';
|
|
12
12
|
el += markdown(item.content);
|
|
13
13
|
el += '</div>';
|
|
14
|
-
el += '</
|
|
14
|
+
el += '</widget>';
|
|
15
15
|
return el;
|
|
16
16
|
}
|
|
17
17
|
%>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%
|
|
2
2
|
function layoutDiv() {
|
|
3
|
-
var el = '<
|
|
3
|
+
var el = '<widget class="widget-wrapper recent">';
|
|
4
4
|
// header
|
|
5
5
|
el += '<div class="widget-header cap theme dis-select">';
|
|
6
6
|
el += '<span class="name">' + __("meta.recent_update") + '</span>';
|
|
@@ -33,10 +33,9 @@ function layoutDiv() {
|
|
|
33
33
|
el += '<span class="title">'
|
|
34
34
|
if (post.layout == 'wiki') {
|
|
35
35
|
let proj = theme.wiki.projects[post.wiki];
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
el += post.wiki + ' / ';
|
|
36
|
+
let name = proj?.name || post?.wiki;
|
|
37
|
+
if (name) {
|
|
38
|
+
el += '<strong>' + name + '</strong>' + '<span class="dot"></span>';
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
el += (post.title || post.seo_title || post.wiki) + '</span>';
|
|
@@ -44,7 +43,7 @@ function layoutDiv() {
|
|
|
44
43
|
el += '';
|
|
45
44
|
});
|
|
46
45
|
el += '</div>';
|
|
47
|
-
el += '</
|
|
46
|
+
el += '</widget>';
|
|
48
47
|
return el;
|
|
49
48
|
}
|
|
50
49
|
%>
|
|
@@ -15,7 +15,7 @@ function layoutDiv() {
|
|
|
15
15
|
}
|
|
16
16
|
var el = '';
|
|
17
17
|
if (related.length > 0) {
|
|
18
|
-
el += '<
|
|
18
|
+
el += '<widget class="widget-wrapper related">';
|
|
19
19
|
el += '<div class="widget-header cap theme dis-select">';
|
|
20
20
|
var title = __('btn.wiki');
|
|
21
21
|
if (proj.tags && proj.tags[0]) {
|
|
@@ -34,7 +34,7 @@ function layoutDiv() {
|
|
|
34
34
|
el += '</a>';
|
|
35
35
|
});
|
|
36
36
|
el += '</div>';
|
|
37
|
-
el += '</
|
|
37
|
+
el += '</widget>';
|
|
38
38
|
}
|
|
39
39
|
return el;
|
|
40
40
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<%
|
|
2
|
+
function layoutDiv() {
|
|
3
|
+
var el = '<widget class="widget-wrapper search">'
|
|
4
|
+
el += '<div class="widget-body">'
|
|
5
|
+
el += '<div class="search-wrapper" id="search">'
|
|
6
|
+
el += '<form class="search-form">'
|
|
7
|
+
var filter = ''
|
|
8
|
+
if (item.filter == 'auto' && page.layout == 'wiki') {
|
|
9
|
+
let matches = page.path.match(/(.*?)\/(.*?)\//i)
|
|
10
|
+
if (matches?.length > 0) {
|
|
11
|
+
filter = matches[0]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
el += '<input type="text" class="search-input" id="search-input"'
|
|
15
|
+
if (filter.length > 0) {
|
|
16
|
+
filter = '/' + filter
|
|
17
|
+
el += ' data-filter="' + filter + '"'
|
|
18
|
+
el += ' placeholder="' + (item.placeholder || __('search.search_in', filter)) + '">'
|
|
19
|
+
} else {
|
|
20
|
+
el += ' placeholder="' + (item.placeholder || __('search.search')) + '">'
|
|
21
|
+
}
|
|
22
|
+
el += '</form>'
|
|
23
|
+
el += '<div id="search-result"></div>'
|
|
24
|
+
el += '<div class="search-no-result">' + __('search.no_results') + '</div>'
|
|
25
|
+
el += '</div>'
|
|
26
|
+
el += '</div>'
|
|
27
|
+
el += '</widget>'
|
|
28
|
+
return el
|
|
29
|
+
}
|
|
30
|
+
%>
|
|
31
|
+
<%- layoutDiv() %>
|
|
@@ -8,7 +8,7 @@ function layoutDiv() {
|
|
|
8
8
|
delete opts['title'];
|
|
9
9
|
delete opts['layout'];
|
|
10
10
|
opts.class = 'tag ';
|
|
11
|
-
el += '<
|
|
11
|
+
el += '<widget class="widget-wrapper tagcloud">';
|
|
12
12
|
if (item.title) {
|
|
13
13
|
el += '<div class="widget-header cap theme dis-select">';
|
|
14
14
|
el += '<span class="name">' + item.title + '</span>';
|
|
@@ -17,7 +17,7 @@ function layoutDiv() {
|
|
|
17
17
|
el += '<div class="widget-body fs14">';
|
|
18
18
|
el += tagcloud(site.tags, opts);
|
|
19
19
|
el += '</div>';
|
|
20
|
-
el += '</
|
|
20
|
+
el += '</widget>';
|
|
21
21
|
return el;
|
|
22
22
|
}
|
|
23
23
|
%>
|
|
@@ -4,7 +4,7 @@ function layoutDiv() {
|
|
|
4
4
|
if (item.api == undefined) {
|
|
5
5
|
return el;
|
|
6
6
|
}
|
|
7
|
-
el += '<
|
|
7
|
+
el += '<widget class="widget-wrapper timeline">';
|
|
8
8
|
if (item.title) {
|
|
9
9
|
el += '<div class="widget-header cap theme dis-select">';
|
|
10
10
|
el += '<span class="name">' + item.title + '</span>';
|
|
@@ -20,7 +20,7 @@ function layoutDiv() {
|
|
|
20
20
|
el += '>';
|
|
21
21
|
el += '</div>';
|
|
22
22
|
el += '</div>';
|
|
23
|
-
el += '</
|
|
23
|
+
el += '</widget>';
|
|
24
24
|
return el;
|
|
25
25
|
}
|
|
26
26
|
%>
|
|
@@ -63,7 +63,7 @@ function layoutDiv(fallback) {
|
|
|
63
63
|
|
|
64
64
|
var el = '';
|
|
65
65
|
if (type.length > 0) {
|
|
66
|
-
el += '<
|
|
66
|
+
el += '<widget class="widget-wrapper toc ' + type + '" id="toc">';
|
|
67
67
|
if (page.layout !== 'wiki') {
|
|
68
68
|
// post 布局
|
|
69
69
|
el += layoutTocHeader(page.toc_title);
|
|
@@ -90,7 +90,7 @@ function layoutDiv(fallback) {
|
|
|
90
90
|
el += '</div>';
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
el += '</
|
|
93
|
+
el += '</widget>';
|
|
94
94
|
} else if (item.fallback) {
|
|
95
95
|
el += partial(item.fallback, {item: theme.data.widgets[item.fallback]});
|
|
96
96
|
}
|
package/layout/page.ejs
CHANGED
|
@@ -15,7 +15,7 @@ function layoutDiv() {
|
|
|
15
15
|
if (page.h1 || page.title || (page.content && page.content.length > 0)) {
|
|
16
16
|
el += partial('_partial/main/navbar/breadcrumb');
|
|
17
17
|
}
|
|
18
|
-
el += '<article class="content
|
|
18
|
+
el += '<article class="md-text content ' + page.layout + (page.indent ? ' indent' : '') + scrollreveal() + '">';
|
|
19
19
|
el += layoutTitle();
|
|
20
20
|
if (page.content && page.content.length > 0) {
|
|
21
21
|
el += page.content;
|
package/layout/post.ejs
CHANGED
|
@@ -23,7 +23,7 @@ if (theme.plugins.heti && theme.plugins.heti.enable) {
|
|
|
23
23
|
<%- partial('mathjax') %>
|
|
24
24
|
<% } %>
|
|
25
25
|
<%- partial('_partial/main/navbar/breadcrumb') %>
|
|
26
|
-
<article class='content<%- heti %>
|
|
26
|
+
<article class='md-text content<%- heti %> <%- post.layout %><%- post.indent ? ' indent' : '' %><%- scrollreveal() %>'>
|
|
27
27
|
<%- layoutTitle() %>
|
|
28
28
|
<%- post.content %>
|
|
29
29
|
<%- partial('_partial/main/article/article_footer') %>
|
package/layout/wiki.ejs
CHANGED
|
@@ -30,7 +30,7 @@ function layoutTitle() {
|
|
|
30
30
|
}
|
|
31
31
|
%>
|
|
32
32
|
<%- partial('_partial/main/navbar/breadcrumb') %>
|
|
33
|
-
<article class='content
|
|
33
|
+
<article class='md-text content <%- page.layout %><%- scrollreveal() %>'>
|
|
34
34
|
<%- layoutTitle() %>
|
|
35
35
|
<%- page.content %>
|
|
36
36
|
<%- partial('_partial/main/article/article_footer') %>
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ p>code:not([class]),li>code:not([class])
|
|
|
10
10
|
border-radius: 4px
|
|
11
11
|
color: var(--text-code)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
.md-text .highlight, pre:not([class]):has(>code)
|
|
14
14
|
margin: var(--gap-p) 0
|
|
15
15
|
border-radius: $border-block
|
|
16
16
|
overflow: hidden
|
|
@@ -22,7 +22,7 @@ article.md .highlight, pre:not([class]):has(>code)
|
|
|
22
22
|
@media screen and (min-width: $device-mobile)
|
|
23
23
|
min-width: 180px
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
.md-text .highlight
|
|
26
26
|
position: relative
|
|
27
27
|
overflow: auto
|
|
28
28
|
display: block
|
|
@@ -75,7 +75,7 @@ article.md .highlight
|
|
|
75
75
|
.gutter+.code pre
|
|
76
76
|
padding-left: 0.25em
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
.md-text .gist
|
|
79
79
|
.gist-file
|
|
80
80
|
border: 1px solid var(--block-border)
|
|
81
81
|
border-radius: $border-block
|
|
@@ -96,7 +96,7 @@ table:not([class])
|
|
|
96
96
|
border-collapse: collapse
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
.md-text pre
|
|
100
100
|
>.caption
|
|
101
101
|
color: var(--text-p3)
|
|
102
102
|
>.hljs
|
|
@@ -106,7 +106,7 @@ article.md pre
|
|
|
106
106
|
line-height: 1.5
|
|
107
107
|
box-sizing: border-box
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
.md-text .highlight
|
|
110
110
|
.code
|
|
111
111
|
vertical-align: top
|
|
112
112
|
&:before
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.md-text
|
|
2
2
|
max-width: 100%
|
|
3
3
|
padding: 0 1rem
|
|
4
4
|
margin-top: 1rem
|
|
@@ -8,7 +8,7 @@ article.md
|
|
|
8
8
|
line-height: 1.7
|
|
9
9
|
word-break: break-word
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
.md-text.excerpt
|
|
12
12
|
p
|
|
13
13
|
font-size: $fs-14
|
|
14
14
|
margin: 1em 0
|
|
@@ -19,7 +19,7 @@ h1.article-title
|
|
|
19
19
|
line-height: 1.2
|
|
20
20
|
color: var(--text-p0)
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
.md-text.content
|
|
23
23
|
position: relative
|
|
24
24
|
margin-bottom: 2rem
|
|
25
25
|
display: flex
|
|
@@ -53,7 +53,7 @@ article.md.content
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
.md-text
|
|
57
57
|
ul:not(:last-child),
|
|
58
58
|
ol:not(:last-child)
|
|
59
59
|
padding-bottom: .5rem
|
|
@@ -65,7 +65,7 @@ article.md
|
|
|
65
65
|
p,blockquote,.tag-plugin,ul,ol,.highlight,table
|
|
66
66
|
*
|
|
67
67
|
--gap-p: .5rem
|
|
68
|
-
p
|
|
68
|
+
p,ul,ol
|
|
69
69
|
margin-top: 'calc(%s - 4px)' % var(--gap-p)
|
|
70
70
|
margin-bottom: 'calc(%s - 4px)' % var(--gap-p)
|
|
71
71
|
.tag-plugin,iframe
|
|
@@ -75,7 +75,7 @@ article.md
|
|
|
75
75
|
display: block
|
|
76
76
|
|
|
77
77
|
// titles
|
|
78
|
-
|
|
78
|
+
.md-text.content
|
|
79
79
|
a.headerlink:before
|
|
80
80
|
opacity: 0
|
|
81
81
|
content: '#'
|
|
@@ -101,35 +101,34 @@ article.md.content
|
|
|
101
101
|
h5+h6
|
|
102
102
|
margin-top: -0.5rem
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
.md-text p
|
|
105
105
|
font-size: $fs-p
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
.md-text pre
|
|
108
108
|
-webkit-font-smoothing: auto
|
|
109
109
|
-moz-osx-font-smoothing: auto
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
.md-text
|
|
112
112
|
.center
|
|
113
113
|
align-self: center
|
|
114
114
|
|
|
115
115
|
// div
|
|
116
|
-
|
|
116
|
+
.md-text>div
|
|
117
117
|
margin: var(--gap-p) 0
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
.md-text img
|
|
121
121
|
border-radius: $border-image
|
|
122
122
|
margin: auto
|
|
123
123
|
display: block
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
.md-text
|
|
126
126
|
p:not([class]), li:not([class])
|
|
127
127
|
a:not([class])
|
|
128
128
|
position: relative
|
|
129
129
|
padding: 2px 0
|
|
130
130
|
text-decoration: none
|
|
131
131
|
line-height: 1.2
|
|
132
|
-
word-break: keep-all
|
|
133
132
|
&:after
|
|
134
133
|
content: ''
|
|
135
134
|
position: absolute
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.md-text.error-page
|
|
2
2
|
text-align: center
|
|
3
3
|
margin-top: 2rem
|
|
4
4
|
img#error
|
|
@@ -21,5 +21,5 @@ article.md.error-page
|
|
|
21
21
|
border: 2px solid black
|
|
22
22
|
|
|
23
23
|
@media screen and (max-width: $device-tablet)
|
|
24
|
-
|
|
24
|
+
.md-text.error-page
|
|
25
25
|
margin-top: 4rem
|