hexo-theme-solitude 1.8.9 → 1.8.11
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 +2 -25
- package/languages/default.yml +7 -0
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +7 -0
- package/languages/zh-TW.yml +7 -0
- package/layout/includes/footer.pug +1 -1
- package/layout/includes/head/page_config.pug +1 -1
- package/layout/includes/inject/body.pug +5 -5
- package/layout/includes/inject/head.pug +3 -3
- package/layout/includes/page/links.pug +0 -2
- package/layout/includes/page/music.pug +6 -1
- package/layout/includes/widgets/aside/asideInfoCard.pug +54 -20
- package/layout/includes/widgets/aside/asideWebInfo.pug +12 -4
- package/layout/includes/widgets/home/carousel.pug +27 -21
- package/layout/includes/widgets/post/post-ai.pug +2 -2
- package/layout/includes/widgets/post/postMeta.pug +6 -2
- package/layout/includes/widgets/third-party/comments/artalk.pug +3 -3
- package/layout/includes/widgets/third-party/comments/twikoo.pug +4 -2
- package/layout/includes/widgets/third-party/comments/valine.pug +5 -3
- package/layout/includes/widgets/third-party/comments/waline.pug +4 -2
- package/layout/page.pug +4 -6
- package/package.json +1 -1
- package/plugins.yml +5 -1
- package/scripts/event/merge_config.js +1 -13
- package/source/css/_layout/aside.styl +363 -225
- package/source/css/_layout/header.styl +7 -6
- package/source/css/_layout/sidebar.styl +2 -2
- package/source/css/_page/_home/carousel.styl +73 -89
- package/source/css/_page/index.styl +0 -3
- package/source/css/_page/links.styl +1 -1
- package/source/js/barrage_comment.js +63 -70
- package/source/js/covercolor/api.js +35 -52
- package/source/js/covercolor/local.js +22 -27
- package/source/js/main.js +472 -567
- package/source/js/music.js +15 -5
- package/source/js/right_menu.js +38 -47
- package/source/js/search/local.js +16 -11
- package/source/js/utils.js +109 -136
- package/.github/workflows/github-publish.yml +0 -20
- package/layout/includes/page/moment.pug +0 -28
- package/layout/includes/widgets/page/moments/angle.pug +0 -19
- package/source/css/_page/moment.styl +0 -180
package/_config.yml
CHANGED
@@ -174,6 +174,7 @@ aside:
|
|
174
174
|
# 侧边栏个人信息卡片
|
175
175
|
# Sidebar personal information
|
176
176
|
card:
|
177
|
+
style: 0 # 0: Heo样式 :1: 设计样式
|
177
178
|
# 头像信息
|
178
179
|
# Avatar information
|
179
180
|
author:
|
@@ -524,31 +525,6 @@ capsule:
|
|
524
525
|
# Type of playlist. song: Single / playlist: Playlist / album: Album / artist: Singer
|
525
526
|
type: playlist
|
526
527
|
|
527
|
-
# 友链鱼塘
|
528
|
-
# Links fish pond
|
529
|
-
moments:
|
530
|
-
# enable
|
531
|
-
enable: false
|
532
|
-
# API 地址
|
533
|
-
# example: https://example.com/
|
534
|
-
api: # https://example.com/
|
535
|
-
# 加载失败显示图片 / Loading failed display image
|
536
|
-
error_img: /img/pwa/favicon_64.ico
|
537
|
-
# 排序规则:created:按创建时间排序 / updated:按更新时间排序
|
538
|
-
# Sort rule: created: Sort by creation time / updated: Sort by update time
|
539
|
-
sort_rule: created
|
540
|
-
# 缓存过期时间(天),默认为1天 / Cache expiration time (days), default is 1 day
|
541
|
-
expire_days: 1
|
542
|
-
# 页面初始化加载数量,默认为10条 / Page initialization loading quantity, default is 10
|
543
|
-
page_init_number: 10
|
544
|
-
# 页面翻页加载数量,默认为5条 / Page turning loading quantity, default is 5
|
545
|
-
page_turning_number: 5
|
546
|
-
# 鱼塘随机文章 / Fish pond random article
|
547
|
-
angle: false
|
548
|
-
appjs: https://cdn.cbd.int/st-source@1.0.3/js/fcircle.min.js
|
549
|
-
bundlejs: https://cdn.cbd.int/st-source/js/moment/bundle.min.js
|
550
|
-
randompostjs: https://cdn.cbd.int/st-source/js/moment/random_post.min.js
|
551
|
-
|
552
528
|
# 快捷菜单你
|
553
529
|
# quick menu
|
554
530
|
keyboard:
|
@@ -657,6 +633,7 @@ wordcount: false
|
|
657
633
|
# 访问统计
|
658
634
|
# access statistics
|
659
635
|
busuanzi: false
|
636
|
+
busuanzi_use: 0 # 0: 原版 / 1: 青秸(other: 其它自定義的busuanzi平台)
|
660
637
|
|
661
638
|
# 搜索
|
662
639
|
# search
|
package/languages/default.yml
CHANGED
@@ -55,6 +55,9 @@ post:
|
|
55
55
|
reprint: This article is a reproduction or translation, and the copyright belongs to the original author. Please contact the original author for permission to republish this article.
|
56
56
|
original: This piece of writing is an original article, utilizing the
|
57
57
|
original_end: Agreement. For complete reproduction, please acknowledge the source as Courtesy of
|
58
|
+
ai:
|
59
|
+
title: Article Summary
|
60
|
+
tip: Complaints
|
58
61
|
|
59
62
|
nav:
|
60
63
|
site_name_title: Back to home
|
@@ -90,6 +93,10 @@ aside:
|
|
90
93
|
avatar: Avatar
|
91
94
|
sticker: Mood sticker
|
92
95
|
newpost: New posts
|
96
|
+
card:
|
97
|
+
posts: 'Posts:'
|
98
|
+
tags: 'Tags:'
|
99
|
+
categories: 'Categories:'
|
93
100
|
|
94
101
|
console:
|
95
102
|
comment_tip: Interaction
|
package/languages/en.yml
CHANGED
@@ -55,6 +55,9 @@ post:
|
|
55
55
|
reprint: This article is a reproduction or translation, and the copyright belongs to the original author. Please contact the original author for permission to republish this article.
|
56
56
|
original: This piece of writing is an original article, utilizing the
|
57
57
|
original_end: Agreement. For complete reproduction, please acknowledge the source as Courtesy of
|
58
|
+
ai:
|
59
|
+
title: Article Summary
|
60
|
+
tip: Complaints
|
58
61
|
|
59
62
|
nav:
|
60
63
|
site_name_title: Back to home
|
@@ -90,6 +93,10 @@ aside:
|
|
90
93
|
avatar: Avatar
|
91
94
|
sticker: Mood sticker
|
92
95
|
newpost: New posts
|
96
|
+
card:
|
97
|
+
posts: 'Posts:'
|
98
|
+
tags: 'Tags:'
|
99
|
+
categories: 'Categories:'
|
93
100
|
|
94
101
|
console:
|
95
102
|
comment_tip: Interaction
|
package/languages/zh-CN.yml
CHANGED
@@ -65,6 +65,9 @@ post:
|
|
65
65
|
reprint: 本文是转载或翻译文章,版权归原作者所有。转载本文请联系原作者。
|
66
66
|
original: 本文是原创文章,采用
|
67
67
|
original_end: 协议,完整转载请注明来自
|
68
|
+
ai:
|
69
|
+
title: 文章摘要
|
70
|
+
tip: 投诉
|
68
71
|
|
69
72
|
award:
|
70
73
|
thanks: 致谢
|
@@ -92,6 +95,10 @@ aside:
|
|
92
95
|
avatar: 头像
|
93
96
|
sticker: 心情贴纸
|
94
97
|
newpost: 最近发布
|
98
|
+
card:
|
99
|
+
posts: '累计文章数:'
|
100
|
+
tags: '标签总数:'
|
101
|
+
categories: '分类总数:'
|
95
102
|
|
96
103
|
console:
|
97
104
|
comment_tip: 互动
|
package/languages/zh-TW.yml
CHANGED
@@ -65,6 +65,9 @@ post:
|
|
65
65
|
reprint: 本文是转载或翻译文章,版权归原作者所有。转载本文请联系原作者。
|
66
66
|
original: 本文是原创文章,采用
|
67
67
|
original_end: 协议,完整转载请注明来自
|
68
|
+
ai:
|
69
|
+
title: 文章摘要
|
70
|
+
tip: 投訴
|
68
71
|
|
69
72
|
award:
|
70
73
|
thanks: 致謝
|
@@ -92,6 +95,10 @@ aside:
|
|
92
95
|
avatar: 头像
|
93
96
|
sticker: 心情贴纸
|
94
97
|
newpost: 最近发布
|
98
|
+
card:
|
99
|
+
posts: '累計文章數:'
|
100
|
+
tags: '標籤總數:'
|
101
|
+
categories: '分類總數:'
|
95
102
|
|
96
103
|
console:
|
97
104
|
comment_tip: 互動
|
@@ -5,7 +5,7 @@ div#st-footer-bar
|
|
5
5
|
else if theme.site.name.class === 'img'
|
6
6
|
img.solitude.nolazyload(src=url_for(theme.site.name.custom))
|
7
7
|
else if theme.site.name.class === 'text'
|
8
|
-
span
|
8
|
+
span= theme.site.name.custom
|
9
9
|
div.footer-bar-description= __('footer.description').replace(/\$\{title}/, config.title + " - " + config.subtitle)
|
10
10
|
a.footer-bar-link(href=url_for('/'))= __('footer.learnmore')
|
11
11
|
div#footer_deal
|
@@ -65,9 +65,6 @@ div
|
|
65
65
|
}
|
66
66
|
script(src=url_for(theme.cdn.cover_api))
|
67
67
|
|
68
|
-
if theme.music.enable
|
69
|
-
script(src=url_for(theme.cdn.music_js))
|
70
|
-
|
71
68
|
if theme.loading.pace
|
72
69
|
script(src=url_for(theme.cdn.pace_js))
|
73
70
|
|
@@ -96,7 +93,10 @@ div
|
|
96
93
|
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
97
94
|
sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
|
98
95
|
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
99
|
-
|
96
|
+
if theme.busuanzi_use === 0
|
97
|
+
script(defer pjax src=url_for(theme.cdn.busuanzi_js))
|
98
|
+
else
|
99
|
+
script(defer pjax src=url_for(theme.cdn.busuanzi_qj_js))
|
100
100
|
|
101
101
|
|
102
102
|
if theme.footer.randomlink
|
@@ -106,7 +106,7 @@ if theme.footer.randomlink
|
|
106
106
|
include ../widgets/third-party/news-comment/newest-comment.pug
|
107
107
|
|
108
108
|
// pjax
|
109
|
-
!= partial("includes/widgets/third-party/pjax", {}, {
|
109
|
+
!= partial("includes/widgets/third-party/pjax", {}, {cache: true})
|
110
110
|
|
111
111
|
// theme
|
112
112
|
include ../body/mode
|
@@ -27,11 +27,11 @@ include ../head/pwa.pug
|
|
27
27
|
|
28
28
|
script.
|
29
29
|
console.log(
|
30
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.8.
|
30
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.8.11",
|
31
31
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
32
32
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
33
|
-
"
|
34
|
-
)
|
33
|
+
"padding: 5px 10px;color:white;background:#0084ff;",
|
34
|
+
)
|
35
35
|
|
36
36
|
if theme.extends.head
|
37
37
|
each item in theme.extends.head
|
@@ -3,4 +3,9 @@ if theme.music.enable
|
|
3
3
|
#Music-page
|
4
4
|
meting-js(id=theme.music.id, server=theme.music.server, type=theme.music.type, mutex=theme.music.mutex, volume=theme.music.volume, preload="none", data-lrctype="0", order="random")
|
5
5
|
.Music-loading
|
6
|
-
div APlayer加载中...
|
6
|
+
div APlayer加载中...'
|
7
|
+
script(pjax).
|
8
|
+
(async function () {
|
9
|
+
if (typeof initializeMusicPlayer === "undefined") await utils.getScript('!{url_for(theme.cdn.music_js)}').then(() => initializeMusicPlayer())
|
10
|
+
else initializeMusicPlayer()
|
11
|
+
})()
|
@@ -1,22 +1,56 @@
|
|
1
|
+
- const {style ,url} = theme.aside.card
|
1
2
|
.card-widget.card-info
|
2
3
|
.card-content
|
3
|
-
|
4
|
-
|
5
|
-
.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
.author-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
4
|
+
case style
|
5
|
+
when 0
|
6
|
+
.card-info-avatar.is-center
|
7
|
+
.author-info__top-group
|
8
|
+
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
|
9
|
+
.avatar-img-group
|
10
|
+
img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
|
11
|
+
if theme.aside.card.author.sticker
|
12
|
+
.avatar-sticker
|
13
|
+
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
14
|
+
.author-info__description_group
|
15
|
+
.author-info__description!= theme.aside.card.content
|
16
|
+
.author-info__description2!= theme.aside.card.content2
|
17
|
+
.author-info__bottom-group
|
18
|
+
a.author-info__bottom-group-left(href=url_for(theme.aside.card.url))
|
19
|
+
.author-info__name= config.author
|
20
|
+
.author-info__desc!= config.subtitle
|
21
|
+
.card-info-social-icons.is-center
|
22
|
+
each value, label in theme.aside.card.information || {}
|
23
|
+
- var array = value.split('||')
|
24
|
+
a.social-icon(href=url_for(trim(array[0])), title=label)
|
25
|
+
i.solitude(class=array[1])
|
26
|
+
when 1
|
27
|
+
.card-info-bg-top
|
28
|
+
.is-center
|
29
|
+
.author-info__top-group
|
30
|
+
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
|
31
|
+
a.card-info-avatar(href=url_for(theme.aside.card.url) title=_p('aside.avatar'))
|
32
|
+
.avatar-img
|
33
|
+
img(src=theme.aside.card.author.img)
|
34
|
+
if theme.aside.card.author.sticker
|
35
|
+
.avatar-sticker
|
36
|
+
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
37
|
+
.card-info__desc_group
|
38
|
+
.author-info__name= config.author
|
39
|
+
.author-info__desc!= config.subtitle
|
40
|
+
|
41
|
+
.card-info__data.is-center
|
42
|
+
a(href=url_for('/archives/') title=_p('aside.card.posts') + site.posts.length)
|
43
|
+
.length-num= site.posts.length
|
44
|
+
.headline= _p('page.archives')
|
45
|
+
a(href=url_for('/tags/') title=_p('aside.card.tags') + site.tags.length)
|
46
|
+
.length-num= site.tags.length
|
47
|
+
.headline= _p('page.tag')
|
48
|
+
a(href=url_for('/categories/') title=_p('aside.card.categories') + site.categories.length)
|
49
|
+
.length-num= site.categories.length
|
50
|
+
.headline= _p('page.category')
|
51
|
+
|
52
|
+
.card-info-social-icons.is-center
|
53
|
+
each value, label in theme.aside.card.information || {}
|
54
|
+
- var array = value.split('||')
|
55
|
+
a.social-icon(href=url_for(trim(array[0])), title=label)
|
56
|
+
i.solitude(class=array[1])
|
@@ -11,15 +11,23 @@
|
|
11
11
|
.webinfo-item-title
|
12
12
|
i.item-icon.solitude.st-visitor-line
|
13
13
|
.item-name= __('aside.pv')
|
14
|
-
|
15
|
-
|
14
|
+
if theme.busuanzi_use === 0
|
15
|
+
span#busuanzi_value_site_pv
|
16
|
+
i.solitude.st-loading-line
|
17
|
+
else
|
18
|
+
span#busuanzi_site_pv
|
19
|
+
i.solitude.st-loading-line
|
16
20
|
if theme.aside.siteinfo.uv
|
17
21
|
.webinfo-item
|
18
22
|
.webinfo-item-title
|
19
23
|
i.item-icon.solitude.st-team-fill
|
20
24
|
.item-name= __('aside.uv')
|
21
|
-
|
22
|
-
|
25
|
+
if theme.busuanzi_use === 0
|
26
|
+
span#busuanzi_value_site_uv
|
27
|
+
i.solitude.st-loading-line
|
28
|
+
else
|
29
|
+
span#busuanzi_site_uv
|
30
|
+
i.solitude.st-loading-line
|
23
31
|
if theme.aside.siteinfo.runtimeenable
|
24
32
|
.webinfo-item
|
25
33
|
.webinfo-item-title
|
@@ -2,39 +2,46 @@
|
|
2
2
|
|
3
3
|
if recommends
|
4
4
|
.recent-post-item#swiperBox
|
5
|
-
span.swiperBox-top-text= _p('home.recommend')
|
6
5
|
div.blog-slider.swiper-container-fade.swiper-container-horizontal#swiper_container
|
7
6
|
.blog-slider__wrp.swiper-wrapper
|
8
7
|
each item,index in recommends
|
9
|
-
.blog-slider__item.swiper-slide(
|
8
|
+
.blog-slider__item.swiper-slide(onclick="pjax.loadUrl('"+item.path+"')")
|
9
|
+
.blog-slider__img
|
10
|
+
img(src=item.cover, alt=item.title)
|
10
11
|
.blog-slider__content
|
11
|
-
|
12
|
-
span.blog-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
span.blog-slider__title=item.title
|
13
|
+
span.blog-slider__desc=item.description
|
14
|
+
div.article-meta-wrap
|
15
|
+
span.article-meta.tags
|
16
|
+
each tag in item.tags.data
|
17
|
+
a.article-meta__tags(href=url_for(tag.path), onclick="event.stopPropagation();")
|
18
|
+
span.tags-punctuation=tag.name
|
19
|
+
span.post-meta-date
|
20
|
+
time(datetime=moment(item.date))
|
18
21
|
.blog-slider__pagination.swiper-pagination-clickable.swiper-pagination-bullets
|
19
22
|
|
20
23
|
script.
|
21
24
|
function carousel_swiper() {
|
22
25
|
let e = new Swiper(".blog-slider", {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
},
|
27
|
-
passiveListeners: !0,
|
28
|
-
loop: !0,
|
26
|
+
direction: "vertical",
|
27
|
+
passiveListeners: true,
|
28
|
+
loop: true,
|
29
29
|
autoplay: {
|
30
|
-
disableOnInteraction:
|
30
|
+
disableOnInteraction: true,
|
31
31
|
delay: 5e3
|
32
32
|
},
|
33
|
-
mousewheel: !0,
|
34
33
|
pagination: {
|
35
34
|
el: ".blog-slider__pagination",
|
36
|
-
clickable:
|
37
|
-
}
|
35
|
+
clickable: true
|
36
|
+
},
|
37
|
+
effect: 'fade',
|
38
|
+
fadeEffect: {
|
39
|
+
crossFade: true
|
40
|
+
},
|
41
|
+
passiveListeners: true,
|
42
|
+
spaceBetween: 30,
|
43
|
+
watchSlidesProgress: true,
|
44
|
+
mousewheel: true
|
38
45
|
})
|
39
46
|
, t = document.getElementById("swiper_container");
|
40
47
|
null !== t && (t.onmouseenter = () => {
|
@@ -45,5 +52,4 @@ if recommends
|
|
45
52
|
e.autoplay.start()
|
46
53
|
}
|
47
54
|
)
|
48
|
-
}
|
49
|
-
|
55
|
+
}
|
@@ -2,11 +2,11 @@
|
|
2
2
|
.ai-title
|
3
3
|
.ai-title-left
|
4
4
|
i.ai-title-icon.solitude.st-robot-fill
|
5
|
-
.ai-title-text
|
5
|
+
.ai-title-text=_p('post.ai.title')
|
6
6
|
.ai-tag#ai-tag= theme.post_ai.modelName
|
7
7
|
.ai-explanation(style="display: block;")
|
8
8
|
.ai-suggestions
|
9
9
|
.ai-bottom
|
10
10
|
.ai-tips= theme.post_ai.tips
|
11
11
|
if theme.post_ai.report
|
12
|
-
a.ai-report(title=
|
12
|
+
a.ai-report(title=_p('post.ai.tip'), href=url_for(theme.post_ai.report))=_p('post.ai.tip')
|
@@ -57,8 +57,12 @@
|
|
57
57
|
i.solitude.st-loading-line
|
58
58
|
else
|
59
59
|
if theme.busuanzi
|
60
|
-
|
61
|
-
|
60
|
+
if theme.busuanzi_use === 0
|
61
|
+
span#busuanzi_value_page_pv
|
62
|
+
i.solitude.st-loading-line
|
63
|
+
else
|
64
|
+
span#busuanzi_page_pv
|
65
|
+
i.solitude.st-loading-line
|
62
66
|
if theme.post.meta.comment && page.comment && theme.comment.count && theme.comment.use
|
63
67
|
span.post-meta-commentcount(title=_p('post.comment'), onclick="sco.scrollTo('post-comment')")
|
64
68
|
i.solitude.st-chat-fill
|
@@ -55,7 +55,7 @@ script.
|
|
55
55
|
if commentBarrage
|
56
56
|
script.
|
57
57
|
async function barrageArtalk(array) {
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
const init = () => initializeCommentBarrage(array)
|
59
|
+
if (typeof initializeCommentBarrage === "undefined") await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(init)
|
60
|
+
else init()
|
61
61
|
}
|
@@ -66,13 +66,15 @@ if commentBarrage
|
|
66
66
|
}).then(async res => {
|
67
67
|
if (!res.ok) throw new Error("HTTP error! status: " + res.status)
|
68
68
|
const data = await res.json();
|
69
|
-
|
69
|
+
const init = () => {
|
70
70
|
initializeCommentBarrage((data.data).map(item => Object.assign({
|
71
71
|
content: item.comment,
|
72
72
|
nick: item.nick,
|
73
73
|
mailMd5: item.mailMd5,
|
74
74
|
id: item.id
|
75
75
|
})))
|
76
|
-
}
|
76
|
+
}
|
77
|
+
if (typeof initializeCommentBarrage === "undefined") await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(init)
|
78
|
+
else init()
|
77
79
|
}).catch(error => console.error("An error occurred while fetching comments: ", error))
|
78
80
|
}
|
@@ -56,8 +56,7 @@ if commentBarrage
|
|
56
56
|
}).then(async res => {
|
57
57
|
if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`)
|
58
58
|
const data = await res.json()
|
59
|
-
|
60
|
-
await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(() =>
|
59
|
+
const init = () =>
|
61
60
|
initializeCommentBarrage(data.results
|
62
61
|
.filter(item => item.url === window.location.pathname)
|
63
62
|
.map(item => ({
|
@@ -65,6 +64,9 @@ if commentBarrage
|
|
65
64
|
nick: item.nick,
|
66
65
|
mailMd5: md5(item.mail),
|
67
66
|
id: item.objectId
|
68
|
-
})))
|
67
|
+
})))
|
68
|
+
if (typeof md5 === "undefined") await utils.getScript('!{url_for(theme.cdn.blueimp_md5)}')
|
69
|
+
if (typeof initializeCommentBarrage === "undefined") await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(init)
|
70
|
+
else init()
|
69
71
|
}).catch(error => console.error("An error occurred while fetching comments: ", error))
|
70
72
|
}
|
@@ -52,7 +52,7 @@ if commentBarrage
|
|
52
52
|
if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`)
|
53
53
|
const data = await res.json();
|
54
54
|
const regex = /<img [^>]*class="wl-emoji"[^>]*>/;
|
55
|
-
|
55
|
+
const init = () => {
|
56
56
|
initializeCommentBarrage(data.data.data
|
57
57
|
.map(item => ({
|
58
58
|
nick: item.nick,
|
@@ -60,6 +60,8 @@ if commentBarrage
|
|
60
60
|
content: item.comment.replace(regex, ''),
|
61
61
|
id: item.objectId
|
62
62
|
})))
|
63
|
-
}
|
63
|
+
}
|
64
|
+
if (typeof initializeCommentBarrage === "undefined") await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(init)
|
65
|
+
else init()
|
64
66
|
}).catch(error => console.error("An error occurred while fetching comments: ", error))
|
65
67
|
}
|
package/layout/page.pug
CHANGED
@@ -18,16 +18,14 @@ block content
|
|
18
18
|
include includes/page/says
|
19
19
|
when 'equipment'
|
20
20
|
include includes/page/equipment
|
21
|
-
when 'moment'
|
22
|
-
include includes/page/moment
|
23
|
-
when 'douban'
|
24
|
-
include includes/widgets/page/banner
|
25
|
-
!= page.content
|
26
21
|
when 'music'
|
27
22
|
include includes/page/music
|
28
23
|
when 'banner'
|
29
24
|
include includes/widgets/page/banner
|
30
|
-
|
25
|
+
if page.container
|
26
|
+
include includes/page/default
|
27
|
+
else
|
28
|
+
!= page.content
|
31
29
|
default
|
32
30
|
include includes/page/default
|
33
31
|
if page.comment
|
package/package.json
CHANGED
package/plugins.yml
CHANGED
@@ -78,8 +78,12 @@ swiper_js:
|
|
78
78
|
version: 11.0.5
|
79
79
|
other_name: Swiper
|
80
80
|
busuanzi_js:
|
81
|
+
name: busuanzi
|
82
|
+
file: bsz.pure.mini.js
|
83
|
+
version: 2.3.0
|
84
|
+
busuanzi_qj_js:
|
81
85
|
name: pearssauce-busuanzi
|
82
|
-
file: bsz.pure.
|
86
|
+
file: bsz.pure.js
|
83
87
|
version: 1.0.0
|
84
88
|
snackbar:
|
85
89
|
name: node-snackbar
|
@@ -37,6 +37,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|
37
37
|
noSticky: 'about', Sticky: 'allInfo'
|
38
38
|
},
|
39
39
|
card: {
|
40
|
+
style: 0,
|
40
41
|
author: {
|
41
42
|
img: '/img/logo.png', sticker: '/img/happy-sticker.png',
|
42
43
|
},
|
@@ -189,19 +190,6 @@ hexo.extend.filter.register('before_generate', () => {
|
|
189
190
|
server: 'netease',
|
190
191
|
type: 'playlist',
|
191
192
|
},
|
192
|
-
moments: {
|
193
|
-
enable: false,
|
194
|
-
api: '',
|
195
|
-
error_img: '/img/logo.png',
|
196
|
-
sort_rule: 'created',
|
197
|
-
expire_days: 1,
|
198
|
-
page_init_number: 10,
|
199
|
-
page_turning_number: 5,
|
200
|
-
angle: false,
|
201
|
-
appjs: 'https://cdn.cbd.int/st-source@1.0.3/js/fcircle.min.js',
|
202
|
-
bundlejs: 'https://cdn.cbd.int/st-source/js/moment/bundle.min.js',
|
203
|
-
randompostjs: 'https://cdn.cbd.int/st-source/js/moment/random_post.min.js'
|
204
|
-
},
|
205
193
|
keyboard: {
|
206
194
|
enable: false,
|
207
195
|
list: []
|