hexo-theme-solitude 1.6.0 → 1.7.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 +1 -1
- package/README_zh-cn.md +1 -1
- package/README_zh-tw.md +1 -1
- package/SECURITY.md +5 -5
- package/_config.yml +50 -51
- package/languages/en.yml +59 -63
- package/languages/zh-CN.yml +52 -55
- package/languages/zh-TW.yml +52 -55
- package/layout/404.pug +1 -1
- package/layout/category.pug +1 -1
- package/layout/includes/console.pug +13 -12
- package/layout/includes/footer.pug +6 -6
- package/layout/includes/head/config.pug +70 -38
- package/layout/includes/head/opengraph.pug +2 -2
- package/layout/includes/head/pwa.pug +6 -6
- package/layout/includes/head.pug +1 -1
- package/layout/includes/inject/body.pug +7 -7
- package/layout/includes/inject/head.pug +35 -1
- package/layout/includes/keyboard.pug +1 -1
- package/layout/includes/nav.pug +1 -1
- package/layout/includes/sidebar.pug +19 -3
- package/layout/includes/widgets/home/categoryBar.pug +2 -2
- package/layout/includes/widgets/home/postList.pug +4 -4
- package/layout/includes/widgets/home/topGroup.pug +2 -2
- package/layout/includes/widgets/nav/group.pug +2 -2
- package/layout/includes/widgets/nav/right.pug +1 -1
- package/layout/includes/widgets/page/about/award.pug +8 -9
- package/layout/includes/widgets/page/about/hobbies.pug +1 -1
- package/layout/includes/widgets/page/about/other.pug +1 -1
- package/layout/includes/widgets/page/banner.pug +1 -1
- package/layout/includes/widgets/page/links/banner.pug +5 -4
- package/layout/includes/widgets/page/moments/angle.pug +1 -1
- package/layout/includes/widgets/post/award.pug +10 -15
- package/layout/includes/widgets/post/copyright.pug +2 -2
- package/layout/includes/widgets/post/postMeta.pug +17 -10
- package/layout/includes/widgets/randomlink.pug +3 -2
- package/layout/includes/widgets/third-party/comments/comment.pug +5 -7
- package/layout/includes/widgets/third-party/comments/twikoo.pug +1 -0
- package/layout/includes/widgets/third-party/comments/valine.pug +44 -0
- package/layout/includes/widgets/third-party/comments/waline.pug +40 -11
- package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +5 -3
- package/layout/includes/widgets/third-party/news-comment/twikoo.pug +12 -10
- package/layout/includes/widgets/third-party/news-comment/valine.pug +79 -0
- package/layout/includes/widgets/third-party/news-comment/waline.pug +25 -20
- package/layout/page.pug +3 -0
- package/layout/tag.pug +1 -1
- package/package.json +1 -1
- package/plugins.yml +15 -3
- package/scripts/event/cdn.js +9 -9
- package/scripts/event/init.js +4 -2
- package/scripts/event/merge_config.js +15 -6
- package/scripts/helper/related_post.js +2 -2
- package/scripts/tags/tabs.js +1 -1
- package/source/css/_comments/{index.styl → comment.styl} +15 -22
- package/source/css/_comments/twikoo.styl +3 -0
- package/source/css/_comments/valine.styl +245 -0
- package/source/css/_global/index.styl +3 -0
- package/source/css/_highlight/highlight/index.styl +1 -1
- package/source/css/_highlight/prismjs/line-number.styl +1 -1
- package/source/css/_layout/article-sort.styl +1 -1
- package/source/css/_layout/aside.styl +3 -3
- package/source/css/_layout/console.styl +7 -6
- package/source/css/_layout/footer.styl +1 -0
- package/source/css/_layout/header.styl +2 -0
- package/source/css/_layout/sidebar.styl +30 -20
- package/source/css/_page/_home/home-top.styl +1 -1
- package/source/css/_page/_home/recent-post.styl +2 -2
- package/source/css/_page/index.styl +1 -4
- package/source/css/_page/links.styl +5 -5
- package/source/css/_post/content.styl +26 -7
- package/source/css/_post/tools.styl +3 -9
- package/source/css/index.styl +1 -3
- package/source/img/flower.gif +0 -0
- package/source/js/{comment/twikoo_commentBarrage.js → commentBarrage/twikoo.js} +4 -10
- package/source/js/commentBarrage/valine.js +156 -0
- package/source/js/{comment/waline_commentBarrage.js → commentBarrage/waline.js} +3 -5
- package/source/js/main.js +92 -96
- package/source/js/third_party/efu_ai.min.js +6 -0
- package/source/js/utils.js +15 -2
- package/layout/includes/widgets/rightside/index.pug +0 -87
- package/source/css/_comments/waline.styl +0 -455
- package/source/js/rightside.js +0 -221
- package/source/js/third_party/sco-ai.min.js +0 -8
@@ -1,14 +1,15 @@
|
|
1
1
|
div#console
|
2
2
|
div.close-btn(onclick="sco.hideConsole()")
|
3
3
|
i.solitude.st-close-fill
|
4
|
-
if theme.
|
4
|
+
if theme.console_plus
|
5
5
|
div.console-card-group
|
6
|
-
|
7
|
-
div.console-card
|
8
|
-
div.card-
|
9
|
-
div.
|
10
|
-
|
11
|
-
|
6
|
+
if theme.console_plus && theme.comment.newest_comment.enable
|
7
|
+
div.console-card-group-left
|
8
|
+
div.console-card#card-newest-comments(onclick="sco.hideConsole()")
|
9
|
+
div.card-content
|
10
|
+
div.author-content-item-tips= _p('console.comment_tip')
|
11
|
+
div.author-content-item-title= _p('console.comment_title')
|
12
|
+
div.aside-list
|
12
13
|
|
13
14
|
div.console-card-group-right
|
14
15
|
div.console-card.tags(onclick="sco.hideConsole()")
|
@@ -25,21 +26,21 @@ div#console
|
|
25
26
|
|
26
27
|
div.button-group
|
27
28
|
div.console-btn-item
|
28
|
-
|
29
|
+
span.darkmode_switchbutton(onclick="sco.switchDarkMode()", title=_p('console.switch_darkmode'))
|
29
30
|
i.solitude.st-moon-clear-fill
|
30
31
|
div.console-btn-item#consoleHideAside
|
31
|
-
|
32
|
+
span.asideSwitch(onclick="sco.switchHideAside()", title=_p('console.switch_hideAside'))
|
32
33
|
i.solitude.st-side-bar-fill
|
33
34
|
if theme.keyboard.enable
|
34
35
|
div.console-btn-item#consoleKeyboard(onclick="sco.switchKeyboard()")
|
35
|
-
|
36
|
+
span.keyboardSwitch(title=_p('console.switch_keyboard'))
|
36
37
|
i.solitude.st-keyboard-box-fill
|
37
38
|
if theme.capsule.enable
|
38
39
|
div.console-btn-item#consoleMusic(onclick="sco.musicToggle()")
|
39
|
-
|
40
|
+
span.music-switch(title=_p('console.switch_music'))
|
40
41
|
i.solitude.st-disc-fill
|
41
42
|
if theme.comment.enable && theme.comment.commentBarrage
|
42
43
|
div.console-btn-item.on#consoleCommentBarrage(onclick="sco.switchCommentBarrage()")
|
43
|
-
|
44
|
+
span.commentBarrage
|
44
45
|
i.solitude.st-chat-fill
|
45
46
|
div.console-mask(onclick="sco.hideConsole()")
|
@@ -7,7 +7,7 @@ div#st-footer-bar
|
|
7
7
|
else if theme.site.name.class === 'text'
|
8
8
|
span.solitude= theme.site.name.custom
|
9
9
|
div.footer-bar-description= __('footer.description').replace(/\$\{title}/, config.title + " - " + config.subtitle)
|
10
|
-
a.footer-bar-link(href=
|
10
|
+
a.footer-bar-link(href=url_for('/'))= __('footer.learnmore')
|
11
11
|
div#footer_deal
|
12
12
|
- var leftInfo = theme.footer && theme.footer.information && theme.footer.information.left || {}
|
13
13
|
- var rightInfo = theme.footer && theme.footer.information && theme.footer.information.right || {}
|
@@ -38,7 +38,7 @@ div#st-footer
|
|
38
38
|
div.footer-group
|
39
39
|
div.footer-title-group
|
40
40
|
h3.footer-title= _p('footer.randomlink')
|
41
|
-
|
41
|
+
button.random-friends-btn(onclick='randomLinksList()', title=_p('footer.randomlink'))
|
42
42
|
i.solitude.st-refresh-line
|
43
43
|
div.footer-links#friend-links-in-footer
|
44
44
|
div#footer-bar
|
@@ -46,14 +46,14 @@ div#footer-bar
|
|
46
46
|
div.footer-bar-left
|
47
47
|
if moment(theme.aside.siteinfo.runtime).year() === new Date().getFullYear()
|
48
48
|
div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} By
|
49
|
-
a.footer-bar-link(href="/")= config.author
|
49
|
+
a.footer-bar-link(href=url_for("/"))= config.author
|
50
50
|
else
|
51
51
|
div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By
|
52
|
-
a.footer-bar-link(href="/")= config.author
|
52
|
+
a.footer-bar-link(href=url_for("/"))= config.author
|
53
53
|
div.footer-bar-right
|
54
54
|
each item in theme.footer.links
|
55
55
|
a.footer-bar-link(href=url_for(item.url), title=item.name)= item.name
|
56
|
-
a.footer-bar-link.cc(href=theme.footer.license)
|
56
|
+
a.footer-bar-link.cc(href=url_for(theme.footer.license), aria-label = 'copyright')
|
57
57
|
i.solitude.st-copyright-line
|
58
58
|
i.solitude.st-creative-commons-by-line
|
59
59
|
i.solitude.st-creative-commons-nc-line
|
@@ -63,7 +63,7 @@ if theme.footer.privacy
|
|
63
63
|
div.cookies-window-title= __('cookies.title')
|
64
64
|
div.cookies-window-content
|
65
65
|
span.cookies-tip= __('cookies.tip')
|
66
|
-
a.cookies-link(href=theme.footer.privacy, title=_p('cookies.privacy'))
|
66
|
+
a.cookies-link(href=url_for(theme.footer.privacy), title=_p('cookies.privacy'))
|
67
67
|
i.solitude.st-right-btn-fill
|
68
68
|
if theme.comment.enable && theme.comment.commentBarrage
|
69
69
|
div.comment-barrage.needEndHide
|
@@ -22,17 +22,69 @@
|
|
22
22
|
}
|
23
23
|
}
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
const sayhello2 = theme.aside.card.sayhello2.map(item => `"${item}"`) || [];
|
26
|
+
|
27
|
+
let comment = false
|
28
|
+
|
29
|
+
if (theme.comment.type === 'twikoo') {
|
30
|
+
comment = JSON.stringify({
|
31
|
+
avatar: theme.comment.avatar,
|
32
|
+
url: theme.comment.twikoo.envId,
|
33
|
+
commentBarrage: theme.comment.enable,
|
34
|
+
accessToken: theme.comment.twikoo.accessToken,
|
35
|
+
owo: {
|
36
|
+
body: '.OwO-body',
|
37
|
+
item: '.OwO-items li'
|
38
|
+
}
|
39
|
+
})
|
31
40
|
}
|
32
41
|
|
33
|
-
|
34
|
-
|
35
|
-
|
42
|
+
if (theme.comment.type === 'waline') {
|
43
|
+
comment = JSON.stringify({
|
44
|
+
avatar: theme.comment.avatar,
|
45
|
+
url: theme.comment.waline.envId,
|
46
|
+
commentBarrage: theme.comment.enable,
|
47
|
+
owo: {
|
48
|
+
body: '.wl-emoji-popup',
|
49
|
+
item: '.wl-tab-wrapper button'
|
50
|
+
}
|
51
|
+
})
|
52
|
+
}
|
53
|
+
|
54
|
+
if (theme.comment.type === 'valine') {
|
55
|
+
comment = JSON.stringify({
|
56
|
+
avatar: theme.comment.avatar,
|
57
|
+
url: theme.comment.valine.serverURLs,
|
58
|
+
commentBarrage: theme.comment.enable,
|
59
|
+
appId: theme.comment.valine.appId,
|
60
|
+
appKey: theme.comment.valine.appKey,
|
61
|
+
owo: {
|
62
|
+
body: '.vwrap',
|
63
|
+
item: '.vemojis i'
|
64
|
+
}
|
65
|
+
})
|
66
|
+
}
|
67
|
+
|
68
|
+
let post_ai = false
|
69
|
+
|
70
|
+
if (theme.post_ai.enable) {
|
71
|
+
post_ai = JSON.stringify({
|
72
|
+
key: theme.post_ai.key,
|
73
|
+
talk: theme.post_ai.talk,
|
74
|
+
randomPost: theme.post_ai.randomPost,
|
75
|
+
})
|
76
|
+
}
|
77
|
+
|
78
|
+
let copyright = false;
|
79
|
+
if (theme.copy.enable && theme.copy.copyright.enable) {
|
80
|
+
copyright = JSON.stringify({
|
81
|
+
limit: theme.copy.copyright.limit,
|
82
|
+
author: _p("copy_copyright.author") + ': ' + config.author,
|
83
|
+
link: _p("copy_copyright.link") + ': ',
|
84
|
+
source: _p("copy_copyright.source") + ': ' + config.title,
|
85
|
+
info: _p("copy_copyright.info")
|
86
|
+
})
|
87
|
+
}
|
36
88
|
|
37
89
|
script.
|
38
90
|
const GLOBAL_CONFIG = {
|
@@ -44,6 +96,7 @@ script.
|
|
44
96
|
enable: !{theme.lazyload.enable},
|
45
97
|
error: '!{theme.lazyload.errorimg}'
|
46
98
|
},
|
99
|
+
copyright: !{copyright},
|
47
100
|
highlight: {
|
48
101
|
enable: !{theme.highlight.enable},
|
49
102
|
limit: !{theme.highlight.limit},
|
@@ -51,7 +104,7 @@ script.
|
|
51
104
|
copy: !{theme.highlight.copy},
|
52
105
|
syntax: '!{config.syntax_highlighter}'
|
53
106
|
},
|
54
|
-
|
107
|
+
randomlink: !{theme.footer.randomlink},
|
55
108
|
lang: {
|
56
109
|
theme: {
|
57
110
|
dark: '!{_p('theme.dark')}',
|
@@ -80,7 +133,11 @@ script.
|
|
80
133
|
chs: {
|
81
134
|
chs_to_cht: '!{_p('chs.chs_tw')}',
|
82
135
|
cht_to_chs: '!{_p('chs.chs_cn')}',
|
83
|
-
}
|
136
|
+
},
|
137
|
+
barrage: {
|
138
|
+
title: '!{_p('commentBarrage.title')}',
|
139
|
+
},
|
140
|
+
f12: '!{_p('f12')}',
|
84
141
|
},
|
85
142
|
aside: {
|
86
143
|
sayhello: {
|
@@ -95,32 +152,7 @@ script.
|
|
95
152
|
covercolor: {
|
96
153
|
enable: !{theme.post.covercolor.enable}
|
97
154
|
},
|
98
|
-
comment: {
|
99
|
-
enable: !{theme.comment.enable},
|
100
|
-
type: '!{theme.comment.type}',
|
101
|
-
commentBarrage: !{theme.comment.commentBarrage && theme.comment.enable},
|
102
|
-
randomInfoStart: [!{commentInfoStart}],
|
103
|
-
randomInfoEnd: [!{commentInfoEnd}],
|
104
|
-
twikoo: {
|
105
|
-
url: '!{theme.comment.twikoo.envId}',
|
106
|
-
accessToken: '!{theme.comment.twikoo.accessToken}'
|
107
|
-
},
|
108
|
-
waline: {
|
109
|
-
url: '!{theme.comment.waline.envId}',
|
110
|
-
}
|
111
|
-
},
|
155
|
+
comment: !{comment},
|
112
156
|
lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
|
113
|
-
|
114
|
-
enable: !{theme.rightside.enable}
|
115
|
-
},
|
116
|
-
ai: {
|
117
|
-
enable: !{theme.post_ai.enable},
|
118
|
-
key: '!{theme.post_ai.key}',
|
119
|
-
talk: '!{theme.post_ai.talk}',
|
120
|
-
randomPost: !{theme.post_ai.randomPost},
|
121
|
-
},
|
122
|
-
music: {
|
123
|
-
enable: !{theme.music.enable},
|
124
|
-
},
|
125
|
-
translate: !{translate},
|
157
|
+
post_ai: !{post_ai}
|
126
158
|
};
|
@@ -1,10 +1,10 @@
|
|
1
|
-
if theme.
|
1
|
+
if theme.OpenGraph.enable
|
2
2
|
-
|
3
3
|
const coverVal = page.cover || theme.site.siteIcon
|
4
4
|
let ogOption = {
|
5
5
|
type: is_post() ? 'article' : 'website',
|
6
6
|
image: coverVal ? full_url_for(coverVal) : '',
|
7
|
-
...theme.
|
7
|
+
...theme.OpenGraph.options
|
8
8
|
}
|
9
9
|
-
|
10
10
|
!= open_graph(ogOption)
|
@@ -4,16 +4,16 @@ if theme.pwa.enable
|
|
4
4
|
if theme.pwa.theme_color
|
5
5
|
meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
|
6
6
|
if theme.pwa.mask_icon
|
7
|
-
link(rel="mask-icon", href=theme.pwa.mask_icon, color=theme.pwa.theme_color)
|
7
|
+
link(rel="mask-icon", href=url_for(theme.pwa.mask_icon), color=theme.pwa.theme_color)
|
8
8
|
if theme.pwa.apple_touch_icon
|
9
9
|
link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.pwa.apple_touch_icon))
|
10
10
|
if theme.pwa.favicon_16_16
|
11
|
-
link(rel="icon", type="image/png", sizes="16x16", href=theme.pwa.favicon_16_16)
|
11
|
+
link(rel="icon", type="image/png", sizes="16x16", href=url_for(theme.pwa.favicon_16_16))
|
12
12
|
if theme.pwa.favicon_32_32
|
13
|
-
link(rel="icon", type="image/png", sizes="32x32", href=theme.pwa.favicon_32_32)
|
13
|
+
link(rel="icon", type="image/png", sizes="32x32", href=url_for(theme.pwa.favicon_32_32))
|
14
14
|
if theme.pwa.bookmark_icon
|
15
|
-
link(rel="bookmark", href=theme.pwa.bookmark_icon)
|
15
|
+
link(rel="bookmark", href=url_for(theme.pwa.bookmark_icon))
|
16
16
|
else
|
17
17
|
meta(name="apple-mobile-web-app-capable", content=config.title)
|
18
|
-
link(rel="bookmark", href=theme.site.siteIcon)
|
19
|
-
link(rel="apple-touch-icon", href=theme.site.siteIcon, sizes="180x180")
|
18
|
+
link(rel="bookmark", href=url_for(theme.site.siteIcon))
|
19
|
+
link(rel="apple-touch-icon", href=url_for(theme.site.siteIcon), sizes="180x180")
|
package/layout/includes/head.pug
CHANGED
@@ -17,7 +17,7 @@ meta(name="viewport" content="width=device-width, initial-scale=1")
|
|
17
17
|
|
18
18
|
title= title + subtitle
|
19
19
|
noscript= _p('head.noscript')
|
20
|
-
link(rel="icon", href=theme.site.siteIcon)
|
20
|
+
link(rel="icon", href=url_for(theme.site.siteIcon))
|
21
21
|
|
22
22
|
// index.css
|
23
23
|
link(rel="stylesheet", href=url_for(theme.cdn.main_css))
|
@@ -14,16 +14,16 @@ div
|
|
14
14
|
script(src=url_for(theme.cdn.main))
|
15
15
|
script(src=url_for(theme.cdn.utils))
|
16
16
|
|
17
|
+
if theme.comment.enable && theme.comment.type === 'valine'
|
18
|
+
// md5
|
19
|
+
script(src=url_for(theme.cdn.blueimp_md5))
|
20
|
+
|
17
21
|
// lately
|
18
22
|
script(src=url_for(theme.cdn.lately_js))
|
19
23
|
|
20
24
|
if theme.mermaid
|
21
25
|
script(src=url_for(theme.cdn.mermaid_js))
|
22
26
|
|
23
|
-
if theme.rightside.enable
|
24
|
-
include ../widgets/rightside/index
|
25
|
-
script(src=url_for(theme.cdn.rightside_js))
|
26
|
-
|
27
27
|
if theme.display_mode.universe
|
28
28
|
script(src=url_for(theme.cdn.universe_js))
|
29
29
|
script.
|
@@ -51,7 +51,7 @@ div
|
|
51
51
|
script(src=url_for(theme.cdn.swiper_js))
|
52
52
|
|
53
53
|
if theme.post_ai.enable
|
54
|
-
script(src=url_for(theme.cdn.
|
54
|
+
script(src=url_for(theme.cdn.efu_ai))
|
55
55
|
|
56
56
|
if theme.capsule.enable || theme.music.enable
|
57
57
|
script(src=url_for(theme.cdn.aplayer_js))
|
@@ -78,14 +78,14 @@ div
|
|
78
78
|
case theme.comment.type
|
79
79
|
when 'twikoo'
|
80
80
|
script(src=url_for(theme.cdn.twikoo))
|
81
|
-
when 'waline'
|
82
|
-
script(src=url_for(theme.cdn.waline_js))
|
83
81
|
if theme.comment.commentBarrage
|
84
82
|
case theme.comment.type
|
85
83
|
when 'twikoo'
|
86
84
|
script(src=url_for(theme.cdn.twikoo_commentBarrage))
|
87
85
|
when 'waline'
|
88
86
|
script(src=url_for(theme.cdn.waline_commentBarrage))
|
87
|
+
when 'valine'
|
88
|
+
script(src=url_for(theme.cdn.valine_commentBarrage))
|
89
89
|
|
90
90
|
if theme.music.enable
|
91
91
|
script(src=url_for(theme.cdn.music_js))
|
@@ -73,11 +73,45 @@ script.
|
|
73
73
|
document.documentElement.classList.remove('hide-aside')
|
74
74
|
}
|
75
75
|
}
|
76
|
+
|
77
|
+
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
|
78
|
+
const link = document.createElement('link')
|
79
|
+
link.rel = 'stylesheet'
|
80
|
+
link.href = url
|
81
|
+
if (id) link.id = id
|
82
|
+
link.onerror = reject
|
83
|
+
link.onload = link.onreadystatechange = function () {
|
84
|
+
const loadState = this.readyState
|
85
|
+
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
|
86
|
+
link.onload = link.onreadystatechange = null
|
87
|
+
resolve()
|
88
|
+
}
|
89
|
+
document.head.appendChild(link)
|
90
|
+
})
|
91
|
+
|
92
|
+
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
|
93
|
+
const script = document.createElement('script')
|
94
|
+
script.src = url
|
95
|
+
script.async = true
|
96
|
+
script.onerror = reject
|
97
|
+
script.onload = script.onreadystatechange = function () {
|
98
|
+
const loadState = this.readyState
|
99
|
+
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
|
100
|
+
script.onload = script.onreadystatechange = null
|
101
|
+
resolve()
|
102
|
+
}
|
103
|
+
|
104
|
+
Object.keys(attr).forEach(key => {
|
105
|
+
script.setAttribute(key, attr[key])
|
106
|
+
})
|
107
|
+
|
108
|
+
document.head.appendChild(script)
|
109
|
+
})
|
76
110
|
}
|
77
111
|
)(window)
|
78
112
|
|
79
113
|
console.log(
|
80
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.
|
114
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.0",
|
81
115
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
82
116
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
83
117
|
"border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
|
package/layout/includes/nav.pug
CHANGED
@@ -5,7 +5,7 @@ nav#nav.show
|
|
5
5
|
.back-home-button(tabindex="-1")
|
6
6
|
i.back-home-button-icon.solitude.st-more-fill
|
7
7
|
include ./widgets/nav/group
|
8
|
-
a#site-name(href="/", title=_p('nav.site_name_title'))
|
8
|
+
a#site-name(href=url_for("/"), title=_p('nav.site_name_title'))
|
9
9
|
if theme.site.name.class === 'i_class'
|
10
10
|
i.solitude(class=theme.site.name.custom, style="font-size: 16px;")
|
11
11
|
else if theme.site.name.class === 'img'
|
@@ -1,14 +1,30 @@
|
|
1
1
|
div#sidebar(style="zoom: 1;")
|
2
2
|
div#menu-mask(style="display: none;")
|
3
3
|
div#sidebar-menus
|
4
|
-
|
4
|
+
.site-data
|
5
|
+
.data-item.is-center
|
6
|
+
.data-item-link
|
7
|
+
a(href=url_for('/archives/'))
|
8
|
+
.headline=_p('page.archives')
|
9
|
+
.length-num=site.posts.find({ parent: { $exists: false } }).length
|
10
|
+
.data-item.is-center
|
11
|
+
.data-item-link
|
12
|
+
a(href=url_for('/categories/'))
|
13
|
+
.headline=_p('page.category')
|
14
|
+
.length-num=site.categories.find({parent: {$exists: false}}).length
|
15
|
+
.data-item.is-center
|
16
|
+
.data-item-link
|
17
|
+
a(href=url_for('/tags/'))
|
18
|
+
.headline=_p('page.tag')
|
19
|
+
.length-num=site.tags.find({parent: {$exists: false}}).length
|
20
|
+
span.sidebar-menu-item-title= __('sidebar.function')
|
5
21
|
div.sidebar-menu-item
|
6
|
-
|
22
|
+
span.darkmode_switchbutton.menu-child(onclick="sco.switchDarkMode()")
|
7
23
|
i.solitude.st-moon-clear-fill
|
8
24
|
span= __('sidebar.darkmode')
|
9
25
|
include ./widgets/nav/group
|
10
26
|
include ./widgets/nav/menu.pug
|
11
|
-
span.sidebar-menu-item-title= __('
|
27
|
+
span.sidebar-menu-item-title= __('page.tag')
|
12
28
|
div.card-widget.card-tags.card-archives.card-webinfo.card-allinfo
|
13
29
|
div.card-tag-cloud
|
14
30
|
each tag in site.tags.find({ parent: { $exists: false } }).data
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.category-bar-items#category-bar-items
|
2
2
|
.category-bar-item(class=is_home() ? 'select' : '', id="category-bar-home")
|
3
|
-
a(href=
|
3
|
+
a(href=url_for('/'))= __('home.home')
|
4
4
|
each item in site.categories.find({ parent: { $exists: false } }).data
|
5
5
|
.category-bar-item(class=select ? (select === item.name ? 'select' : '') : '', id=item.name)
|
6
6
|
a(href=url_for(item.path))= item.name
|
@@ -8,4 +8,4 @@ div.category-bar-right
|
|
8
8
|
if site.categories.find({parent: {$exists: false}}).data.length > 10
|
9
9
|
.category-bar-next#category-bar-next(onclick="sco.scrollCategoryBarToRight()")
|
10
10
|
i.solitude.st-show-right-line
|
11
|
-
a.category-bar-more(href=
|
11
|
+
a.category-bar-more(href=url_for('/categories/'))= __('more')
|
@@ -8,14 +8,14 @@ mixin info
|
|
8
8
|
if post.sticky && is_home()
|
9
9
|
span.article-meta.sticky-warp
|
10
10
|
i.solitude.st-thumbtack-solid.sticky.orange
|
11
|
-
span.sticky.orange= _p('home.
|
11
|
+
span.sticky.orange= _p('home.sticky')
|
12
12
|
each category in post.categories.data
|
13
13
|
span.original= category.name
|
14
14
|
|
15
15
|
if post.prev == null && is_home()
|
16
|
-
span.original= _p('home.
|
16
|
+
span.original= _p('home.new')
|
17
17
|
|
18
|
-
a.unvisited-post(href=url_for(post.path))= _p('home.
|
18
|
+
a.unvisited-post(href=url_for(post.path))= _p('home.read')
|
19
19
|
|
20
20
|
a.article-title(href=url_for(post.path), title=post.title)= post.title
|
21
21
|
|
@@ -41,7 +41,7 @@ mixin info
|
|
41
41
|
div.article-meta-wrap
|
42
42
|
span.article-meta.tags
|
43
43
|
each tag in post.tags.data
|
44
|
-
a.article-meta__tags(href=tag.path, onclick="event.stopPropagation();")
|
44
|
+
a.article-meta__tags(href=url_for(tag.path), onclick="event.stopPropagation();")
|
45
45
|
span.tags-punctuation=tag.name
|
46
46
|
|
47
47
|
span.post-meta-date
|
@@ -3,7 +3,7 @@ each post in filteredPosts
|
|
3
3
|
.recent-post-item
|
4
4
|
.post_cover
|
5
5
|
a(href=url_for(post.path), title=post.title)
|
6
|
-
span.recent-post-top-text= _p('home.
|
6
|
+
span.recent-post-top-text= _p('home.recommend')
|
7
7
|
img.post_bg(alt=post.title, src=post.cover)
|
8
8
|
.recent-post-info
|
9
9
|
a.article-title(href=url_for(post.path), title=post.title)= post.title
|
@@ -16,7 +16,7 @@ mixin todayCardContent
|
|
16
16
|
.banner-button-group
|
17
17
|
a.banner-button(onclick="window.event.cancelBubble=true;sco.hideTodayCard();")
|
18
18
|
i.solitude.st-add-fill
|
19
|
-
span.banner-button-text= _p('home.
|
19
|
+
span.banner-button-text= _p('home.recommendmore')
|
20
20
|
|
21
21
|
case theme.hometop.recommendList.url.startsWith('/')
|
22
22
|
when true
|
@@ -7,7 +7,7 @@ if menu
|
|
7
7
|
.back-menu-list
|
8
8
|
each data, label in value
|
9
9
|
- var array = data.split('||')
|
10
|
-
a.back-menu-item(href=url_for(trim(array[0])), title=
|
10
|
+
a.back-menu-item(href=url_for(trim(array[0])), title=label)
|
11
11
|
if array[1]
|
12
|
-
img.nolazyload.back-menu-item-icon(src=trim(array[1]), alt=
|
12
|
+
img.nolazyload.back-menu-item-icon(src=trim(array[1]), alt=label)
|
13
13
|
span.back-menu-item-text= label
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- var custom = theme.nav.right.custom || []
|
2
2
|
each item in custom
|
3
3
|
.nav-button(id=item.id)
|
4
|
-
a.site-page(href=item.url || 'javascript:void(0);', onclick=item.onclick, title=item.title || '')
|
4
|
+
a.site-page(href=url_for(item.url) || 'javascript:void(0);', onclick=item.onclick, title=item.title || '')
|
5
5
|
i.solitude(class=item.icon || '')
|
6
6
|
if theme.nav.right.random
|
7
7
|
.nav-button#randomPost_button
|
@@ -4,8 +4,8 @@
|
|
4
4
|
if site.data.about.rewardList
|
5
5
|
.author-content
|
6
6
|
.author-content-item.single.reward
|
7
|
-
.author-content-item-tips= _p('award.
|
8
|
-
span.author-content-item-title= _p('award.
|
7
|
+
.author-content-item-tips= _p('award.thanks')
|
8
|
+
span.author-content-item-title= _p('award.title')
|
9
9
|
.author-content-item-description
|
10
10
|
= award.description
|
11
11
|
.reward-list-all
|
@@ -22,18 +22,17 @@ if site.data.about.rewardList
|
|
22
22
|
if theme.post.award.enable
|
23
23
|
.post-reward
|
24
24
|
.post-reward(onclick="AddRewardMask()")
|
25
|
-
.reward-button(title=_p('award.
|
25
|
+
.reward-button(title=_p('award.tipping'))
|
26
26
|
i.solitude.st-hand-heart-fill
|
27
|
-
= _p('award.
|
27
|
+
= _p('award.tipping')
|
28
28
|
.reward-main
|
29
29
|
ul.reward-all
|
30
|
-
span.reward-title=
|
30
|
+
span.reward-title= theme.post.award.title
|
31
31
|
ul.reward-group
|
32
|
-
- var rewards =
|
32
|
+
- var rewards = theme.post.award.list
|
33
33
|
each reward in rewards
|
34
34
|
li.reward-item
|
35
|
-
|
36
|
-
|
37
|
-
.post-qr-code-desc= reward.description
|
35
|
+
img.post-qr-code-img(alt=reward.name, src=reward.qcode, style="border-color:" + reward.color)
|
36
|
+
.post-qr-code-desc= reward.name
|
38
37
|
.reward-list-tips
|
39
38
|
p= award.tips.replace('{sum}', sum.toFixed(2))
|
@@ -10,6 +10,6 @@
|
|
10
10
|
if page.rightbtn
|
11
11
|
.banner-button-group
|
12
12
|
- const isInternalLink = page.rightbtnlink.startsWith('/')
|
13
|
-
a.banner-button(onclick=isInternalLink ? `pjax.loadUrl("${page.rightbtnlink}")
|
13
|
+
a.banner-button(onclick=isInternalLink ? `pjax.loadUrl("${page.rightbtnlink}")`: null, href=isInternalLink ? null : url_for(page.rightbtnlink), target=isInternalLink ? null : "_blank")
|
14
14
|
i.solitude.st-right-btn-fill
|
15
15
|
span.banner-button-text= page.rightbtn
|
@@ -6,10 +6,11 @@
|
|
6
6
|
if theme.footer.randomlink
|
7
7
|
a.banner-button.secondary(onclick="travelling()")
|
8
8
|
i.solitude.st-signal-tower-fill
|
9
|
-
span.banner-button-text
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
span.banner-button-text=_p('link.banner.random')
|
10
|
+
if theme.comment.enable
|
11
|
+
a.banner-button(onclick="sco.scrollToComment()")
|
12
|
+
i.solitude.st-right-btn-fill
|
13
|
+
span.solitude.banner-button-text=_p('link.banner.toComment')
|
13
14
|
|
14
15
|
.tags-group-all.nowrapMove
|
15
16
|
.tags-group-wrapper
|
@@ -1,24 +1,19 @@
|
|
1
1
|
.post-reward(onclick="AddRewardMask()")
|
2
|
-
.reward-button(title=
|
2
|
+
.reward-button(title=_p('award.tipping'))
|
3
3
|
i.solitude.st-hand-heart-fill
|
4
|
-
|
4
|
+
=_p('award.tipping')
|
5
5
|
.reward-main
|
6
6
|
ul.reward-all
|
7
|
-
span.reward-title
|
7
|
+
span.reward-title=theme.post.award.title
|
8
8
|
ul.reward-group
|
9
|
-
|
9
|
+
- let list = theme.post.award.list || []
|
10
|
+
for item in list
|
10
11
|
li.reward-item
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
a(href=theme.post.award.alipay target="_blank")
|
17
|
-
img.post-qr-code-img(src=theme.post.award.alipay alt="支付宝")
|
18
|
-
.post-qr-code-desc 支付宝
|
19
|
-
a.reward-main-btn(href=url_for(theme.post.award.url))
|
20
|
-
.reward-text 赞赏者名单
|
21
|
-
.reward-dec 因为你们的支持让我意识到写文章的价值🙏
|
12
|
+
img.post-qr-code-img.nolazyload(src=item.qcode, alt=item.name, style="border-color: " + item.color)
|
13
|
+
.post-qr-code-desc=item.name
|
14
|
+
a.reward-main-btn(href=url_for(theme.post.award.appreciators))
|
15
|
+
.reward-text= _p('award.title')
|
16
|
+
.reward-dec=theme.post.award.desc
|
22
17
|
|
23
18
|
script.
|
24
19
|
function RemoveRewardMask() {
|