hexo-theme-stellar 1.26.2 → 1.26.4
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 +20 -15
- package/layout/_partial/cover/index.ejs +3 -3
- package/layout/_partial/head.ejs +1 -5
- package/layout/_partial/main/article/article_footer.ejs +1 -1
- package/layout/_partial/main/footer.ejs +2 -2
- package/layout/_partial/main/navbar/article_banner.ejs +54 -0
- package/layout/_partial/main/navbar/article_top_area.ejs +2 -2
- package/layout/_partial/main/navbar/author_banner.ejs +1 -1
- package/layout/_partial/main/navbar/dateinfo.ejs +9 -10
- package/layout/_partial/main/navbar/nav_tabs_blog.ejs +1 -1
- package/layout/_partial/main/navbar/nav_tabs_wiki.ejs +1 -1
- package/layout/_partial/main/post_list/post_card.ejs +1 -1
- package/layout/_partial/scripts/index.ejs +1 -5
- package/layout/_partial/sidebar/index.ejs +1 -1
- package/layout/_partial/sidebar/logo.ejs +3 -0
- package/layout/_partial/sidebar/menu.ejs +1 -7
- package/layout/archive.ejs +1 -1
- package/layout/layout.ejs +8 -0
- package/layout/page.ejs +1 -11
- package/package.json +1 -1
- package/scripts/generators/author.js +2 -1
- package/scripts/helpers/icon.js +2 -2
- package/scripts/tags/lib/link.js +2 -2
- package/scripts/tags/lib/note.js +1 -1
- package/source/css/_common/base.styl +4 -2
- package/source/css/_common/button.styl +31 -29
- package/source/css/_common/cap.styl +1 -1
- package/source/css/_common/device.styl +1 -1
- package/source/css/_common/html.styl +1 -0
- package/source/css/_common/input.styl +1 -1
- package/source/css/_common/title.styl +9 -8
- package/source/css/_common/toast.styl +1 -0
- package/source/css/_custom.styl +8 -4
- package/source/css/_defines/const.styl +2 -1
- package/source/css/_defines/theme.styl +6 -4
- package/source/css/_layout/layout.styl +3 -2
- package/source/css/_layout/list.styl +14 -9
- package/source/css/_layout/main.styl +19 -3
- package/source/css/_layout/md.styl +49 -85
- package/source/css/_layout/pages/archives.styl +3 -3
- package/source/css/_layout/partial/article-banner.styl +57 -0
- package/source/css/_layout/partial/article-footer.styl +15 -3
- package/source/css/_layout/partial/bread-nav.styl +22 -18
- package/source/css/_layout/partial/cover.styl +2 -11
- package/source/css/_layout/partial/footer.styl +2 -2
- package/source/css/_layout/partial/navbar.styl +16 -8
- package/source/css/_layout/partial/related.styl +5 -3
- package/source/css/_layout/sidebar/footer.styl +1 -0
- package/source/css/_layout/sidebar/logo.styl +3 -2
- package/source/css/_layout/sidebar/search.styl +4 -3
- package/source/css/_layout/sidebar/sidebar.styl +13 -10
- package/source/css/_layout/tag-plugins/banner.styl +23 -19
- package/source/css/_layout/tag-plugins/common.styl +4 -4
- package/source/css/_layout/tag-plugins/copy.styl +2 -1
- package/source/css/_layout/tag-plugins/folders.styl +4 -3
- package/source/css/_layout/tag-plugins/folding.styl +4 -2
- package/source/css/_layout/tag-plugins/hashtag.styl +2 -1
- package/source/css/_layout/tag-plugins/image.styl +1 -1
- package/source/css/_layout/tag-plugins/link.styl +1 -1
- package/source/css/_layout/tag-plugins/mark.styl +1 -1
- package/source/css/_layout/tag-plugins/note.styl +5 -3
- package/source/css/_layout/tag-plugins/poetry.styl +5 -5
- package/source/css/_layout/tag-plugins/quot.styl +3 -3
- package/source/css/_layout/tag-plugins/tabs.styl +4 -3
- package/source/css/_layout/tag-plugins/timeline.styl +24 -9
- package/source/css/_layout/widgets/ghuser.styl +1 -1
- package/source/css/_layout/widgets/markdown.styl +2 -2
- package/source/css/_layout/widgets/tagcloud.styl +3 -1
- package/source/css/_layout/widgets/timeline.styl +1 -1
- package/source/css/_layout/widgets/toc_common.styl +1 -5
- package/source/css/_layout/widgets/toc_wiki.styl +3 -3
- package/source/css/_layout/widgets/widgets.styl +2 -2
- package/source/css/_plugins/swiper.styl +1 -1
- package/source/css/_plugins/tianli_gpt.styl +2 -2
package/_config.yml
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
######## Stellar info ########
|
|
2
2
|
stellar:
|
|
3
|
-
version: '1.26.
|
|
3
|
+
version: '1.26.4'
|
|
4
4
|
homepage: 'https://xaoxuu.com/wiki/stellar/'
|
|
5
5
|
repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
main_css: /css/main.css
|
|
7
|
+
main_js: /js/main.js
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
######## head tags ########
|
|
@@ -313,7 +313,7 @@ tag_plugins:
|
|
|
313
313
|
max-height: 80vh
|
|
314
314
|
# {% mark %}
|
|
315
315
|
mark:
|
|
316
|
-
default_color:
|
|
316
|
+
default_color: yellow # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error
|
|
317
317
|
# {% hashtag %}
|
|
318
318
|
hashtag:
|
|
319
319
|
default_color: # red, orange, yellow, green, cyan, blue, purple
|
|
@@ -470,9 +470,9 @@ style:
|
|
|
470
470
|
darkmode: auto # auto / always / false
|
|
471
471
|
smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位
|
|
472
472
|
font-size:
|
|
473
|
-
root: 16px
|
|
474
|
-
body:
|
|
475
|
-
code: 85% #
|
|
473
|
+
root: 16px # 改这个会影响全局所有文字的字号
|
|
474
|
+
body: 17px # 影响正文区域的字号,如果改成 px 则不受 root 影响
|
|
475
|
+
code: 85% # 相较于其所在行的文本大小,建议用百分比
|
|
476
476
|
codeblock: 0.8125rem # 13px
|
|
477
477
|
font-family:
|
|
478
478
|
logo: 'system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif'
|
|
@@ -480,10 +480,12 @@ style:
|
|
|
480
480
|
code: 'Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif'
|
|
481
481
|
codeblock: 'Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif'
|
|
482
482
|
text-align: left
|
|
483
|
+
prefix:
|
|
484
|
+
h2: https://api.iconify.design/ci:heading-h2.svg
|
|
483
485
|
border-radius:
|
|
484
486
|
card: 12px
|
|
485
487
|
block: 12px
|
|
486
|
-
bar:
|
|
488
|
+
bar: 8px
|
|
487
489
|
image: 6px
|
|
488
490
|
color:
|
|
489
491
|
# 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
|
|
@@ -497,8 +499,6 @@ style:
|
|
|
497
499
|
link: 'hsl(207 90% 54%)' # 超链接颜色
|
|
498
500
|
button: 'hsl(192 98% 55%)' # 按钮颜色
|
|
499
501
|
hover: 'hsl(14 100% 57%)' # 按钮高亮颜色
|
|
500
|
-
link:
|
|
501
|
-
underline: true # true / false
|
|
502
502
|
animated_avatar:
|
|
503
503
|
animate: auto # auto, always
|
|
504
504
|
background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
|
|
@@ -513,15 +513,20 @@ style:
|
|
|
513
513
|
search: 'linear-gradient(to right, #04F3FF, #08FFC6, #DDF730, #FFBD19, #FF1FE0, #C418FF, #04F3FF)'
|
|
514
514
|
sidebar:
|
|
515
515
|
# 可以设置:纯色/渐变色/图片作为背景
|
|
516
|
-
# background:
|
|
517
|
-
# background: 'linear-gradient(to bottom,
|
|
518
|
-
background:
|
|
519
|
-
|
|
520
|
-
blur:
|
|
516
|
+
# background: var(--sidebar-bg)
|
|
517
|
+
# background-image: 'linear-gradient(to bottom, var(--sidebar-bg), var(--sidebar-bg))'
|
|
518
|
+
background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)
|
|
519
|
+
blur-px: 100px
|
|
520
|
+
blur-bg: var(--alpha60)
|
|
521
521
|
paginator:
|
|
522
522
|
prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg
|
|
523
523
|
next: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/064b95430caf4.svg
|
|
524
524
|
error_page: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/404/1c830bfcd517d.svg
|
|
525
|
+
site:
|
|
526
|
+
background-image: #'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.14/image/site-bg1@small.webp)' # 未完全适配,慎用
|
|
527
|
+
blur-px: 100px
|
|
528
|
+
blur-bg: var(--alpha75)
|
|
529
|
+
|
|
525
530
|
|
|
526
531
|
default:
|
|
527
532
|
avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg
|
package/layout/_partial/head.ejs
CHANGED
|
@@ -118,11 +118,7 @@ function custom_inject() {
|
|
|
118
118
|
<%- feed_tag(config.feed.path, {title: config.title}) %>
|
|
119
119
|
<% } %>
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
<%- css(theme.stellar.cdn_css) %>
|
|
123
|
-
<% } else { %>
|
|
124
|
-
<%- css('/css/main.css') %>
|
|
125
|
-
<% } %>
|
|
121
|
+
<link rel="stylesheet" href="<%- `${theme.stellar.main_css}?v=${stellar_info('version')}` %>">
|
|
126
122
|
|
|
127
123
|
<% if (config.favicon) { %>
|
|
128
124
|
<%- favicon_tag(config.favicon) %>
|
|
@@ -122,7 +122,7 @@ function layoutDiv() {
|
|
|
122
122
|
function qrcode() {
|
|
123
123
|
if (theme.article.share.includes('wechat')) {
|
|
124
124
|
return `
|
|
125
|
-
<div class="qrcode" id="qrcode-wechat" style="
|
|
125
|
+
<div class="qrcode" id="qrcode-wechat" style="opacity:0;height:0">
|
|
126
126
|
<img src="https://api.qrserver.com/v1/create-qr-code/?size=256x256&data=${page.permalink}"/>
|
|
127
127
|
</div>
|
|
128
128
|
`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const content = theme.footer.content?.replace('${author.name}', (config.author || 'Anonymity'))?.replace('${theme.name}', stellar_info('name'))?.replace('${theme.version}', stellar_info('version'))?.replace('${theme.tree}', stellar_info('tree'))
|
|
3
3
|
function layoutDiv() {
|
|
4
4
|
var el = ''
|
|
5
|
-
el += `<footer class="page-footer${scrollreveal(' ')}
|
|
5
|
+
el += `<footer class="page-footer${scrollreveal(' ')} footnote">`
|
|
6
6
|
el += '<hr>'
|
|
7
7
|
// sitemap
|
|
8
8
|
if (theme.footer.sitemap && Object.keys(theme.footer.sitemap).length > 0) {
|
|
@@ -13,7 +13,7 @@ function layoutDiv() {
|
|
|
13
13
|
continue
|
|
14
14
|
}
|
|
15
15
|
el += '<div class="sitemap-group">'
|
|
16
|
-
el += '<span class="
|
|
16
|
+
el += '<span class="fs15">' + group + '</span>'
|
|
17
17
|
items.forEach((item, i) => {
|
|
18
18
|
el += '<a href="' + url_for(md_link(item)) + '">'
|
|
19
19
|
el += __(md_text(item))
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<%
|
|
2
|
+
|
|
3
|
+
var banner_url = page.banner || ''
|
|
4
|
+
|
|
5
|
+
function layoutTitle() {
|
|
6
|
+
const title = page.h1 != null ? page.h1 : page.title
|
|
7
|
+
if (title && title.length > 0) {
|
|
8
|
+
return `<h1 class="text title"><span>${title}</span></h1>`
|
|
9
|
+
} else {
|
|
10
|
+
return ''
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function layoutBottom() {
|
|
15
|
+
const article_title = layoutTitle()
|
|
16
|
+
if (article_title.length > 0) {
|
|
17
|
+
return `
|
|
18
|
+
<div class="bottom">
|
|
19
|
+
<div class="text-area">
|
|
20
|
+
${article_title}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
`
|
|
24
|
+
} else {
|
|
25
|
+
return ``
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function layoutDiv() {
|
|
30
|
+
const top = partial('article_top_area')
|
|
31
|
+
const bottom = layoutBottom()
|
|
32
|
+
if (top.trim().length == 0 && bottom.length == 0) {
|
|
33
|
+
return ``
|
|
34
|
+
}
|
|
35
|
+
var style = ``
|
|
36
|
+
var el = ``
|
|
37
|
+
el += `<div class="article banner top">`
|
|
38
|
+
if (banner_url.length > 0) {
|
|
39
|
+
el += `<img class="bg" src="${banner_url}">`
|
|
40
|
+
if (page.poster?.color) {
|
|
41
|
+
style += ' style="--text-banner:' + page.poster?.color + '"'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
el += `
|
|
45
|
+
<div class="content"${style}>
|
|
46
|
+
${top}
|
|
47
|
+
${bottom}
|
|
48
|
+
</div>
|
|
49
|
+
`
|
|
50
|
+
el += `</div>`
|
|
51
|
+
return el
|
|
52
|
+
}
|
|
53
|
+
%>
|
|
54
|
+
<%- layoutDiv() %>
|
|
@@ -5,11 +5,11 @@ function layoutDiv() {
|
|
|
5
5
|
}
|
|
6
6
|
var el = ''
|
|
7
7
|
// 1.main
|
|
8
|
-
el += `<div class="bread-nav
|
|
8
|
+
el += `<div class="top bread-nav footnote">`
|
|
9
9
|
// 2.left
|
|
10
10
|
el += `<div class="left">`
|
|
11
11
|
// 3.left.top: 面包屑导航
|
|
12
|
-
el += `<div id="breadcrumb">`
|
|
12
|
+
el += `<div class="flex-row" id="breadcrumb">`
|
|
13
13
|
// 首页
|
|
14
14
|
el += `<a class="cap breadcrumb" href="${url_for(config.root)}">${__("btn.home")}</a>`
|
|
15
15
|
if (theme.wiki.tree[page.wiki]) {
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
<%
|
|
2
2
|
function layoutDiv() {
|
|
3
3
|
// 作者
|
|
4
|
-
const author = theme.authors ? (theme.authors[page.author] || theme.default_author) : null
|
|
5
4
|
var el = ''
|
|
6
|
-
el += `<div id="post-meta">`
|
|
5
|
+
el += `<div class="flex-row" id="post-meta">`
|
|
7
6
|
if (page.wiki) {
|
|
8
|
-
el += `<span class="
|
|
7
|
+
el += `<span class="text created">${__("meta.updated") + __("symbol.colon")}`
|
|
9
8
|
el += `<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time>`
|
|
10
9
|
el += `</span>`
|
|
11
10
|
} else {
|
|
11
|
+
const author = theme.authors ? (theme.authors[page.author] || theme.default_author) : null
|
|
12
12
|
if (author) {
|
|
13
|
-
|
|
14
|
-
el += `<span class="
|
|
15
|
-
} else {
|
|
16
|
-
el += `<span class="author">${__("meta.created") + __("symbol.colon")}</span>`
|
|
13
|
+
el += `<a class="author" href="${url_for(author.path)}">${author.name}</a>`
|
|
14
|
+
el += `<span class="sep"></span>`
|
|
17
15
|
}
|
|
18
16
|
// 发布日期
|
|
19
|
-
el += `<span class="created">`
|
|
17
|
+
el += `<span class="text created">`
|
|
20
18
|
el += `<time datetime="${date_xml(page.date)}">${date(page.date, config.date_format)}</time>`
|
|
21
19
|
el += `</span>`
|
|
22
20
|
// 更新日期
|
|
23
|
-
el += `<span class="updated">`
|
|
24
|
-
el +=
|
|
21
|
+
el += `<span class="sep updated"></span>`
|
|
22
|
+
el += `<span class="text updated">`
|
|
23
|
+
el += `${__("meta.updated") + __("symbol.colon")}`
|
|
25
24
|
el += `<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time>`
|
|
26
25
|
el += `</span>`
|
|
27
26
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
function layoutDiv() {
|
|
3
3
|
var el = '';
|
|
4
4
|
el += '<div class="nav-wrap">';
|
|
5
|
-
el += '<nav class="sub post
|
|
5
|
+
el += '<nav class="sub post">';
|
|
6
6
|
if (is_home()) {
|
|
7
7
|
el += '<a class="active" href="' + url_for(config.index_generator.path) + '">' + __("btn.recent_publish") + '</a>';
|
|
8
8
|
} else {
|
|
@@ -71,7 +71,7 @@ function div_default() {
|
|
|
71
71
|
el += '<span class="cap" id="post-meta">';
|
|
72
72
|
|
|
73
73
|
// time
|
|
74
|
-
el +=
|
|
74
|
+
el += `<time datetime="${date_xml(post.date)}">${date(post.date, config.date_format)}</time>`
|
|
75
75
|
el += '</span>';
|
|
76
76
|
// cat
|
|
77
77
|
if (post.categories && post.categories.length > 0) {
|
|
@@ -166,11 +166,7 @@ function custom_inject() {
|
|
|
166
166
|
</script>
|
|
167
167
|
|
|
168
168
|
<!-- required -->
|
|
169
|
-
|
|
170
|
-
<%- js({src: theme.stellar.cdn_js, async: true}) %>
|
|
171
|
-
<% } else { %>
|
|
172
|
-
<%- js({src: '/js/main.js', async: true}) %>
|
|
173
|
-
<% } %>
|
|
169
|
+
<script src="<%- `${theme.stellar.main_js}?v=${stellar_info('version')}` %>" async></script>
|
|
174
170
|
|
|
175
171
|
<!-- optional -->
|
|
176
172
|
<%- partial('../plugins/comments/script') %>
|
|
@@ -6,6 +6,9 @@ if (page.logo) {
|
|
|
6
6
|
const proj = theme.wiki.tree[page.wiki]
|
|
7
7
|
var l = proj.logo
|
|
8
8
|
if (l) {
|
|
9
|
+
if (l.title.includes('](') == false) {
|
|
10
|
+
l.title = `[${l.title}](${url_for(proj.homepage?.path || '')})`
|
|
11
|
+
}
|
|
9
12
|
logo = l
|
|
10
13
|
} else if (proj.name || proj.icon) {
|
|
11
14
|
logo = {
|
|
@@ -12,13 +12,7 @@ function layoutDiv() {
|
|
|
12
12
|
}
|
|
13
13
|
el += `>`
|
|
14
14
|
if (item.icon?.length > 0) {
|
|
15
|
-
|
|
16
|
-
el += item.icon
|
|
17
|
-
} else if (theme.icons[item.icon]) {
|
|
18
|
-
el += theme.icons[item.icon]
|
|
19
|
-
} else {
|
|
20
|
-
el += `<img no-lazy src="${item.icon}">`
|
|
21
|
-
}
|
|
15
|
+
el += icon(item.icon, 'no-lazy')
|
|
22
16
|
} else {
|
|
23
17
|
el += `<span>${__(item.title)}</span>`
|
|
24
18
|
}
|
package/layout/archive.ejs
CHANGED
|
@@ -17,7 +17,7 @@ function layoutArchiveList() {
|
|
|
17
17
|
}
|
|
18
18
|
el += `<div class="post-list archives">`
|
|
19
19
|
var years = []
|
|
20
|
-
const posts = page.author != null ? site.posts.filter(p => (p.author || theme.default_author.
|
|
20
|
+
const posts = page.author != null ? site.posts.filter(p => (p.author || theme.default_author.id) == page.author.id) : site.posts
|
|
21
21
|
posts.sort('date', -1).each(function(post) {
|
|
22
22
|
post.year = date(post.date, 'YYYY')
|
|
23
23
|
if (post.year && (years.includes(post.year) == false) && (post.title || post.date)) {
|
package/layout/layout.ejs
CHANGED
|
@@ -25,10 +25,18 @@ if (page.indent != null) {
|
|
|
25
25
|
indent = article_type === 'story'
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
var site_background = ''
|
|
29
|
+
if (theme.style.site && theme.style.site['background-image']) {
|
|
30
|
+
site_background += `<div class="sitebg">`
|
|
31
|
+
site_background += `<div class="siteblur"></div>`
|
|
32
|
+
site_background += `</div>`
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
var html = `<!DOCTYPE html>`
|
|
29
36
|
html += `<html lang="${page.lang}">`
|
|
30
37
|
html += partial('_partial/head')
|
|
31
38
|
html += `<body>`
|
|
39
|
+
html += site_background
|
|
32
40
|
html += partial('_partial/cover/index')
|
|
33
41
|
html += `<div class="l_body ${page_type} ${article_type}" id="start" layout="${page.layout}" ${indent ? 'text-indent' : ''}>`
|
|
34
42
|
html += `<aside class="l_left">`
|
package/layout/page.ejs
CHANGED
|
@@ -22,15 +22,6 @@ if (page.title == null) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function layoutTitle() {
|
|
26
|
-
const title = page.h1 != null ? page.h1 : page.title
|
|
27
|
-
if (title && title.length > 0) {
|
|
28
|
-
return `<h1 class="article-title"><span>${title}</span></h1>`
|
|
29
|
-
} else {
|
|
30
|
-
return ''
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
25
|
function articleClass() {
|
|
35
26
|
var str = `md-text content${scrollreveal(' ')}`
|
|
36
27
|
if (isUsingHeti) {
|
|
@@ -48,10 +39,9 @@ function layoutDiv() {
|
|
|
48
39
|
el += partial('_partial/main/navbar/nav_tabs_blog')
|
|
49
40
|
}
|
|
50
41
|
if (page.h1 || page.title || (page.content && page.content.length > 0)) {
|
|
51
|
-
el += partial('_partial/main/navbar/
|
|
42
|
+
el += partial('_partial/main/navbar/article_banner')
|
|
52
43
|
}
|
|
53
44
|
el += `<article class="${articleClass()}">`
|
|
54
|
-
el += layoutTitle()
|
|
55
45
|
if (page.content && page.content.length > 0) {
|
|
56
46
|
el += page.content
|
|
57
47
|
}
|
package/package.json
CHANGED
|
@@ -6,10 +6,11 @@ hexo.extend.generator.register('author', function (locals) {
|
|
|
6
6
|
const { site_tree, authors } = hexo.theme.config
|
|
7
7
|
var pages = []
|
|
8
8
|
for (let key of Object.keys(authors)) {
|
|
9
|
-
|
|
9
|
+
var author = authors[key]
|
|
10
10
|
if (author.hidden) {
|
|
11
11
|
continue
|
|
12
12
|
}
|
|
13
|
+
author.id = key
|
|
13
14
|
pages.push({
|
|
14
15
|
path: author.path,
|
|
15
16
|
layout: ['archive'],
|
package/scripts/helpers/icon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
hexo.extend.helper.register('icon', function(key) {
|
|
3
|
+
hexo.extend.helper.register('icon', function(key, args) {
|
|
4
4
|
const { icons } = hexo.theme.config
|
|
5
5
|
var result = ''
|
|
6
6
|
if (icons[key]) {
|
|
@@ -9,7 +9,7 @@ hexo.extend.helper.register('icon', function(key) {
|
|
|
9
9
|
result = key
|
|
10
10
|
}
|
|
11
11
|
if (result.startsWith('/') || result.startsWith('https://') || result.startsWith('http://')) {
|
|
12
|
-
return `<img src="${result}" />`
|
|
12
|
+
return `<img ${args?.length > 0 ? args : ''} src="${result}" />`
|
|
13
13
|
} else {
|
|
14
14
|
return result
|
|
15
15
|
}
|
package/scripts/tags/lib/link.js
CHANGED
|
@@ -45,10 +45,10 @@ module.exports = ctx => function(args) {
|
|
|
45
45
|
return '<span class="title">' + (args.title || args.url) + '</span>'
|
|
46
46
|
}
|
|
47
47
|
function loadDesc() {
|
|
48
|
-
return '<span class="cap desc
|
|
48
|
+
return '<span class="cap desc footnote"></span>'
|
|
49
49
|
}
|
|
50
50
|
function loadLink() {
|
|
51
|
-
return '<span class="cap link
|
|
51
|
+
return '<span class="cap link footnote">' + full_url_for(args.url) + '</span>'
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (args.desc) {
|
package/scripts/tags/lib/note.js
CHANGED
|
@@ -25,7 +25,8 @@ img
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
li
|
|
28
|
-
|
|
28
|
+
--fsp: var(--fsp1)
|
|
29
|
+
font-size: var(--fsp)
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
ul,ol
|
|
@@ -40,7 +41,8 @@ table:not([class])
|
|
|
40
41
|
margin: 1rem 0
|
|
41
42
|
max-width: 100%
|
|
42
43
|
vertical-align: text-top
|
|
43
|
-
|
|
44
|
+
--fsp: var(--fsp2)
|
|
45
|
+
font-size: var(--fsp)
|
|
44
46
|
th
|
|
45
47
|
background: var(--block)
|
|
46
48
|
td,th
|
|
@@ -26,34 +26,36 @@ a[onclick]:hover
|
|
|
26
26
|
cursor: pointer
|
|
27
27
|
|
|
28
28
|
a.button.start.gradient
|
|
29
|
-
transition: 0.38s ease-out
|
|
30
29
|
position relative
|
|
31
|
-
|
|
32
|
-
background: convert(hexo-config('style.gradient.start'))
|
|
33
|
-
background-size: 1000%
|
|
34
|
-
color: white
|
|
35
|
-
text-shadow: 0 0 1px rgba(0,0,0,0.12)
|
|
36
|
-
animation: glow 60s linear infinite
|
|
37
|
-
@keyframes glow {
|
|
38
|
-
from {
|
|
39
|
-
background-position: 0%
|
|
40
|
-
}
|
|
41
|
-
to {
|
|
42
|
-
background-position: 1000%
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
&:after
|
|
46
|
-
content: ''
|
|
47
|
-
position absolute
|
|
48
|
-
left: 0
|
|
49
|
-
right: 0
|
|
50
|
-
top: 0
|
|
51
|
-
bottom: 0
|
|
52
|
-
border-radius: 100px
|
|
53
|
-
background: inherit
|
|
54
|
-
z-index -1
|
|
55
|
-
filter: blur(36px)
|
|
30
|
+
@media (prefers-color-scheme: dark)
|
|
56
31
|
transition: 0.38s ease-out
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
32
|
+
z-index: 0
|
|
33
|
+
background: convert(hexo-config('style.gradient.start'))
|
|
34
|
+
background-size: 1000%
|
|
35
|
+
color: white
|
|
36
|
+
text-shadow: 0 0 1px rgba(0,0,0,0.12)
|
|
37
|
+
animation: glow 60s linear infinite
|
|
38
|
+
@keyframes glow {
|
|
39
|
+
from {
|
|
40
|
+
background-position: 0%
|
|
41
|
+
}
|
|
42
|
+
to {
|
|
43
|
+
background-position: 1000%
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
&:after
|
|
47
|
+
content: ''
|
|
48
|
+
position absolute
|
|
49
|
+
left: 0
|
|
50
|
+
right: 0
|
|
51
|
+
top: 0
|
|
52
|
+
bottom: 0
|
|
53
|
+
border-radius: 100px
|
|
54
|
+
background: inherit
|
|
55
|
+
z-index -1
|
|
56
|
+
filter: blur(12px)
|
|
57
|
+
opacity: 0.5
|
|
58
|
+
transition: 0.38s ease-out
|
|
59
|
+
&:hover:after
|
|
60
|
+
filter: blur(36px)
|
|
61
|
+
opacity 1
|
|
@@ -15,15 +15,16 @@ h6
|
|
|
15
15
|
font-size: $fs-h6
|
|
16
16
|
|
|
17
17
|
// 次级段落字号
|
|
18
|
+
.fs15
|
|
19
|
+
--fsp: $fs-15
|
|
20
|
+
font-size: var(--fsp)
|
|
18
21
|
.fs14
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.fs12
|
|
26
|
-
font-size: $fs-12
|
|
22
|
+
--fsp: $fs-14
|
|
23
|
+
font-size: var(--fsp)
|
|
24
|
+
|
|
25
|
+
.footnote
|
|
26
|
+
--fsp: $fs-13
|
|
27
|
+
font-size: var(--fsp)
|
|
27
28
|
|
|
28
29
|
.widgets
|
|
29
30
|
.post-title
|
package/source/css/_custom.styl
CHANGED
|
@@ -65,10 +65,14 @@ $border-button = 4px
|
|
|
65
65
|
:root
|
|
66
66
|
--width-left: 288px
|
|
67
67
|
--width-main: 720px
|
|
68
|
-
--fs-
|
|
68
|
+
--fs-body: $fs-body
|
|
69
|
+
--fsp: var(--fs-body)
|
|
70
|
+
--fsp1: 'calc(%s - 1px)' % var(--fsp)
|
|
71
|
+
--fsp2: 'calc(%s - 2px)' % var(--fsp)
|
|
72
|
+
--fsp3: 'calc(%s - 3px)' % var(--fsp)
|
|
69
73
|
--gap-l: 16px
|
|
70
|
-
--gap-p:
|
|
71
|
-
--gap-p-compact: 0.
|
|
74
|
+
--gap-p: 'calc(%s + 4px)' % $fs-body // gap for paragraph
|
|
75
|
+
--gap-p-compact: 'calc(%s * 0.75)' % $fs-body
|
|
72
76
|
// desktop 2k or larger
|
|
73
77
|
@media screen and (min-width: $device-2k)
|
|
74
78
|
--gap-l: 32px
|
|
@@ -87,7 +91,7 @@ $border-button = 4px
|
|
|
87
91
|
|
|
88
92
|
// 文章布局风格
|
|
89
93
|
.l_body.story
|
|
90
|
-
--
|
|
94
|
+
--fsp: 'calc(%s + 2px)' % $fs-body
|
|
91
95
|
--gap-p: 1.5rem
|
|
92
96
|
.tag-plugin,p>img
|
|
93
97
|
margin-top: 2.4rem
|