hexo-theme-solitude 1.8.10 → 1.8.12
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 +1 -0
- package/languages/default.yml +3 -0
- package/languages/en.yml +3 -0
- package/languages/zh-CN.yml +3 -0
- package/languages/zh-TW.yml +3 -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 +1 -1
- package/layout/includes/page/music.pug +6 -1
- 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/package.json +1 -1
- package/plugins.yml +5 -1
- package/source/css/_layout/header.styl +7 -6
- package/source/css/_page/_home/carousel.styl +73 -89
- 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 +473 -566
- 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/_config.yml
CHANGED
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
|
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
|
package/languages/zh-CN.yml
CHANGED
package/languages/zh-TW.yml
CHANGED
@@ -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,7 +27,7 @@ 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.12",
|
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
33
|
"padding: 5px 10px;color:white;background:#0084ff;",
|
@@ -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
|
+
})()
|
@@ -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/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
|
@@ -20,10 +20,6 @@
|
|
20
20
|
&:hover
|
21
21
|
color var(--efu-card-bg)
|
22
22
|
|
23
|
-
+maxWidth768()
|
24
|
-
align-items flex-end
|
25
|
-
color var(--efu-fontcolor)
|
26
|
-
|
27
23
|
&:not(.nav-fixed)
|
28
24
|
#nav
|
29
25
|
background var(--efu-none)
|
@@ -338,8 +334,13 @@
|
|
338
334
|
cursor pointer
|
339
335
|
|
340
336
|
&:hover
|
341
|
-
|
342
|
-
|
337
|
+
@media (hover: hover)
|
338
|
+
i, span, img
|
339
|
+
color var(--efu-card-bg)
|
340
|
+
transition .3s
|
341
|
+
|
342
|
+
+minWidth900()
|
343
|
+
i, span, img
|
343
344
|
opacity 0
|
344
345
|
|
345
346
|
&:after
|
@@ -4,47 +4,10 @@ div#swiper_container
|
|
4
4
|
position relative
|
5
5
|
transition all .3s
|
6
6
|
overflow hidden
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
margin-top 0
|
12
|
-
|
13
|
-
#swiperBox
|
14
|
-
|
15
|
-
.swiperBox-top-text
|
16
|
-
position absolute
|
17
|
-
z-index 2
|
18
|
-
color var(--efu-white)
|
19
|
-
background var(--efu-red)
|
20
|
-
letter-spacing 3px
|
21
|
-
top 0
|
22
|
-
left 15px
|
23
|
-
font-size 15px
|
24
|
-
width 35px
|
25
|
-
display flex
|
26
|
-
justify-content center
|
27
|
-
border-radius 0 0 12px 12px
|
28
|
-
|
29
|
-
.swiper-button-next::after, .swiper-button-prev::after
|
30
|
-
font-size 1rem !important
|
31
|
-
|
32
|
-
.swiper-button-prev, .swiper-button-next
|
33
|
-
transition all .3s
|
34
|
-
border-radius 5px
|
35
|
-
color var(--efu-main) !important
|
36
|
-
background var(--efu-maskbg)
|
37
|
-
opacity .5
|
38
|
-
|
39
|
-
&:hover
|
40
|
-
opacity 1
|
41
|
-
transition all .3s
|
42
|
-
color var(--efu-white) !important
|
43
|
-
background var(--efu-main)
|
44
|
-
|
45
|
-
.swiper-button-next::after, .swiper-button-prev::after
|
46
|
-
font-size 1.5rem
|
47
|
-
color var(--efu-bg)
|
7
|
+
display flex
|
8
|
+
flex-direction row
|
9
|
+
justify-content center
|
10
|
+
align-items center
|
48
11
|
|
49
12
|
.blog-slider__pagination .swiper-pagination-bullet
|
50
13
|
margin 0 8px
|
@@ -52,71 +15,92 @@ div#swiper_container
|
|
52
15
|
height 11px
|
53
16
|
display inline-block
|
54
17
|
border-radius 99px
|
55
|
-
background var(--efu-
|
56
|
-
opacity .
|
18
|
+
background var(--efu-gray)
|
19
|
+
opacity .2
|
57
20
|
transition all .3s
|
58
21
|
|
59
22
|
.blog-slider__pagination .swiper-pagination-bullet-active
|
60
23
|
opacity 1
|
61
24
|
background var(--efu-main)
|
62
|
-
|
25
|
+
height 30px
|
63
26
|
|
64
27
|
.blog-slider__pagination
|
65
28
|
position absolute
|
66
29
|
z-index 21
|
67
30
|
text-align center
|
31
|
+
display flex
|
32
|
+
justify-content space-between
|
33
|
+
flex-direction column
|
34
|
+
height 60%
|
68
35
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
background-position center
|
75
|
-
overflow hidden
|
76
|
-
|
77
|
-
&::after
|
78
|
-
content ''
|
79
|
-
position absolute
|
80
|
-
width 100%
|
81
|
-
height 100%
|
82
|
-
background-color rgba(0, 0, 0, .5)
|
83
|
-
z-index -1
|
84
|
-
left 0
|
85
|
-
top 0
|
86
|
-
|
87
|
-
.blog-slider__content > *
|
88
|
-
text-align center
|
89
|
-
line-height 1.5
|
90
|
-
margin 2px 0
|
91
|
-
color var(--efu-white)
|
36
|
+
#swiperBox.recent-post-item
|
37
|
+
width 100%
|
38
|
+
margin-top 0
|
39
|
+
+maxWidth798()
|
40
|
+
display none
|
92
41
|
|
93
|
-
|
94
|
-
|
42
|
+
#swiperBox
|
43
|
+
.blog-slider__item.swiper-slide
|
44
|
+
padding 1rem
|
45
|
+
display flex
|
46
|
+
justify-content space-between
|
47
|
+
flex-direction row
|
48
|
+
height 100%
|
95
49
|
|
96
|
-
|
97
|
-
|
50
|
+
&:hover
|
51
|
+
.blog-slider__img
|
52
|
+
img
|
53
|
+
transform scale(1.1)
|
54
|
+
transition all .3s
|
98
55
|
|
99
|
-
|
100
|
-
|
101
|
-
|
56
|
+
.blog-slider__title
|
57
|
+
color var(--efu-main)
|
58
|
+
transition all .3s
|
102
59
|
|
103
|
-
.blog-
|
104
|
-
|
105
|
-
-webkit-line-clamp 2
|
60
|
+
.blog-slider__img
|
61
|
+
border-radius 12px
|
106
62
|
overflow hidden
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
63
|
+
width 35%
|
64
|
+
height 100%
|
65
|
+
transition all .3s
|
66
|
+
cursor pointer
|
67
|
+
|
68
|
+
img
|
69
|
+
width 100%
|
70
|
+
height 100%
|
71
|
+
object-fit cover
|
115
72
|
|
116
73
|
.blog-slider__content
|
117
|
-
|
74
|
+
margin 0 2rem 0 1rem
|
75
|
+
position relative
|
76
|
+
width 65%
|
118
77
|
display flex
|
119
|
-
|
120
|
-
align-items center
|
78
|
+
align-items left
|
121
79
|
flex-direction column
|
122
|
-
height 100%
|
80
|
+
height 100%
|
81
|
+
|
82
|
+
.article-meta-wrap
|
83
|
+
padding 0
|
84
|
+
bottom 0
|
85
|
+
|
86
|
+
.tags-punctuation
|
87
|
+
&:hover
|
88
|
+
color var(--efu-main)
|
89
|
+
transition all .3s
|
90
|
+
|
91
|
+
.blog-slider__title
|
92
|
+
font-size 1.5rem
|
93
|
+
font-weight 600
|
94
|
+
color var(--efu-fontcolor)
|
95
|
+
margin 0
|
96
|
+
transition all .3s
|
97
|
+
cursor pointer
|
98
|
+
|
99
|
+
.blog-slider__desc
|
100
|
+
-webkit-line-clamp: 4;
|
101
|
+
display: -webkit-box;
|
102
|
+
overflow: hidden;
|
103
|
+
-webkit-box-orient: vertical;
|
104
|
+
opacity: 0.8;
|
105
|
+
font-size: 14px;
|
106
|
+
line-height: 1.8;
|