hexo-theme-solitude 1.7.12 → 1.7.13
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 -1
- package/layout/includes/head/config.pug +35 -39
- package/layout/includes/inject/head.pug +2 -2
- package/layout/includes/widgets/aside/asideInfoCard.pug +3 -2
- package/layout/includes/widgets/home/{leonus.pug → carousel.pug} +1 -1
- package/layout/includes/widgets/home/categoryGroup.pug +1 -1
- package/layout/includes/widgets/third-party/news-comment/twikoo.pug +8 -6
- package/layout/includes/widgets/third-party/news-comment/valine.pug +5 -5
- package/layout/includes/widgets/third-party/news-comment/waline.pug +5 -5
- package/layout/index.pug +2 -2
- package/package.json +1 -1
- package/source/css/_layout/aside.styl +30 -26
- package/source/css/_page/_home/carousel.styl +5 -2
- package/source/css/_page/_home/home-top.styl +2 -0
package/_config.yml
CHANGED
@@ -26,43 +26,39 @@
|
|
26
26
|
|
27
27
|
let comment = false
|
28
28
|
|
29
|
-
if (theme.comment.
|
30
|
-
comment =
|
29
|
+
if (theme.comment.enable) {
|
30
|
+
comment = {
|
31
31
|
avatar: theme.comment.avatar,
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
body: '.vwrap',
|
63
|
-
item: '.vemojis i'
|
64
|
-
}
|
65
|
-
})
|
32
|
+
commentBarrage: theme.comment.commentBarrage,
|
33
|
+
}
|
34
|
+
switch (theme.comment.type) {
|
35
|
+
case "twikoo":
|
36
|
+
comment.url = theme.comment.twikoo.envId
|
37
|
+
comment.accessToken = theme.comment.twikoo.accessToken
|
38
|
+
comment.owo = {
|
39
|
+
body: '.OwO-body',
|
40
|
+
item: '.OwO-items li'
|
41
|
+
}
|
42
|
+
break
|
43
|
+
case "waline":
|
44
|
+
comment.url = theme.comment.waline.envId
|
45
|
+
comment.owo = {
|
46
|
+
body: '.wl-emoji-popup',
|
47
|
+
item: '.wl-tab-wrapper button'
|
48
|
+
}
|
49
|
+
break
|
50
|
+
case "valine":
|
51
|
+
comment.url = theme.comment.valine.serverURLs
|
52
|
+
comment.appId = theme.comment.valine.appId
|
53
|
+
comment.appKey = theme.comment.valine.appKey
|
54
|
+
comment.owo = {
|
55
|
+
body: '.vwrap',
|
56
|
+
item: '.vemojis i'
|
57
|
+
}
|
58
|
+
break
|
59
|
+
default:
|
60
|
+
break
|
61
|
+
}
|
66
62
|
}
|
67
63
|
|
68
64
|
let post_ai = false
|
@@ -138,13 +134,13 @@
|
|
138
134
|
stop: _p('right_menu.music.stop'),
|
139
135
|
}
|
140
136
|
}
|
141
|
-
if(theme.comment.enable && theme.comment.commentBarrage){
|
137
|
+
if (theme.comment.enable && theme.comment.commentBarrage) {
|
142
138
|
rightMenu.barrage = {
|
143
139
|
open: _p('right_menu.barrage.open'),
|
144
140
|
close: _p('right_menu.barrage.close')
|
145
141
|
}
|
146
142
|
}
|
147
|
-
if(theme.right_menu.translate.enable){
|
143
|
+
if (theme.right_menu.translate.enable) {
|
148
144
|
rightMenu.translate = {
|
149
145
|
translateDelay: theme.right_menu.translate.translateDelay,
|
150
146
|
defaultEncoding: theme.right_menu.translate.defaultEncoding
|
@@ -185,7 +181,7 @@ script.
|
|
185
181
|
covercolor: {
|
186
182
|
enable: !{theme.post.covercolor.enable}
|
187
183
|
},
|
188
|
-
comment: !{comment},
|
184
|
+
comment: !{comment ? JSON.stringify(comment) : false},
|
189
185
|
lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
|
190
186
|
post_ai: !{post_ai},
|
191
187
|
right_menu: !{rightMenu ? JSON.stringify(rightMenu) : false},
|
@@ -34,7 +34,7 @@ script.
|
|
34
34
|
const expiryDay = ttl * 86400000
|
35
35
|
const item = {
|
36
36
|
value: value,
|
37
|
-
expiry: now.getTime() + expiryDay
|
37
|
+
expiry: now.getTime() + expiryDay
|
38
38
|
}
|
39
39
|
localStorage.setItem(key, JSON.stringify(item))
|
40
40
|
},
|
@@ -111,7 +111,7 @@ script.
|
|
111
111
|
)(window)
|
112
112
|
|
113
113
|
console.log(
|
114
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.
|
114
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.13",
|
115
115
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
116
116
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
117
117
|
"border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
|
@@ -5,8 +5,9 @@
|
|
5
5
|
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
|
6
6
|
.avatar-img-group
|
7
7
|
img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
|
8
|
-
.
|
9
|
-
|
8
|
+
if theme.aside.card.author.sticker
|
9
|
+
.avatar-sticker
|
10
|
+
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
10
11
|
.author-info__description_group
|
11
12
|
.author-info__description!= theme.aside.card.content
|
12
13
|
.author-info__description2!= theme.aside.card.content2
|
@@ -18,7 +18,7 @@ if recommends
|
|
18
18
|
.blog-slider__pagination.swiper-pagination-clickable.swiper-pagination-bullets
|
19
19
|
|
20
20
|
script.
|
21
|
-
function
|
21
|
+
function carousel_swiper() {
|
22
22
|
let e = new Swiper(".blog-slider", {
|
23
23
|
navigation: {
|
24
24
|
nextEl: ".swiper-button-next",
|
@@ -6,7 +6,7 @@ if group
|
|
6
6
|
each item in group
|
7
7
|
- var array = item[1].split('||')
|
8
8
|
.categoryItem
|
9
|
-
a.categoryButton(href=url_for(trim(array[0]))
|
9
|
+
a.categoryButton(href=url_for(trim(array[0])) style="background-image:" + array[2] + ";")
|
10
10
|
span.categoryButtonText= item[0]
|
11
11
|
if array[1]
|
12
12
|
i.solitude(class=trim(array[1]))
|
@@ -4,12 +4,14 @@ script.
|
|
4
4
|
if (content === '') return content;
|
5
5
|
|
6
6
|
const replacements = [
|
7
|
-
{regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '
|
8
|
-
{regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '
|
9
|
-
{regex: /<pre><code>.*?<\/pre>/gi, replacement: '
|
10
|
-
{regex: /<
|
7
|
+
{regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '<i class="solitude st-image-fill"></i>'},
|
8
|
+
{regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '<i class="solitude st-link"></i>'},
|
9
|
+
{regex: /<pre><code>.*?<\/pre>/gi, replacement: '<i class="solitude st-code-box-fill"></i>'},
|
10
|
+
{regex: /<p>|<\/p>/g, replacement: ''}
|
11
11
|
];
|
12
12
|
|
13
|
+
console.log(content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '<i class="solitude st-gallery-image">'))
|
14
|
+
|
13
15
|
content = replacements.reduce((str, {regex, replacement}) => str.replace(regex, replacement), content);
|
14
16
|
|
15
17
|
return content.length > 150 ? content.substring(0, 150) + '...' : content;
|
@@ -32,7 +34,7 @@ script.
|
|
32
34
|
'url': `${e.url}#${e.id}`,
|
33
35
|
'date': new Date(e.created).toISOString()
|
34
36
|
}))
|
35
|
-
saveToLocal.set('twikoo-newest-comment',
|
37
|
+
saveToLocal.set('twikoo-newest-comment', twikooArray, !{theme.comment.newest_comment.storage})
|
36
38
|
generateHtml(twikooArray)
|
37
39
|
}).catch(function (err) {
|
38
40
|
console.error(err)
|
@@ -63,7 +65,7 @@ script.
|
|
63
65
|
const newestCommentInit = () => {
|
64
66
|
const data = saveToLocal.get('twikoo-newest-comment')
|
65
67
|
if (data) {
|
66
|
-
generateHtml(
|
68
|
+
generateHtml(data)
|
67
69
|
} else {
|
68
70
|
getComment()
|
69
71
|
}
|
@@ -4,9 +4,9 @@ script.
|
|
4
4
|
if (content === '') return content;
|
5
5
|
|
6
6
|
const replacements = [
|
7
|
-
{regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '
|
8
|
-
{regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '
|
9
|
-
{regex: /```[\s\S]*?```/g, replacement: '
|
7
|
+
{regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '<i class="solitude st-image-fill"></i>'},
|
8
|
+
{regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '<i class="solitude st-link"></i>'},
|
9
|
+
{regex: /```[\s\S]*?```/g, replacement: '<i class="solitude st-code-box-fill"></i>'},
|
10
10
|
{regex: /<[^>]+>/g, replacement: ""}
|
11
11
|
];
|
12
12
|
|
@@ -19,7 +19,7 @@ script.
|
|
19
19
|
const newestCommentInit = () => {
|
20
20
|
const data = saveToLocal.get('valine-newest-comment')
|
21
21
|
if (data) {
|
22
|
-
generateHtml(
|
22
|
+
generateHtml(data)
|
23
23
|
} else {
|
24
24
|
getComment()
|
25
25
|
}
|
@@ -48,7 +48,7 @@ script.
|
|
48
48
|
'date': e.updatedAt || e.createdAt
|
49
49
|
}
|
50
50
|
})
|
51
|
-
saveToLocal.set('valine-newest-comment',
|
51
|
+
saveToLocal.set('valine-newest-comment', valineArray, !{theme.comment.newest_comment.storage})
|
52
52
|
generateHtml(valineArray)
|
53
53
|
} catch (err) {
|
54
54
|
console.error(err)
|
@@ -4,9 +4,9 @@ script.
|
|
4
4
|
if (content === '') return content;
|
5
5
|
|
6
6
|
const replacements = [
|
7
|
-
{regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '
|
8
|
-
{regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '
|
9
|
-
{regex: /<pre><code>.*?<\/pre>/gi, replacement: '
|
7
|
+
{regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '<i class="solitude st-image-fill"></i>'},
|
8
|
+
{regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '<i class="solitude st-link"></i>'},
|
9
|
+
{regex: /<pre><code>.*?<\/pre>/gi, replacement: '<i class="solitude st-code-box-fill"></i>'},
|
10
10
|
{regex: /<[^>]+>/g, replacement: ""}
|
11
11
|
];
|
12
12
|
|
@@ -19,7 +19,7 @@ script.
|
|
19
19
|
const newestCommentInit = () => {
|
20
20
|
const data = saveToLocal.get('waline-newest-comment')
|
21
21
|
if (data) {
|
22
|
-
generateHtml(
|
22
|
+
generateHtml(data)
|
23
23
|
} else {
|
24
24
|
getComment()
|
25
25
|
}
|
@@ -38,7 +38,7 @@ script.
|
|
38
38
|
'date': e.time || e.insertedAt
|
39
39
|
}
|
40
40
|
})
|
41
|
-
saveToLocal.set('waline-newest-comment',
|
41
|
+
saveToLocal.set('waline-newest-comment', walineArray, !{theme.comment.newest_comment.storage})
|
42
42
|
generateHtml(walineArray)
|
43
43
|
} catch (err) {
|
44
44
|
console.error(err)
|
package/layout/index.pug
CHANGED
@@ -9,8 +9,8 @@ block content
|
|
9
9
|
include ./includes/widgets/home/hometop
|
10
10
|
main.layout#content-inner
|
11
11
|
.recent-posts#recent-posts
|
12
|
-
if theme.
|
13
|
-
include ./includes/widgets/home/
|
12
|
+
if theme.carousel && is_home_first_page()
|
13
|
+
include ./includes/widgets/home/carousel.pug
|
14
14
|
#category-bar
|
15
15
|
include ./includes/widgets/home/categoryBar
|
16
16
|
for post, index in page.posts.sort("-sticky" || "-date").data
|
package/package.json
CHANGED
@@ -190,10 +190,11 @@
|
|
190
190
|
|
191
191
|
#aside-content
|
192
192
|
.card-widget
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
193
|
+
if hexo-config('aside.card.author.sticker')
|
194
|
+
&:hover
|
195
|
+
.avatar-sticker
|
196
|
+
opacity 0
|
197
|
+
transform scale(0)
|
197
198
|
|
198
199
|
&.card-recent-post
|
199
200
|
padding .4rem .6rem !important
|
@@ -236,29 +237,30 @@
|
|
236
237
|
transform scale(1.03)
|
237
238
|
|
238
239
|
.card-info
|
239
|
-
.
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
240
|
+
if hexo-config('aside.card.author.sticker')
|
241
|
+
.avatar-sticker
|
242
|
+
position absolute
|
243
|
+
bottom -2px
|
244
|
+
right -2px
|
245
|
+
width 33px
|
246
|
+
height 33px
|
247
|
+
line-height 34px
|
248
|
+
z-index 0
|
249
|
+
display flex
|
250
|
+
align-items center
|
251
|
+
justify-content center
|
252
|
+
transition .3s .2s
|
253
|
+
transform scale(1)
|
254
|
+
background var(--efu-card-bg)
|
255
|
+
border-radius 50%
|
254
256
|
|
255
|
-
|
256
|
-
|
257
|
-
|
257
|
+
img
|
258
|
+
width 26px
|
259
|
+
height 26px
|
258
260
|
|
259
|
-
|
260
|
-
|
261
|
-
|
261
|
+
../ :hover .avatar-sticker
|
262
|
+
opacity 0
|
263
|
+
transform scale(0)
|
262
264
|
|
263
265
|
.author-info__desc
|
264
266
|
font-size 12px
|
@@ -440,7 +442,9 @@
|
|
440
442
|
color var(--efu-white)
|
441
443
|
|
442
444
|
img.avatar-img
|
443
|
-
width
|
445
|
+
width 108px
|
446
|
+
height 108px
|
447
|
+
object-fit cover
|
444
448
|
right 0
|
445
449
|
top 0
|
446
450
|
border-radius 500px
|
@@ -21,6 +21,7 @@
|
|
21
21
|
display none
|
22
22
|
|
23
23
|
/ #bannerGroup
|
24
|
+
display flex
|
24
25
|
+minWidth1201()
|
25
26
|
width calc(50% - .25rem)
|
26
27
|
margin-right 1rem
|
@@ -73,6 +74,7 @@
|
|
73
74
|
height 100%
|
74
75
|
width 100%
|
75
76
|
background var(--efu-card-bg)
|
77
|
+
background-size 200%
|
76
78
|
border-radius 12px
|
77
79
|
display inline-block
|
78
80
|
text-align left
|