hexo-theme-solitude 1.10.2 → 1.10.4

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 CHANGED
@@ -906,8 +906,8 @@ CDN:
906
906
  version: true
907
907
 
908
908
  # Custom format
909
- # For example: https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}
910
- custom_format: https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}
909
+ # For example: //open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}
910
+ custom_format: //open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}
911
911
 
912
912
  option:
913
913
  solitude_css: https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css
@@ -8,5 +8,5 @@ block content
8
8
  .recent-posts#recent-posts
9
9
  each post,index in page.posts.find({ parent: { $exists: false } }).data
10
10
  include includes/widgets/home/postList
11
- include includes/mixins/pagination
11
+ include includes/mixins/pagination
12
12
  include includes/widgets/aside/aside
@@ -80,6 +80,10 @@ div
80
80
  != item
81
81
 
82
82
  .js-pjax
83
+ if page.type === 'says' && theme.says.enable
84
+ script.
85
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
86
+ sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
83
87
  if comment_js
84
88
  include ../widgets/third-party/comments/js
85
89
  if theme.mermaid
@@ -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.10.2",
30
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.10.4",
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;border-radius:0 5px 5px 0",
@@ -1,5 +1,5 @@
1
1
  .aside-content#aside-content
2
- - var noSticky, Sticky, customNoSticky, customSticky;
2
+ - var noSticky, Sticky
3
3
  if(is_home())
4
4
  - noSticky = theme.aside.home.noSticky.split(',')
5
5
  - Sticky = theme.aside.home.Sticky.split(',')
@@ -1,4 +1,4 @@
1
- if theme.google_adsense.enable
1
+ if theme.google_adsense.enable && !theme.google_adsense.auto_ads && theme.google_adsense.aside_card
2
2
  .card-widget.card-adsense
