hexo-theme-solitude 1.12.3 → 1.13.2
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/.github/persona.avif +0 -0
- package/.github/screenshot.avif +0 -0
- package/README.md +3 -3
- package/README_en-US.md +3 -3
- package/README_zh-Hant.md +3 -3
- package/_config.yml +52 -8
- package/languages/default.yml +1 -0
- package/languages/en.yml +1 -0
- package/languages/zh-CN.yml +1 -0
- package/languages/zh-TW.yml +1 -0
- package/layout/includes/console.pug +44 -26
- package/layout/includes/head/config.pug +20 -0
- package/layout/includes/header.pug +4 -2
- package/layout/includes/layout.pug +6 -1
- package/layout/includes/page/recentcomment.pug +6 -1
- package/layout/includes/widgets/home/banner.pug +15 -12
- package/layout/includes/widgets/home/hot/index.pug +7 -0
- package/layout/includes/widgets/home/hot/twikoo.pug +46 -0
- package/layout/includes/widgets/nav/right.pug +1 -1
- package/layout/includes/widgets/page/links/banner.pug +2 -1
- package/layout/includes/widgets/page/recentcomment/artalk.pug +5 -5
- package/layout/includes/widgets/page/recentcomment/twikoo.pug +5 -5
- package/layout/includes/widgets/page/recentcomment/valine.pug +5 -5
- package/layout/includes/widgets/page/recentcomment/waline.pug +5 -5
- package/layout/includes/widgets/post/postInfo.pug +80 -0
- package/layout/includes/widgets/post/postMeta.pug +1 -81
- package/layout/index.pug +2 -0
- package/layout/post.pug +6 -3
- package/package.json +1 -1
- package/scripts/event/merge_config.js +34 -1
- package/scripts/filter/checkThemeConfig.js +0 -5
- package/source/css/_comments/comment.styl +3 -4
- package/source/css/_global/index.styl +18 -2
- package/source/css/_layout/article-container.styl +4 -0
- package/source/css/_layout/console.styl +1 -1
- package/source/css/_layout/expire.styl +13 -0
- package/source/css/_layout/header.styl +14 -13
- package/source/css/_page/_home/home-top.styl +6 -0
- package/source/css/_page/_home/home.styl +4 -1
- package/source/css/_page/_home/hot-tip.styl +11 -0
- package/source/css/_page/index.styl +1 -1
- package/source/css/_page/links.styl +22 -1
- package/source/css/_page/other.styl +2 -0
- package/source/css/_page/recentcomment.styl +5 -2
- package/source/css/_post/copyright.styl +1 -1
- package/source/css/_post/meta.styl +196 -187
- package/source/css/_post/pagination.styl +2 -5
- package/source/css/_post/relatedPost.styl +1 -1
- package/source/css/_post/tools.styl +1 -1
- package/source/js/main.js +63 -15
- package/.github/logo.svg +0 -23
- package/.github/screenshot.webp +0 -0
Binary file
|
Binary file
|
package/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
5
|
-
<img src=".github/
|
5
|
+
<img src=".github/persona.avif" alt="Solitude logo" height="200">
|
6
6
|
|
7
7
|
<h1>Hexo Theme Solitude</h1>
|
8
8
|
|
@@ -31,11 +31,11 @@
|
|
31
31
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
32
32
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
33
33
|
|
34
|
-
[文档](https://solitude.js.org/)丨[预览](https://
|
34
|
+
[文档](https://solitude.js.org/)丨[预览](https://everfu.github.io/Solitude/)
|
35
35
|
|
36
36
|
</div>
|
37
37
|
|
38
|
-

|
39
39
|
|
40
40
|
## 特性
|
41
41
|
|
package/README_en-US.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
5
|
-
<img src=".github/
|
5
|
+
<img src=".github/persona.avif" alt="Solitude logo" height="200">
|
6
6
|
|
7
7
|
<h1>Hexo Theme Solitude</h1>
|
8
8
|
|
@@ -31,11 +31,11 @@
|
|
31
31
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
32
32
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
33
33
|
|
34
|
-
[Documentation](https://solitude.js.org/)丨[Preview](https://
|
34
|
+
[Documentation](https://solitude.js.org/)丨[Preview](https://everfu.github.io/Solitude/)
|
35
35
|
|
36
36
|
</div>
|
37
37
|
|
38
|
-

|
39
39
|
|
40
40
|
## Features
|
41
41
|
|
package/README_zh-Hant.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
5
|
-
<img src=".github/
|
5
|
+
<img src=".github/persona.avif" alt="Solitude logo" height="200">
|
6
6
|
|
7
7
|
<h1>Hexo Theme Solitude</h1>
|
8
8
|
|
@@ -31,11 +31,11 @@
|
|
31
31
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
32
32
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
33
33
|
|
34
|
-
[文档](https://solitude.js.org/)丨[預覽](https://
|
34
|
+
[文档](https://solitude.js.org/)丨[預覽](https://everfu.github.io/Solitude/)
|
35
35
|
|
36
36
|
</div>
|
37
37
|
|
38
|
-

|
39
39
|
|
40
40
|
## 特性
|
41
41
|
|
package/_config.yml
CHANGED
@@ -329,6 +329,7 @@ page:
|
|
329
329
|
# post default settings
|
330
330
|
post:
|
331
331
|
default:
|
332
|
+
top_cover: true # 顶部描述 / Top description
|
332
333
|
# 文章默认图片
|
333
334
|
# default cover
|
334
335
|
cover:
|
@@ -760,7 +761,7 @@ post_ai:
|
|
760
761
|
|
761
762
|
# latex 公式支持
|
762
763
|
# latex formula support
|
763
|
-
# docs: https://solitude.js.org/
|
764
|
+
# docs: https://solitude.js.org/config/extend.html#数学公式
|
764
765
|
katex:
|
765
766
|
enable: false
|
766
767
|
per_page: false # 是否在每页都加载 / Whether to load on each page
|
@@ -776,6 +777,9 @@ comment:
|
|
776
777
|
count: false # 评论数展示
|
777
778
|
pv: false # 是否使用評論統計頁面訪問
|
778
779
|
avatar: https://cravatar.cn # Gravatar link
|
780
|
+
hot_tip: # 多人互动
|
781
|
+
enable: false # 开启后将在文章列表显示多人互动
|
782
|
+
count: 3 # 设置大于多少评论时显示
|
779
783
|
|
780
784
|
# twikoo 配置信息
|
781
785
|
# twikoo settings
|
@@ -822,8 +826,15 @@ giscus:
|
|
822
826
|
dark: dark
|
823
827
|
option:
|
824
828
|
|
825
|
-
#
|
826
|
-
|
829
|
+
# 中控台
|
830
|
+
console:
|
831
|
+
enable: false # 开启后显示中控台
|
832
|
+
recentComment: # 开启后显示最近评论
|
833
|
+
enable: false # 开启前请先配置评论
|
834
|
+
storage: .2 # 缓存时间
|
835
|
+
card:
|
836
|
+
tags: true # 开启后显示 标签
|
837
|
+
archive: true # 开启后显示 归档
|
827
838
|
|
828
839
|
# 站点验证
|
829
840
|
# Site verification
|
@@ -862,7 +873,7 @@ extends:
|
|
862
873
|
|
863
874
|
# PWA
|
864
875
|
# https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps
|
865
|
-
# docs: https://solitude.js.org/
|
876
|
+
# docs: https://solitude.js.org/config/extra#pwa
|
866
877
|
pwa:
|
867
878
|
enable: false
|
868
879
|
manifest: /manifest.json # manifest.json 文件路径
|
@@ -931,11 +942,43 @@ memorial:
|
|
931
942
|
enable: false
|
932
943
|
# 日期, (M-D)
|
933
944
|
# Date, (M-D)
|
934
|
-
# eg: 7-
|
945
|
+
# eg: 7-7, 9-18, 12-13 ...
|
935
946
|
date:
|
936
|
-
- "7-
|
937
|
-
- "9-18"
|
938
|
-
- "12-13"
|
947
|
+
- "7-7" # 七七事变
|
948
|
+
- "9-18" # 九一八事变/建军节
|
949
|
+
- "12-13" # 南京国家公祭日
|
950
|
+
|
951
|
+
# 诱骗
|
952
|
+
# lure
|
953
|
+
lure:
|
954
|
+
enable: false
|
955
|
+
# 跳出
|
956
|
+
# Jump out
|
957
|
+
jump: "404 Not Found"
|
958
|
+
# 切回
|
959
|
+
# Switch back
|
960
|
+
back: "ヾ(≧∇≦*)ゝ嘿嘿,上当了吧"
|
961
|
+
|
962
|
+
# 文章过期提醒
|
963
|
+
# Article expiration reminder
|
964
|
+
expire:
|
965
|
+
enable: false
|
966
|
+
# 过期时间
|
967
|
+
# Expiration time
|
968
|
+
time: 30
|
969
|
+
position: top # top / bottom
|
970
|
+
# 过期提示
|
971
|
+
# Expiration prompt
|
972
|
+
text_prev: "本文已于"
|
973
|
+
text_next: "天前过期,如果内容不符,请联系站长更新。"
|
974
|
+
|
975
|
+
# 背景图片
|
976
|
+
# Background image
|
977
|
+
background:
|
978
|
+
enable: false
|
979
|
+
opacity: .2
|
980
|
+
dark: https://bu.dusays.com/2023/09/29/651685ce667d1.jpg
|
981
|
+
light: https://bu.dusays.com/2023/09/29/651685cc18d39.jpg
|
939
982
|
|
940
983
|
# CDN
|
941
984
|
# Don't modify the following settings unless you know how they work
|
@@ -958,6 +1001,7 @@ CDN:
|
|
958
1001
|
|
959
1002
|
option:
|
960
1003
|
solitude_css: https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css
|
1004
|
+
busuanzi_qj_js: https://pv.lemonso.com/js
|
961
1005
|
# algolia_search:
|
962
1006
|
# instantsearch:
|
963
1007
|
# pjax:
|
package/languages/default.yml
CHANGED
package/languages/en.yml
CHANGED
package/languages/zh-CN.yml
CHANGED
package/languages/zh-TW.yml
CHANGED
@@ -1,33 +1,51 @@
|
|
1
|
+
- const { recentComment, card } = theme.console
|
2
|
+
- const { cache } = recentComment
|
3
|
+
- const limit = 6
|
4
|
+
- const { use } = theme.comment
|
5
|
+
|
1
6
|
div#console
|
2
7
|
div.close-btn(onclick="sco.hideConsole()")
|
3
8
|
i.solitude.st-close-fill
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
div.console-card-
|
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
|
12
|
-
| #{_p('console.comment_title')}
|
13
|
-
if theme.recent_comments.enable
|
14
|
-
a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more'))
|
15
|
-
i.solitude.st-right-btn-fill
|
16
|
-
a.recent-comment-image(href=url_for(theme.recent_comments.page))
|
17
|
-
img(src=theme.recent_comments.img)
|
18
|
-
|
19
|
-
div.console-card-group-right
|
20
|
-
div.console-card.tags(onclick="sco.hideConsole()")
|
9
|
+
div.console-card-group
|
10
|
+
if use && recentComment.enable
|
11
|
+
div.console-card-group-left
|
12
|
+
div.console-card#card-newest-comments(onclick="sco.hideConsole()")
|
21
13
|
div.card-content
|
22
|
-
div.author-content-item-tips= _p('console.
|
23
|
-
div.author-content-item-title
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
14
|
+
div.author-content-item-tips= _p('console.comment_tip')
|
15
|
+
div.author-content-item-title
|
16
|
+
| #{_p('console.comment_title')}
|
17
|
+
if theme.recent_comments.enable
|
18
|
+
a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more'))
|
19
|
+
i.solitude.st-right-btn-fill
|
20
|
+
.console_recentcomments
|
21
|
+
- var sel = '.console-card .console_recentcomments'
|
22
|
+
case use[0]
|
23
|
+
when 'Twikoo'
|
24
|
+
- var str_name = 'twikoo-recent-comments-console'
|
25
|
+
include ./widgets/page/recentcomment/twikoo
|
26
|
+
when 'Valine'
|
27
|
+
- var str_name = 'valine-recent-comments-console'
|
28
|
+
include ./widgets/page/recentcomment/valine
|
29
|
+
when 'Waline'
|
30
|
+
- var str_name = 'waline-recent-comments-console'
|
31
|
+
include ./widgets/page/recentcomment/waline
|
32
|
+
when 'Artalk'
|
33
|
+
- var str_name = 'artalk-recent-comments-console'
|
34
|
+
include ./widgets/page/recentcomment/artalk
|
35
|
+
if card.tags || card.archive
|
36
|
+
div.console-card-group-right
|
37
|
+
if card.tags
|
38
|
+
div.console-card.tags(onclick="sco.hideConsole()")
|
39
|
+
div.card-content
|
40
|
+
div.author-content-item-tips= _p('console.tag_tip')
|
41
|
+
div.author-content-item-title= _p('console.tag_title')
|
42
|
+
div.card-tag-cloud
|
43
|
+
each tag in site.tags.find({ parent: { $exists: false } }).data
|
44
|
+
a(href=url_for(tag.path))= tag.name
|
45
|
+
sup= tag.length
|
46
|
+
if card.archive
|
47
|
+
div.console-card.history(onclick="sco.hideConsole()")
|
48
|
+
include ./widgets/aside/asideArchive.pug
|
31
49
|
|
32
50
|
div.button-group
|
33
51
|
div.console-btn-item
|
@@ -132,6 +132,24 @@
|
|
132
132
|
}
|
133
133
|
}
|
134
134
|
|
135
|
+
let lure = false
|
136
|
+
if (theme.lure.enable) {
|
137
|
+
lure = {
|
138
|
+
jump: theme.lure.jump,
|
139
|
+
back: theme.lure.back,
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
let expire = false
|
144
|
+
if (theme.expire.enable) {
|
145
|
+
expire = {
|
146
|
+
time: theme.expire.time,
|
147
|
+
position: theme.expire.position,
|
148
|
+
text_prev: theme.expire.text_prev,
|
149
|
+
text_next: theme.expire.text_next,
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
135
153
|
script.
|
136
154
|
const GLOBAL_CONFIG = {
|
137
155
|
root: '!{config.root}',
|
@@ -167,4 +185,6 @@ script.
|
|
167
185
|
lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
|
168
186
|
post_ai: !{post_ai},
|
169
187
|
right_menu: !{rightMenu ? JSON.stringify(rightMenu) : false},
|
188
|
+
lure: !{lure ? JSON.stringify(lure) : false},
|
189
|
+
expire: !{expire ? JSON.stringify(expire) : false},
|
170
190
|
};
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
- const not_cover = !(typeof page.not_cover ==='undefined' ? false : page.not_cover)
|
2
|
+
header#page-header(class=is_post() && theme.post.default.top_cover && not_cover ? 'post-bg' : 'not-top-img')
|
2
3
|
include ./nav.pug
|
3
4
|
if is_post()
|
4
|
-
|
5
|
+
if theme.post.default.top_cover && !page.not_cover
|
6
|
+
include ./widgets/post/postMeta.pug
|
@@ -9,12 +9,17 @@ html(lang=config.language, data-theme="light")
|
|
9
9
|
if theme.display_mode.universe
|
10
10
|
canvas#universe
|
11
11
|
|
12
|
+
// background img
|
13
|
+
if theme.background.enable
|
14
|
+
#global_bg
|
15
|
+
|
12
16
|
// loading
|
13
17
|
if theme.loading.fullpage
|
14
18
|
include ./loading.pug
|
15
19
|
|
16
20
|
// console
|
17
|
-
|
21
|
+
if theme.console.enable
|
22
|
+
include ./console.pug
|
18
23
|
|
19
24
|
// sidebar
|
20
25
|
include ./sidebar.pug
|
@@ -4,13 +4,18 @@
|
|
4
4
|
include ../widgets/page/banner
|
5
5
|
|
6
6
|
if enable && use
|
7
|
-
|
7
|
+
.console_recentcomments
|
8
|
+
- var sel = '#page .console_recentcomments'
|
8
9
|
case use[0]
|
9
10
|
when 'Twikoo'
|
11
|
+
- var str_name = 'twikoo-recent-comments'
|
10
12
|
include ../widgets/page/recentcomment/twikoo
|
11
13
|
when 'Valine'
|
14
|
+
- var str_name = 'valine-recent-comments'
|
12
15
|
include ../widgets/page/recentcomment/valine
|
13
16
|
when 'Waline'
|
17
|
+
- var str_name = 'waline-recent-comments'
|
14
18
|
include ../widgets/page/recentcomment/waline
|
15
19
|
when 'Artalk'
|
20
|
+
- var str_name = 'artalk-recent-comments'
|
16
21
|
include ../widgets/page/recentcomment/artalk
|
@@ -1,6 +1,8 @@
|
|
1
|
+
- const { title, url, icon} = theme.hometop.banner
|
2
|
+
|
1
3
|
div.banners-title
|
2
|
-
div.banners-title-big!=
|
3
|
-
div.banners-title-small=
|
4
|
+
div.banners-title-big!= title
|
5
|
+
div.banners-title-small= url
|
4
6
|
- var group = theme.hometop.group
|
5
7
|
if group
|
6
8
|
div.banners-links
|
@@ -11,13 +13,14 @@ if group
|
|
11
13
|
i.solitude(class=array[1])
|
12
14
|
.banners-link-title= label
|
13
15
|
|
14
|
-
|
15
|
-
.tags-group-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
if icon
|
17
|
+
div.tags-group-all
|
18
|
+
.tags-group-wrapper
|
19
|
+
each i in [1,2]
|
20
|
+
- var keys = Object.keys(icon)
|
21
|
+
- var pairs = keys.map((val, i) => i % 2 ? [keys[i - 1], val] : []).filter(x => x.length)
|
22
|
+
each pair in pairs
|
23
|
+
.tags-group-icon-pair
|
24
|
+
each key in pair
|
25
|
+
.tags-group-icon(style=`background: ${icon[key].color}`)
|
26
|
+
img.nolazyload(src=icon[key].img, title=key)
|
@@ -0,0 +1,46 @@
|
|
1
|
+
script.
|
2
|
+
function updatePostsBasedOnComments() {
|
3
|
+
const location = window.location
|
4
|
+
const posts = Array.from(document.querySelectorAll('.recent-post-item[onclick] .post_cover a')).map(item => item.href.replace(location, '/'))
|
5
|
+
|
6
|
+
function get() {
|
7
|
+
twikoo.getCommentsCount({
|
8
|
+
envId: "!{theme.twikoo.envId}",
|
9
|
+
urls: posts,
|
10
|
+
includeReply: true
|
11
|
+
}).then(function (response) {
|
12
|
+
response.forEach(function (comment) {
|
13
|
+
if (comment.count > !{count}) {
|
14
|
+
const postElement = document.querySelector(`.recent-post-item[onclick*="${comment.url}"]`);
|
15
|
+
if (postElement) {
|
16
|
+
const infoTopTips = postElement.querySelector(".recent-post-info-top-tips"),
|
17
|
+
originalSpan = infoTopTips ? infoTopTips.querySelector(".original") : null;
|
18
|
+
if (originalSpan) {
|
19
|
+
const hotTip = createHotTipElement();
|
20
|
+
infoTopTips.insertBefore(hotTip, originalSpan);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
});
|
25
|
+
}).catch(function (error) {
|
26
|
+
console.error("Error fetching comments:", error);
|
27
|
+
});
|
28
|
+
}
|
29
|
+
|
30
|
+
function createHotTipElement() {
|
31
|
+
const hotTip = document.createElement("span");
|
32
|
+
hotTip.classList.add("hot-tip");
|
33
|
+
|
34
|
+
const icon = document.createElement("i");
|
35
|
+
icon.classList.add("solitude", "st-fire-fill");
|
36
|
+
hotTip.appendChild(icon);
|
37
|
+
|
38
|
+
const commentCount = document.createTextNode("!{_p('hot-tip')}");
|
39
|
+
hotTip.appendChild(commentCount);
|
40
|
+
|
41
|
+
return hotTip;
|
42
|
+
}
|
43
|
+
|
44
|
+
if (typeof twikoo === 'object') get()
|
45
|
+
else utils.getScript('!{url_for(theme.cdn.twikoo)}').then(get)
|
46
|
+
}
|
@@ -11,7 +11,7 @@ if theme.search.enable
|
|
11
11
|
.nav-button#search-button
|
12
12
|
a.site-page.social-icon.search(href="javascript:void(0);", title=_p('nav.search'))
|
13
13
|
i.solitude.st-search-line
|
14
|
-
if theme.
|
14
|
+
if theme.console.enable
|
15
15
|
.nav-button#nav-console
|
16
16
|
a.console_switchbutton(onclick="sco.showConsole()", title=_p('nav.console'), href="javascript:void(0);")
|
17
17
|
i.solitude.st-dashboard-fill
|
@@ -28,4 +28,5 @@
|
|
28
28
|
.tags-group-icon-pair
|
29
29
|
each y in pair
|
30
30
|
a.tags-group-icon(href=url_for(y.link), title=y.name)
|
31
|
-
img(src=y.avatar + (site.data.links.banner_suffix || ''), title=y.name)
|
31
|
+
img(src=y.avatar + (site.data.links.banner_suffix || ''), title=y.name)
|
32
|
+
span.tags-group-title=y.name
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
script(pjax).
|
4
4
|
(async () => {
|
5
|
-
document.querySelector('
|
5
|
+
document.querySelector('!{sel}').textContent = `#{__("loading")}`
|
6
6
|
const emojiReg = /<img [^>]+ atk-emoticon="[^"]+">/g
|
7
|
-
let cache = utils.saveToLocal.get('
|
7
|
+
let cache = utils.saveToLocal.get('!{str_name}')
|
8
8
|
if (cache) {
|
9
|
-
setHtml(document.querySelector('
|
9
|
+
setHtml(document.querySelector('!{sel}'), cache)
|
10
10
|
return
|
11
11
|
}
|
12
12
|
let ls = []
|
@@ -37,8 +37,8 @@ script(pjax).
|
|
37
37
|
content: formatContent(i.content)
|
38
38
|
})
|
39
39
|
}
|
40
|
-
setHtml(document.querySelector('
|
41
|
-
utils.saveToLocal.set('
|
40
|
+
setHtml(document.querySelector('!{sel}'), ls)
|
41
|
+
utils.saveToLocal.set('!{str_name}', ls, !{cache})
|
42
42
|
})
|
43
43
|
|
44
44
|
function setHtml(el, data) {
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
script(pjax).
|
4
4
|
(async () => {
|
5
|
-
document.querySelector('
|
5
|
+
document.querySelector('!{sel}').textContent = `#{__("loading")}`
|
6
6
|
const emojiReg = /<img class="tk-owo-emotion" [^>]+>/g
|
7
|
-
let cache = utils.saveToLocal.get('
|
7
|
+
let cache = utils.saveToLocal.get('!{str_name}')
|
8
8
|
if (cache) {
|
9
|
-
setHtml(document.querySelector('
|
9
|
+
setHtml(document.querySelector('!{sel}'), cache)
|
10
10
|
return
|
11
11
|
}
|
12
12
|
let ls = []
|
@@ -44,8 +44,8 @@ script(pjax).
|
|
44
44
|
time: i.created
|
45
45
|
})
|
46
46
|
}
|
47
|
-
setHtml(document.querySelector('
|
48
|
-
utils.saveToLocal.set('
|
47
|
+
setHtml(document.querySelector('!{sel}'), ls)
|
48
|
+
utils.saveToLocal.set('!{str_name}', ls, !{cache})
|
49
49
|
});
|
50
50
|
|
51
51
|
function setHtml(el, data) {
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
script(pjax).
|
4
4
|
(async () => {
|
5
|
-
document.querySelector('
|
5
|
+
document.querySelector('!{sel}').textContent = `#{__("loading")}`
|
6
6
|
const emojiReg = /:[a-z0-9_\u4e00-\u9fa5]+:/g
|
7
|
-
let cache = utils.saveToLocal.get('
|
7
|
+
let cache = utils.saveToLocal.get('!{str_name}')
|
8
8
|
if (cache) {
|
9
|
-
setHtml(document.querySelector('
|
9
|
+
setHtml(document.querySelector('!{sel}'), cache)
|
10
10
|
return
|
11
11
|
}
|
12
12
|
let ls = []
|
@@ -42,8 +42,8 @@ script(pjax).
|
|
42
42
|
content: formatContent(i.comment)
|
43
43
|
})
|
44
44
|
}
|
45
|
-
setHtml(document.querySelector('
|
46
|
-
utils.saveToLocal.set('
|
45
|
+
setHtml(document.querySelector('!{sel}'), ls)
|
46
|
+
utils.saveToLocal.set('!{str_name}', ls, !{cache})
|
47
47
|
})
|
48
48
|
|
49
49
|
function setHtml(el, data) {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
script(pjax).
|
2
2
|
(async () => {
|
3
|
-
document.querySelector('
|
3
|
+
document.querySelector('!{sel}').textContent = `#{__("loading")}`
|
4
4
|
const emojiReg = /<img [^>]+ class="wl-emoji">/g
|
5
|
-
let cache = utils.saveToLocal.get('
|
5
|
+
let cache = utils.saveToLocal.get('!{str_name}')
|
6
6
|
if (cache) {
|
7
|
-
setHtml(document.querySelector('
|
7
|
+
setHtml(document.querySelector('!{sel}'), cache)
|
8
8
|
return
|
9
9
|
}
|
10
10
|
let ls = []
|
@@ -34,8 +34,8 @@ script(pjax).
|
|
34
34
|
content: formatContent(i.comment)
|
35
35
|
})
|
36
36
|
}
|
37
|
-
setHtml(document.querySelector('
|
38
|
-
utils.saveToLocal.set('
|
37
|
+
setHtml(document.querySelector('!{sel}'), ls)
|
38
|
+
utils.saveToLocal.set('!{str_name}', ls, !{cache})
|
39
39
|
})
|
40
40
|
|
41
41
|
function setHtml(el, data) {
|