hexo-theme-stellar 1.15.0 → 1.16.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 +8 -8
- package/layout/_partial/head.ejs +7 -4
- package/layout/_partial/main/navbar/list_wiki.ejs +1 -3
- package/layout/_partial/plugins/comments/beaudar/layout.ejs +10 -29
- package/layout/_partial/plugins/comments/giscus/layout.ejs +10 -27
- package/layout/_partial/plugins/comments/layout.ejs +17 -2
- package/layout/_partial/plugins/comments/script.ejs +2 -2
- package/layout/_partial/plugins/comments/utterances/layout.ejs +10 -29
- package/layout/_partial/sidebar/header.ejs +43 -8
- package/layout/_partial/sidebar/index.ejs +50 -0
- package/layout/_partial/sidebar/widgets/recent.ejs +8 -7
- package/layout/_partial/sidebar/widgets/toc.ejs +5 -1
- package/layout/archive.ejs +1 -1
- package/layout/categories.ejs +1 -1
- package/layout/index.ejs +1 -3
- package/layout/tags.ejs +1 -1
- package/layout/wiki.ejs +2 -2
- package/package.json +1 -1
- package/scripts/events/lib/doc_tree.js +91 -90
- package/scripts/helpers/related_posts.js +1 -3
- package/scripts/helpers/utils.js +20 -0
- package/scripts/tags/folders.js +4 -6
- package/scripts/tags/lib/tabs.js +5 -9
- package/scripts/tags/split.js +6 -8
- package/scripts/tags/timeline.js +3 -5
- package/source/css/_common/blockquote.styl +10 -0
- package/source/css/_common/device.styl +11 -10
- package/source/css/_layout/list.styl +2 -1
- package/source/css/_layout/main.styl +4 -2
- package/source/css/_layout/md.styl +6 -13
- package/source/css/_layout/partial/bread-nav.styl +1 -1
- package/source/css/_layout/partial/navbar.styl +8 -1
- package/source/css/_layout/partial/related.styl +1 -2
- package/source/css/_layout/sidebar/sidebar.styl +4 -4
- package/source/css/_layout/sidebar/toc_wiki.styl +1 -1
- package/source/css/_layout/sidebar/widgets.styl +6 -3
- package/source/css/_layout/tag-plugins/common.styl +7 -7
- package/source/css/_layout/tag-plugins/link.styl +7 -7
- package/source/css/_layout/tag-plugins/split.styl +7 -1
- package/source/css/_layout/tag-plugins/timeline.styl +2 -4
- package/layout/_partial/sidebar/logo.ejs +0 -69
|
@@ -1,162 +1,163 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* doc_tree.js
|
|
2
|
+
* doc_tree.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
class WikiPage {
|
|
8
|
+
constructor(page) {
|
|
9
|
+
this.id = page._id
|
|
10
|
+
this.title = page.title
|
|
11
|
+
this.path = page.path
|
|
12
|
+
this.layout = page.layout
|
|
13
|
+
this.seo_title = page.seo_title
|
|
14
|
+
this.wiki = page.wiki
|
|
15
|
+
this.order = page.order || 0
|
|
16
|
+
this.updated = page.updated
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (hexo.theme.config.wiki.projects == undefined) {
|
|
21
|
-
hexo.theme.config.wiki.projects = {};
|
|
22
|
-
}
|
|
23
|
-
if (data.projects) {
|
|
24
|
-
for (let id of Object.keys(data.projects)) {
|
|
25
|
-
hexo.theme.config.wiki.projects[id] = data.projects[id];
|
|
26
|
-
}
|
|
20
|
+
function createWikiObject(ctx) {
|
|
21
|
+
const wiki = { projects:{} }
|
|
22
|
+
const { projects } = ctx.locals.get('data')
|
|
23
|
+
if (projects) {
|
|
24
|
+
Object.assign(wiki.projects, projects)
|
|
27
25
|
}
|
|
26
|
+
return wiki
|
|
27
|
+
}
|
|
28
28
|
|
|
29
|
+
module.exports = ctx => {
|
|
29
30
|
// wiki 配置
|
|
30
|
-
var wiki =
|
|
31
|
+
var wiki = createWikiObject(ctx)
|
|
32
|
+
const pages = ctx.locals.get('pages')
|
|
31
33
|
// wiki 所有页面
|
|
32
|
-
const wiki_pages =
|
|
33
|
-
return (p.layout === 'wiki') && (p.wiki != undefined) && (p.wiki.length > 0);
|
|
34
|
-
});
|
|
34
|
+
const wiki_pages = pages.filter(p => (p.layout === 'wiki') && (p.wiki != undefined) && (p.wiki.length > 0)).map(p => new WikiPage(p))
|
|
35
35
|
|
|
36
36
|
// 数据整合:项目标签
|
|
37
|
-
var
|
|
37
|
+
var all_tag_name = []
|
|
38
38
|
for (let id of Object.keys(wiki.projects)) {
|
|
39
|
-
let proj = wiki.projects[id]
|
|
40
|
-
let tags = proj.tags
|
|
39
|
+
let proj = wiki.projects[id]
|
|
40
|
+
let tags = proj.tags
|
|
41
41
|
if (tags) {
|
|
42
42
|
if ((typeof tags == 'string') && tags.constructor == String) {
|
|
43
|
-
if (
|
|
44
|
-
|
|
43
|
+
if (all_tag_name.includes(tags) === false) {
|
|
44
|
+
all_tag_name.push(tags)
|
|
45
45
|
}
|
|
46
46
|
// 类型转换
|
|
47
|
-
tags = [tags]
|
|
47
|
+
tags = [tags]
|
|
48
48
|
} else if ((typeof tags == 'object') && tags.constructor == Array) {
|
|
49
49
|
tags.forEach((tag, i) => {
|
|
50
|
-
if (
|
|
51
|
-
|
|
50
|
+
if (all_tag_name.includes(tag) === false) {
|
|
51
|
+
all_tag_name.push(tag)
|
|
52
52
|
}
|
|
53
|
-
})
|
|
53
|
+
})
|
|
54
54
|
}
|
|
55
|
-
wiki.projects[id].tags = tags
|
|
55
|
+
wiki.projects[id].tags = tags
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
// 补充未分组的项目
|
|
59
|
-
const projs = Object.keys(wiki.projects)
|
|
59
|
+
const projs = Object.keys(wiki.projects)
|
|
60
60
|
wiki_pages.forEach((p, i) => {
|
|
61
61
|
if (projs.includes(p.wiki) == false) {
|
|
62
62
|
if (wiki.projects[p.wiki] == undefined) {
|
|
63
|
-
wiki.projects[p.wiki] = {}
|
|
64
|
-
wiki.projects[p.wiki].pages = []
|
|
63
|
+
wiki.projects[p.wiki] = {}
|
|
64
|
+
wiki.projects[p.wiki].pages = []
|
|
65
65
|
}
|
|
66
|
-
var proj = wiki.projects[p.wiki]
|
|
66
|
+
var proj = wiki.projects[p.wiki]
|
|
67
67
|
if (proj.description == undefined) {
|
|
68
|
-
proj.description = p.description
|
|
68
|
+
proj.description = p.description
|
|
69
69
|
}
|
|
70
|
-
wiki.projects[p.wiki].pages.push(p)
|
|
70
|
+
wiki.projects[p.wiki].pages.push(p)
|
|
71
71
|
}
|
|
72
|
-
})
|
|
72
|
+
})
|
|
73
73
|
// 补充项目名称和首页
|
|
74
74
|
for (let id of Object.keys(wiki.projects)) {
|
|
75
|
-
let proj = wiki.projects[id]
|
|
76
|
-
proj.id = id
|
|
75
|
+
let proj = wiki.projects[id]
|
|
76
|
+
proj.id = id
|
|
77
77
|
if (proj.title == undefined || proj.title.length === 0) {
|
|
78
|
-
proj.title = id
|
|
78
|
+
proj.title = id
|
|
79
79
|
}
|
|
80
80
|
if (proj.name == undefined || proj.name.length == 0) {
|
|
81
|
-
proj.name = id
|
|
81
|
+
proj.name = id
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
// 补充 order
|
|
85
85
|
wiki_pages.forEach((p, i) => {
|
|
86
86
|
if (p.order == undefined) {
|
|
87
|
-
p.order = 0
|
|
87
|
+
p.order = 0
|
|
88
88
|
}
|
|
89
|
-
})
|
|
89
|
+
})
|
|
90
90
|
|
|
91
91
|
// 数据整合:每个项目的子页面
|
|
92
92
|
for (let id of Object.keys(wiki.projects)) {
|
|
93
|
-
let proj = wiki.projects[id]
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
let proj = wiki.projects[id]
|
|
94
|
+
let proj_pages = wiki_pages.filter(p => p.wiki === id).sort((p1, p2) => p1.order < p2.order ? -1 : 1)
|
|
95
|
+
if (!proj_pages || proj_pages.length == 0) {
|
|
96
|
+
continue
|
|
97
|
+
}
|
|
98
|
+
proj.homepage = proj_pages[0]
|
|
99
|
+
proj.homepage.is_homepage = true
|
|
100
100
|
// 内页按 section 分组
|
|
101
|
-
var
|
|
101
|
+
var section_configs = []
|
|
102
102
|
if (proj.sections) {
|
|
103
103
|
for (let t of Object.keys(proj.sections)) {
|
|
104
|
-
let range = proj.sections[t]
|
|
104
|
+
let range = proj.sections[t]
|
|
105
105
|
if (range.length > 1) {
|
|
106
|
-
|
|
106
|
+
section_configs.push({
|
|
107
107
|
title: t,
|
|
108
108
|
from: range[0],
|
|
109
109
|
to: range[1]
|
|
110
|
-
})
|
|
110
|
+
})
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
var sections = []
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
});
|
|
119
|
-
if (pages && pages.length > 0) {
|
|
114
|
+
var sections = []
|
|
115
|
+
section_configs.forEach((sec, i) => {
|
|
116
|
+
const sec_pages = proj_pages.filter( p => p.order >= sec.from && p.order <= sec.to )
|
|
117
|
+
if (sec_pages && sec_pages.length > 0) {
|
|
120
118
|
sections.push({
|
|
121
119
|
title: sec.title,
|
|
122
|
-
pages:
|
|
123
|
-
})
|
|
120
|
+
pages: sec_pages
|
|
121
|
+
})
|
|
124
122
|
}
|
|
125
|
-
})
|
|
126
|
-
proj.sections = sections
|
|
123
|
+
})
|
|
124
|
+
proj.sections = sections
|
|
125
|
+
proj.pages = proj_pages
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
// 全站所有的项目标签
|
|
130
|
-
var all_tags = {}
|
|
131
|
-
|
|
132
|
-
var projs = []
|
|
129
|
+
var all_tags = {}
|
|
130
|
+
all_tag_name.forEach((tag_name, i) => {
|
|
131
|
+
var projs = []
|
|
133
132
|
for (let id of Object.keys(wiki.projects)) {
|
|
134
|
-
let proj = wiki.projects[id]
|
|
135
|
-
if (proj.tags && proj.tags.includes(
|
|
136
|
-
projs.push(proj.id)
|
|
133
|
+
let proj = wiki.projects[id]
|
|
134
|
+
if (proj.tags && proj.tags.includes(tag_name) === true && projs.includes(tag_name) === false) {
|
|
135
|
+
projs.push(proj.id)
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
|
-
all_tags[
|
|
140
|
-
name:
|
|
141
|
-
path: (
|
|
138
|
+
all_tags[tag_name] = {
|
|
139
|
+
name: tag_name,
|
|
140
|
+
path: (ctx.config.wiki_dir || 'wiki') + '/tags/' + tag_name + '/index.html',
|
|
142
141
|
items: projs
|
|
143
|
-
}
|
|
144
|
-
})
|
|
142
|
+
}
|
|
143
|
+
})
|
|
145
144
|
|
|
146
|
-
//
|
|
145
|
+
// 关联相似项目
|
|
147
146
|
for (let id of Object.keys(wiki.projects)) {
|
|
148
|
-
let proj = wiki.projects[id]
|
|
147
|
+
let proj = wiki.projects[id]
|
|
149
148
|
if (proj.tags) {
|
|
150
|
-
var related = []
|
|
151
|
-
proj.tags.forEach((
|
|
152
|
-
let tagObj = all_tags[
|
|
153
|
-
related = related.concat(tagObj.items)
|
|
154
|
-
related = [...new Set(related)]
|
|
155
|
-
})
|
|
156
|
-
proj.related = related
|
|
149
|
+
var related = []
|
|
150
|
+
proj.tags.forEach((tag_name, i) => {
|
|
151
|
+
let tagObj = all_tags[tag_name]
|
|
152
|
+
related = related.concat(tagObj.items)
|
|
153
|
+
related = [...new Set(related)]
|
|
154
|
+
})
|
|
155
|
+
proj.related = related
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
|
|
160
|
-
wiki.all_tags = all_tags
|
|
161
|
-
wiki.all_pages = wiki_pages
|
|
162
|
-
|
|
159
|
+
wiki.all_tags = all_tags
|
|
160
|
+
wiki.all_pages = wiki_pages
|
|
161
|
+
ctx.theme.config.wiki = wiki
|
|
162
|
+
|
|
163
|
+
}
|
|
@@ -29,9 +29,7 @@ hexo.extend.helper.register('popular_posts_wrapper', function(args){
|
|
|
29
29
|
function listItem(obj){
|
|
30
30
|
var el = '';
|
|
31
31
|
el += '<a class="item" href="' + obj.path + '" title="' + obj.title + '">';
|
|
32
|
-
var p = posts.filter(
|
|
33
|
-
return root + p.path == obj.path;
|
|
34
|
-
});
|
|
32
|
+
var p = posts.filter(p => root + p.path == obj.path)
|
|
35
33
|
if (p && p.length > 0) {
|
|
36
34
|
p = p.data[0];
|
|
37
35
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* utils v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
hexo.extend.helper.register('get_page', function(id) {
|
|
8
|
+
const pages = hexo.locals.get('pages');
|
|
9
|
+
let page = pages.data.find(element => element._id == id)
|
|
10
|
+
if (page && page._id == id) {
|
|
11
|
+
return page
|
|
12
|
+
} else {
|
|
13
|
+
const posts = hexo.locals.get('posts');
|
|
14
|
+
let post = posts.data.find(element => element._id == id)
|
|
15
|
+
if (post && post._id == id) {
|
|
16
|
+
return post
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return null
|
|
20
|
+
});
|
package/scripts/tags/folders.js
CHANGED
|
@@ -19,15 +19,13 @@ hexo.extend.tag.register('folders', function(args, content) {
|
|
|
19
19
|
el += ' ' + hexo.args.joinTags(args, ['color']).join(' ');
|
|
20
20
|
el += '>';
|
|
21
21
|
|
|
22
|
-
var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter(
|
|
23
|
-
return item.trim().length > 0;
|
|
24
|
-
});
|
|
22
|
+
var arr = content.split(/<!--\s*folder (.*?)\s*-->/g).filter(item => item.trim().length > 0)
|
|
25
23
|
if (arr.length > 0) {
|
|
26
24
|
var nodes = [];
|
|
27
25
|
arr.forEach((item, i) => {
|
|
28
|
-
if (
|
|
26
|
+
if (i % 2 == 0) {
|
|
29
27
|
nodes.push({
|
|
30
|
-
header: item
|
|
28
|
+
header: item
|
|
31
29
|
});
|
|
32
30
|
} else if (nodes.length > 0) {
|
|
33
31
|
var node = nodes[nodes.length-1];
|
|
@@ -44,7 +42,7 @@ hexo.extend.tag.register('folders', function(args, content) {
|
|
|
44
42
|
el += '<summary><span>' + (node.header || '') + '</span></summary>';
|
|
45
43
|
// content
|
|
46
44
|
el += '<div class="body">';
|
|
47
|
-
el += hexo.render.renderSync({text: node.body, engine: 'markdown'}).split('\n').join('');
|
|
45
|
+
el += hexo.render.renderSync({text: (node.body || ''), engine: 'markdown'}).split('\n').join('');
|
|
48
46
|
el += '</div></details>';
|
|
49
47
|
});
|
|
50
48
|
}
|
package/scripts/tags/lib/tabs.js
CHANGED
|
@@ -6,17 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
var tab_index = 0;
|
|
8
8
|
|
|
9
|
-
module.exports = ctx => function(args, content) {
|
|
9
|
+
module.exports = ctx => function(args, content = '') {
|
|
10
10
|
var el = '';
|
|
11
|
-
var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter(
|
|
12
|
-
return item.trim().length > 0;
|
|
13
|
-
});
|
|
11
|
+
var arr = content.split(/<!--\s*tab (.*?)\s*-->/g).filter(item => item.trim().length > 0)
|
|
14
12
|
if (arr.length < 1) {
|
|
15
13
|
return el;
|
|
16
14
|
}
|
|
17
15
|
var tabs = [];
|
|
18
16
|
arr.forEach((item, i) => {
|
|
19
|
-
if (
|
|
17
|
+
if (i % 2 == 0) {
|
|
20
18
|
tabs.push({
|
|
21
19
|
header: item
|
|
22
20
|
});
|
|
@@ -37,14 +35,12 @@ module.exports = ctx => function(args, content) {
|
|
|
37
35
|
let tabId = 0;
|
|
38
36
|
let tabNav = '';
|
|
39
37
|
let tabContent = '';
|
|
40
|
-
|
|
41
38
|
tabs.forEach((tab, i) => {
|
|
42
|
-
let
|
|
43
|
-
let content = ctx.render.renderSync({ text: tab.body, engine: 'markdown' }).trim();
|
|
39
|
+
let content = ctx.render.renderSync({ text: (tab.body || ''), engine: 'markdown' }).trim();
|
|
44
40
|
const abbr = tabName + ' ' + ++tabId;
|
|
45
41
|
const href = abbr.toLowerCase().split(' ').join('-');
|
|
46
42
|
const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
|
|
47
|
-
tabNav += `<li class="tab${isActive}"><a href="#${href}">${
|
|
43
|
+
tabNav += `<li class="tab${isActive}"><a href="#${href}">${tab.header || abbr}</a></li>`;
|
|
48
44
|
tabContent += `<div class="tab-pane${isActive}" id="${href}">${content}</div>`;
|
|
49
45
|
});
|
|
50
46
|
|
package/scripts/tags/split.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
4
|
*
|
|
5
5
|
* {% split [style:block/card] %}
|
|
6
|
-
* <!-- cell -->
|
|
6
|
+
* <!-- cell left -->
|
|
7
7
|
* left body
|
|
8
|
-
* <!-- cell -->
|
|
8
|
+
* <!-- cell right -->
|
|
9
9
|
* right body
|
|
10
10
|
* {% endsplit %}
|
|
11
11
|
*/
|
|
@@ -19,15 +19,13 @@ hexo.extend.tag.register('split', function(args, content) {
|
|
|
19
19
|
el += ' ' + hexo.args.joinTags(args, ['bg']).join(' ');
|
|
20
20
|
el += '>';
|
|
21
21
|
|
|
22
|
-
var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter(
|
|
23
|
-
return item.trim().length > 0;
|
|
24
|
-
});
|
|
22
|
+
var arr = content.split(/<!--\s*cell (.*?)\s*-->/g).filter(item => item.trim().length > 0)
|
|
25
23
|
if (arr.length > 0) {
|
|
26
24
|
var nodes = [];
|
|
27
25
|
arr.forEach((item, i) => {
|
|
28
|
-
if (
|
|
26
|
+
if (i % 2 == 0) {
|
|
29
27
|
nodes.push({
|
|
30
|
-
header:
|
|
28
|
+
header: item
|
|
31
29
|
});
|
|
32
30
|
} else if (nodes.length > 0) {
|
|
33
31
|
var node = nodes[nodes.length-1];
|
|
@@ -40,7 +38,7 @@ hexo.extend.tag.register('split', function(args, content) {
|
|
|
40
38
|
});
|
|
41
39
|
nodes.forEach((node, i) => {
|
|
42
40
|
el += '<div class="cell" index="' + (i) + '">';
|
|
43
|
-
el += hexo.render.renderSync({text: node.body, engine: 'markdown'}).split('\n').join('');
|
|
41
|
+
el += hexo.render.renderSync({text: (node.body || ''), engine: 'markdown'}).split('\n').join('');
|
|
44
42
|
el += '</div>';
|
|
45
43
|
});
|
|
46
44
|
}
|
package/scripts/tags/timeline.js
CHANGED
|
@@ -49,13 +49,11 @@ function postTimeline(args, content) {
|
|
|
49
49
|
el += '<div class="tag-plugin timeline">';
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter(
|
|
53
|
-
return item.trim().length > 0;
|
|
54
|
-
});
|
|
52
|
+
var arr = content.split(/<!--\s*node (.*?)\s*-->/g).filter(item => item.trim().length > 0)
|
|
55
53
|
if (arr.length > 0) {
|
|
56
54
|
var nodes = [];
|
|
57
55
|
arr.forEach((item, i) => {
|
|
58
|
-
if (
|
|
56
|
+
if (i % 2 == 0) {
|
|
59
57
|
nodes.push({
|
|
60
58
|
header: item
|
|
61
59
|
});
|
|
@@ -70,7 +68,7 @@ function postTimeline(args, content) {
|
|
|
70
68
|
});
|
|
71
69
|
nodes.forEach((node, i) => {
|
|
72
70
|
el += '<div class="timenode" index="' + (i) + '">';
|
|
73
|
-
el += layoutNodeTitle(node.header
|
|
71
|
+
el += layoutNodeTitle(node.header);
|
|
74
72
|
el += layoutNodeContent(node.body);
|
|
75
73
|
el += '</div>';
|
|
76
74
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
blockquote
|
|
2
|
+
display: block
|
|
3
|
+
margin-left: 0
|
|
4
|
+
margin-right: 0
|
|
5
|
+
padding: 0.5rem 0.75rem
|
|
6
|
+
background: var(--block)
|
|
7
|
+
$bd-left = 4px
|
|
8
|
+
border-left: $bd-left solid var(--text-meta)
|
|
9
|
+
border-radius: $bd-left $border-block $border-block $bd-left
|
|
10
|
+
color: var(--text-p2)
|
|
@@ -14,23 +14,21 @@
|
|
|
14
14
|
float: right
|
|
15
15
|
z-index: 10
|
|
16
16
|
display: flex
|
|
17
|
-
border-radius:
|
|
18
|
-
|
|
19
|
-
border: 1px solid var(--block-border)
|
|
20
|
-
border-right: 0
|
|
17
|
+
border-radius: 2rem
|
|
18
|
+
margin-right: 1rem
|
|
21
19
|
overflow: hidden
|
|
22
|
-
--blur-px:
|
|
23
|
-
--blur-bg: alpha(#
|
|
20
|
+
--blur-px: 16px
|
|
21
|
+
--blur-bg: alpha(#fff, .4)
|
|
22
|
+
trans1: all
|
|
24
23
|
if hexo-config('style.darkmode') == 'auto'
|
|
25
24
|
@media (prefers-color-scheme: dark)
|
|
26
|
-
--blur-bg: alpha(#
|
|
25
|
+
--blur-bg: alpha(#000, .4)
|
|
27
26
|
if hexo-config('style.darkmode') == 'always'
|
|
28
|
-
--blur-bg: alpha(#
|
|
27
|
+
--blur-bg: alpha(#000, .4)
|
|
29
28
|
|
|
30
29
|
.sidebar-toggle.mobile
|
|
31
30
|
cursor: pointer
|
|
32
|
-
color: var(--text-
|
|
33
|
-
border-right: 1px solid transparent
|
|
31
|
+
color: var(--text-p0)
|
|
34
32
|
background: none
|
|
35
33
|
padding: 0.5rem
|
|
36
34
|
line-height: 0
|
|
@@ -39,6 +37,9 @@
|
|
|
39
37
|
|
|
40
38
|
|
|
41
39
|
.l_body.mobile.sidebar
|
|
40
|
+
.float-panel
|
|
41
|
+
box-shadow: $boxshadow-float
|
|
42
|
+
transform: translateY(-2px)
|
|
42
43
|
.sidebar-toggle.mobile
|
|
43
44
|
background: var(--card)
|
|
44
45
|
color: $color-hover
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
margin: 1rem 0
|
|
26
26
|
border-radius: $border-card
|
|
27
27
|
box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.02)
|
|
28
|
-
trans1
|
|
28
|
+
trans1 all
|
|
29
29
|
overflow: hidden
|
|
30
30
|
z-index: 0
|
|
31
31
|
background: var(--card)
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
.post-list .post-card:hover
|
|
57
57
|
box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 16px 0px rgba(0, 0, 0, 0.1)
|
|
58
|
+
transform: translateY(-1px)
|
|
58
59
|
img
|
|
59
60
|
transform: scale(1.02)
|
|
60
61
|
filter: brightness(80%)
|
|
@@ -5,8 +5,10 @@
|
|
|
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(2 * %s)" % var(--gap-l)
|
|
9
|
+
@media screen and (max-width: $device-mobile-max)
|
|
10
|
+
padding-top: 1rem
|
|
9
11
|
header
|
|
10
|
-
margin:
|
|
12
|
+
margin: 2rem 1rem 1rem
|
|
11
13
|
.logo-wrap
|
|
12
14
|
margin: 0
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
article.md
|
|
2
2
|
max-width: 100%
|
|
3
|
-
padding: 1rem
|
|
3
|
+
padding: 0 1rem
|
|
4
|
+
margin-top: 1rem
|
|
5
|
+
&:first-child
|
|
6
|
+
margin-top: 0
|
|
4
7
|
color: var(--text-p1)
|
|
5
8
|
line-height: 1.7
|
|
6
9
|
word-break: break-word
|
|
@@ -33,7 +36,7 @@ article.md.content
|
|
|
33
36
|
align-self: center
|
|
34
37
|
border-bottom-style: dashed
|
|
35
38
|
border-bottom-color: $color-accent
|
|
36
|
-
>:first-child
|
|
39
|
+
>:first-child:not(h1)
|
|
37
40
|
margin-top: 0
|
|
38
41
|
h1:not(:first-child)
|
|
39
42
|
margin-top: 2em
|
|
@@ -50,7 +53,7 @@ article.md.content
|
|
|
50
53
|
|
|
51
54
|
|
|
52
55
|
|
|
53
|
-
.md
|
|
56
|
+
article.md
|
|
54
57
|
ul:not(:last-child),
|
|
55
58
|
ol:not(:last-child)
|
|
56
59
|
padding-bottom: .5rem
|
|
@@ -112,16 +115,6 @@ article.md
|
|
|
112
115
|
// div
|
|
113
116
|
article.md>div
|
|
114
117
|
margin: var(--gap-p) 0
|
|
115
|
-
// blockquote
|
|
116
|
-
article.md blockquote
|
|
117
|
-
margin-left: 0
|
|
118
|
-
margin-right: 0
|
|
119
|
-
padding: 1rem
|
|
120
|
-
background: var(--card)
|
|
121
|
-
border-left: 6px solid $color-theme
|
|
122
|
-
border-radius: $border-block
|
|
123
|
-
color: var(--text-p2)
|
|
124
|
-
box-shadow: $boxshadow-card
|
|
125
118
|
|
|
126
119
|
|
|
127
120
|
article.md img
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.nav-wrap
|
|
2
2
|
position: sticky
|
|
3
3
|
position: -webkit-sticky
|
|
4
|
-
margin-top: .
|
|
4
|
+
margin-top: -0.5rem
|
|
5
5
|
top: -2px
|
|
6
6
|
background: var(--site-bg)
|
|
7
7
|
padding: 0 1rem
|
|
@@ -57,3 +57,10 @@ nav.cap
|
|
|
57
57
|
@media screen and (max-width: $device-mobile-max)
|
|
58
58
|
.nav-wrap
|
|
59
59
|
margin-top: 0
|
|
60
|
+
padding-left: 0
|
|
61
|
+
padding-right: 0
|
|
62
|
+
nav
|
|
63
|
+
a:first-child
|
|
64
|
+
margin-left: 1rem
|
|
65
|
+
a:last-child
|
|
66
|
+
margin-right: 1rem
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
height: "calc(100vh - 1 * %s)" % var(--gap-l)
|
|
7
7
|
.header
|
|
8
8
|
margin: var(--gap-l) var(--gap-l) 0
|
|
9
|
+
margin-top: "calc(2 * %s)" % var(--gap-l)
|
|
9
10
|
@media screen and (min-width: $device-mobile-max)
|
|
10
11
|
>.widgets:first-child>.widget-wrap:first-child
|
|
11
12
|
margin-top: "calc(2 * %s)" % var(--gap-l)
|
|
@@ -23,7 +24,6 @@
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
.logo-wrap
|
|
26
|
-
margin: 1rem 0
|
|
27
27
|
display: flex
|
|
28
28
|
align-items: center
|
|
29
29
|
overflow: hidden
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
opacity: 1 !important
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
.logo-wrap.wiki
|
|
104
|
-
margin:
|
|
103
|
+
.l_left .widgets .widget-wrap.logo-wrap.wiki
|
|
104
|
+
margin-bottom: 1.5rem
|
|
105
105
|
flex-direction: column
|
|
106
106
|
align-items: flex-start
|
|
107
107
|
a.wiki-home
|
|
108
|
-
margin-bottom:
|
|
108
|
+
margin-bottom: 0.5rem
|
|
109
109
|
color: var(--text-p1)
|
|
110
110
|
svg
|
|
111
111
|
margin-right: 2px
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
z-index: 1
|
|
10
10
|
line-height: 1.2
|
|
11
11
|
.widget-wrap
|
|
12
|
-
margin: 1rem
|
|
12
|
+
margin: 1rem 0 2rem
|
|
13
13
|
.widget-header
|
|
14
|
+
padding-left: var(--gap-l)
|
|
15
|
+
padding-right: var(--gap-l)
|
|
14
16
|
display: flex
|
|
15
17
|
justify-content: space-between
|
|
16
18
|
align-items: center
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
fill: $color-hover
|
|
41
43
|
|
|
42
44
|
.widget-body
|
|
43
|
-
margin: 0.5rem
|
|
45
|
+
margin: 0.5rem var(--gap-l)
|
|
44
46
|
color: var(--text-p1)
|
|
45
47
|
p
|
|
46
48
|
margin-top: .5em
|
|
@@ -48,7 +50,8 @@
|
|
|
48
50
|
line-height: 1.5
|
|
49
51
|
.widget-header+.widget-body
|
|
50
52
|
margin-top: 0
|
|
51
|
-
|
|
53
|
+
.widget-wrap+.widget-wrap .widget-header
|
|
54
|
+
margin-top: 3rem
|
|
52
55
|
|
|
53
56
|
|
|
54
57
|
.l_left .widgets
|