3
3
  ins.adsbygoogle(style="display:block; text-align:center; min-height:120px; min-width: 100%", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
4
4
  script.
@@ -6,7 +6,7 @@ each item in custom
6
6
  if theme.nav.right.random
7
7
  .nav-button#randomPost_button
8
8
  a.site-page(onclick="toRandomPost()", title=_p('nav.randompost'), href="javascript:void(0);")
9
- i.solitude.st-signal-tower-fill
9
+ i.solitude.st-dice-line
10
10
  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'))
package/layout/index.pug CHANGED
@@ -8,15 +8,16 @@ block content
8
8
  if theme.hometop.enable && is_home_first_page()
9
9
  include ./includes/widgets/home/hometop
10
10
  main.layout#content-inner
11
- .recent-posts#recent-posts
12
- if theme.carousel && is_home_first_page()
13
- include ./includes/widgets/home/carousel.pug
11
+ #home
14
12
  #category-bar
15
13
  include ./includes/widgets/home/categoryBar
16
- for post, index in page.posts.sort("-sticky" || "-date").data
17
- include ./includes/widgets/home/postList
14
+ .recent-posts#recent-posts
15
+ if theme.carousel && is_home_first_page()
16
+ include ./includes/widgets/home/carousel.pug
17
+ for post, index in page.posts.sort("-sticky" || "-date").data
18
+ include ./includes/widgets/home/postList
18
19
 
19
- // pagination
20
- include ./includes/mixins/pagination
20
+ // pagination
21
+ include ./includes/mixins/pagination
21
22
  // aside
22
23
  include ./includes/widgets/aside/aside
package/layout/post.pug CHANGED
@@ -37,7 +37,7 @@ block content
37
37
  a.social-share-ico.icon-facebook(href=`https://www.facebook.com/sharer/sharer.php?u=${encodedPath}` title="Facebook")
38
38
  when 'twitter'
39
39
  a.social-share-ico.icon-twitter(href=`https://twitter.com/intent/tweet?url=${encodedPath}&text=${encodedTitle}` title="Twitter")
40
- if theme.google_adsense.enable && theme.google_adsense.post_content
40
+ if theme.google_adsense.enable && !theme.google_adsense.auto_ads && theme.google_adsense.post_content
41
41
  div.google-ads-warp
42
42
  ins.adsbygoogle(style="display:block; text-align:center; height:284px", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
43
43
  script.
package/layout/tag.pug CHANGED
@@ -12,5 +12,5 @@ block content
12
12
  .recent-posts#recent-posts
13
13
  each post,index in page.posts.find({ parent: { $exists: false } }).data
14
14
  include includes/widgets/home/postList
15
- include includes/mixins/pagination
15
+ include includes/mixins/pagination
16
16
  include includes/widgets/aside/aside
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.10.2",
3
+ "version": "1.10.4",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -1,4 +1,6 @@
1
1
  #twikoo
2
+ .tk-submit
3
+ margin-top 0
2
4
  .tk-admin-config-group-title
3
5
  margin-top 0
4
6
  line-height normal
@@ -261,7 +263,6 @@
261
263
 
262
264
  .tk-comments-container
263
265
  min-height 0 !important
264
- margin-top .5rem
265
266
 
266
267
  .tk-replies
267
268
  > .tk-comment
@@ -371,7 +371,7 @@ i.solitude
371
371
  .layout
372
372
  display: flex
373
373
  margin: 0 auto
374
- padding: 1rem 1.5rem
374
+ padding: 0 1.5rem
375
375
  max-width: 1200px
376
376
  +maxWidth768()
377
377
  padding 0
@@ -391,7 +391,7 @@ i.solitude
391
391
  +maxWidth1200()
392
392
  width 100%
393
393
 
394
- > div:first-child:not(.recent-posts,.aside-content)
394
+ > #post,#category,#tag,#archive
395
395
  box-shadow var(--efu-shadow-border)
396
396
  padding 1rem 2rem
397
397
  border-radius 12px
@@ -13,9 +13,9 @@
13
13
  +minWidth1300()
14
14
  animation slide-in .6s .3s backwards
15
15
  if hexo-config('aside.position') == 0
16
- padding-right 1rem
16
+ padding-right .5rem
17
17
  else
18
- padding-left 1rem
18
+ padding-left .5rem
19
19
 
20
20
  .item-headline
21
21
  padding-bottom 0
@@ -44,7 +44,7 @@
44
44
  border-radius 12px
45
45
  position relative
46
46
  overflow hidden
47
- margin-top 1rem
47
+ margin-top .5rem
48
48
  padding 1rem 1.2rem
49
49
 
50
50
  &:hover
@@ -57,7 +57,7 @@
57
57
  margin-top 0
58
58
 
59
59
  .sticky_layout
60
- top calc(60px + 1rem)
60
+ top calc(60px + .5rem)
61
61
  position sticky
62
62
  transition: top .3s ease 0s
63
63
 
@@ -534,6 +534,7 @@ if hexo-config('aside.card.style') == 1
534
534
  color var(--efu-fontcolor)
535
535
 
536
536
  &:hover
537
+ transform rotate(360deg)
537
538
  color var(--efu-theme)
538
539
 
539
540
  .card-info__desc_group
@@ -290,14 +290,13 @@
290
290
 
291
291
  .card-archive-list-link
292
292
  border-radius 8px
293
- margin-top 8px
294
293
  display flex
295
294
  flex-direction column
296
295
  align-content space-between
297
296
  border var(--style-border)
298
297
  transition all .3s ease 0s
299
298
  background var(--efu-maskbgdeep)
300
- padding 8px 16px
299
+ padding 12px 16px
301
300
 
302
301
  &:hover
303
302
  background var(--efu-main)
@@ -1,7 +1,5 @@
1
1
  #pagination
2
2
  width 100%
3
- +minWidth1300()
4
- margin-top .25rem
5
3
  +minWidth768()
6
4
  overflow visible
7
5
  +maxWidth768()
@@ -13,10 +13,7 @@ if hexo-config('index_post_list.direction') == "column"
13
13
  +minWidth1300()
14
14
  display flex
15
15
  flex-wrap wrap
16
- justify-content space-between
17
- align-items flex-start
18
- align-content flex-start
19
- user-select none
16
+ gap .5rem
20
17
  transition width .3s
21
18
 
22
19
  +maxWidth768()
@@ -34,19 +31,19 @@ if hexo-config('index_post_list.direction') == "column"
34
31
  border-radius 12px
35
32
  cursor pointer
36
33
  border var(--style-border)
37
- margin 1rem 0 1rem
38
34
 
39
35
  +minWidth1300()
40
36
  flex-direction column
41
- width calc(100% / 2 - .5rem)
42
- margin-top .25rem
43
- margin-bottom .75rem
37
+ width 100%
38
+ flex 1 1 40%
39
+ max-width 50%
44
40
  box-shadow var(--efu-shadow-border)
45
41
 
42
+ +maxWidth1300()
43
+ margin-bottom .5rem
44
+
46
45
  +maxWidth768()
47
- margin 1.5rem 0
48
46
  border-radius 12px
49
- margin-top 0.5rem
50
47
  border var(--style-border-always)
51
48
  box-shadow var(--efu-shadow-border)
52
49
  display block
@@ -250,6 +247,7 @@ else if hexo-config('index_post_list.direction') == "row"
250
247
  align-items flex-start
251
248
  align-content flex-start
252
249
  user-select none
250
+ gap .5rem
253
251
  transition width .3s
254
252
 
255
253
  +maxWidth768()
@@ -266,17 +264,12 @@ else if hexo-config('index_post_list.direction') == "row"
266
264
  border-radius 12px
267
265
  cursor pointer
268
266
  border var(--style-border)
269
- margin 1rem 0 1rem
270
267
  flex-direction row
271
268
  width 100%
272
- margin-top .25rem
273
- margin-bottom .75rem
274
269
  box-shadow var(--efu-shadow-border)
275
270
 
276
271
  +maxWidth768()
277
- margin 1.5rem 0
278
272
  border-radius 12px
279
- margin-top 0.5rem
280
273
  border var(--style-border-always)
281
274
  box-shadow var(--efu-shadow-border)
282
275
  flex-direction column
@@ -5,7 +5,6 @@
5
5
  display flex
6
6
  white-space nowrap
7
7
  overflow hidden
8
- margin-bottom 1rem
9
8
  border var(--style-border)
10
9
  transition 0.3s
11
10
  height 50px
@@ -13,23 +12,22 @@
13
12
  justify-content space-between
14
13
  user-select none
15
14
  align-items center
16
-
17
- +maxWidth1300()
18
- margin-bottom 1rem
19
- animation slide-in .6s 0s backwards
15
+ margin-bottom .5rem
20
16
 
21
17
  +minWidth1300()
22
- margin-bottom .75rem
23
18
  &:hover
24
19
  border var(--style-border-hover)
25
20
  box-shadow var(--efu-shadow-main)
26
21
 
22
+ +minWidth1200()
23
+ animation: slide-in .6s .3s backwards;
24
+
27
25
  +maxWidth768()
28
26
  margin-bottom 0
29
27
  margin-top 0
30
28
  border-radius 0
31
29
  background var(--efu-background)
32
- padding 0.5rem 0
30
+ padding 0 1rem
33
31
  border none
34
32
 
35
33
  .category-bar-right
@@ -16,6 +16,10 @@
16
16
  flex-wrap nowrap
17
17
  width 100%
18
18
  overflow-x scroll
19
+ gap .5rem
20
+
21
+ +maxWidth1200()
22
+ gap 0
19
23
 
20
24
  &::-webkit-scrollbar
21
25
  display none
@@ -24,7 +28,6 @@
24
28
  display flex
25
29
  +minWidth1201()
26
30
  width calc(50% - .25rem)
27
- margin-right 1rem
28
31
  height calc(328px + .5rem)
29
32
  display flex
30
33
  flex-direction column
@@ -53,7 +56,6 @@
53
56
  display none
54
57
  +maxWidth768()
55
58
  min-width 130px
56
- margin-bottom .5rem
57
59
  margin-left 1rem
58
60
  max-height 164px
59
61
  overflow hidden
@@ -313,7 +315,7 @@
313
315
 
314
316
  .banner-button-group
315
317
  bottom: 1rem
316
-
318
+
317
319
  +maxWidth768()
318
320
  margin-right 1rem
319
321
 
@@ -1,8 +1,8 @@
1
1
  if hexo-config('hometop.enable') || hexo-config('says.enable')
2
2
  #home_top
3
3
  max-width 1400px
4
- margin .5rem auto auto
5
- padding 0 1.5rem
4
+ margin 0 auto
5
+ padding .5rem 1.5rem
6
6
 
7
7
  +maxWidth768()
8
8
  padding 0
@@ -69,6 +69,7 @@
69
69
  font-size 2em
70
70
 
71
71
  .tag-cloud-list
72
+ gap .5rem
72
73
  a
73
74
  display flex
74
75
  width fit-content
@@ -76,7 +77,6 @@
76
77
  font-size 1.4em
77
78
  padding 0.2em 0.5em
78
79
  background var(--efu-card-bg)
79
- margin 0.5em 0.5em
80
80
  border-radius 12px
81
81
  border var(--style-border-always)
82
82
  box-shadow var(--efu-shadow-border)
@@ -90,7 +90,6 @@
90
90
  transition none
91
91
 
92
92
  &:hover
93
- transform scale(1.1)
94
93
  background var(--efu-main) !important
95
94
  box-shadow var(--efu-shadow-blue)
96
95
  color var(--efu-white) !important
@@ -1,8 +1,8 @@
1
1
  .switch_message
2
2
  display flex
3
3
  justify-content center
4
- margin 2rem 0
5
- gap 1rem
4
+ margin 1rem 0
5
+ gap .5rem
6
6
  button
7
7
  background-color var(--efu-main)
8
8
  border var(--style-border-always)
@@ -3,7 +3,6 @@ div#banners
3
3
  +minWidth1201()
4
4
  display flex
5
5
  width 100%
6
- height 100%
7
6
  background var(--efu-card-bg)
8
7
  border var(--style-border)
9
8
  border-radius 12px
@@ -1,6 +1,6 @@
1
1
  #tag
2
2
  +minWidth1300()
3
- padding: 4rem 2rem 1rem 2rem
3
+ padding: 4rem 2rem 1rem 2rem!important
4
4
  overflow hidden
5
5
 
6
6
  +maxWidth768()
@@ -112,6 +112,9 @@
112
112
  border-radius: 0;
113
113
  margin 0
114
114
 
115
+ / #page &
116
+ border-radius 8px
117
+
115
118
  .waterfall
116
119
  opacity 0
117
120
  transition .3s
@@ -9,7 +9,7 @@ $colors = {
9
9
 
10
10
  .note
11
11
  position relative
12
- margin 1rem 0
12
+ margin .5rem 0
13
13
  padding 15px
14
14
  border-radius 3px
15
15
 
package/source/js/main.js CHANGED
@@ -313,7 +313,9 @@ let sco = {
313
313
  const observer = new IntersectionObserver((entries) => {
314
314
  entries.forEach(entry => {
315
315
  if (entry.isIntersecting) {
316
- waterfall(entry.target) || entry.target.classList.add('show');
316
+ setTimeout(() => {
317
+ waterfall(entry.target) || entry.target.classList.add('show');
318
+ }, 300);
317
319
  }
318
320
  });
319
321
  });
@@ -368,7 +370,7 @@ let sco = {
368
370
  * @description 添加图片标题
369
371
  */
370
372
  addPhotoFigcaption: function () {
371
- document.querySelectorAll('#article-container img').forEach(image => {
373
+ document.querySelectorAll('#article-container img:not(.gallery-item img)').forEach(image => {
372
374
  const captionText = image.getAttribute('alt');
373
375
  captionText && image.insertAdjacentHTML('afterend', `<div class="img-alt is-center">${captionText}</div>`);
374
376
  });
@@ -799,7 +801,7 @@ class tabs {
799
801
  window.refreshFn = () => {
800
802
  const {is_home, is_page, page, is_post} = PAGE_CONFIG;
801
803
  const {runtime, lazyload, lightbox, randomlink, covercolor, post_ai} = GLOBAL_CONFIG;
802
- const timeSelector = is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime'
804
+ const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime') + ', .webinfo-item time';
803
805
  document.body.setAttribute('data-type', page);
804
806
  sco.changeTimeFormat(document.querySelectorAll(timeSelector));
805
807
  runtime && sco.addRuntime();