hexo-theme-solitude 2.1.12 → 2.1.14

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
@@ -93,6 +93,7 @@ hometop:
93
93
  group:
94
94
  # 热门: /tags/Fire/ || fas fa-fire || linear-gradient(to right,#f65,#ffbf37)
95
95
  recommendList:
96
+ enable: true
96
97
  sup: 置顶
97
98
  title: Solitude 官方文档
98
99
  url: https://solitude.js.org/
@@ -278,7 +279,7 @@ post:
278
279
  license: CC BY-NC-SA 4.0
279
280
  # License link
280
281
  # 许可证链接
281
- licenurl: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh
282
+ licenurl: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans
282
283
  # Article meta information
283
284
  # 文章元信息
284
285
  meta:
@@ -569,7 +570,7 @@ footer:
569
570
  # 随机友链
570
571
  randomlink: false # 随机友链
571
572
  # 许可证
572
- license: # https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh # 许可证
573
+ license: # https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans # 许可证
573
574
 
574
575
  # 备案
575
576
  beian:
@@ -5,8 +5,9 @@
5
5
  .aside-list
6
6
  each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1).slice(0, 5)
7
7
  a.aside-list-item(href=url_for(post.path) title=post.title)
8
- .thumbnail
9
- img(alt=post.title src=url_for(post.cover))
8
+ if post.cover
9
+ .thumbnail
10
+ img(alt=post.title src=url_for(post.cover))
10
11
  .content
11
12
  span.title(href=url_for(post.path) title=post.title)= post.title
12
13
  if post.categories.data[0]
@@ -23,4 +23,7 @@ if icon
23
23
  .tags-group-icon-pair
24
24
  each key in pair
25
25
  .tags-group-icon(style=`background: ${icon[key].color}`)
26
- img.nolazyload(src=icon[key].img, title=key)
26
+ if icon[key].img
27
+ img.nolazyload(src=icon[key].img, title=key)
28
+ else if icon[key].icon
29
+ i(class=icon[key].icon, style=`color: ${icon[key].icon_color ? icon[key].icon_color : ''}`)
@@ -3,5 +3,6 @@
3
3
  #bannerGroup
4
4
  #banners
5
5
  include ./banner.pug
6
- .topGroup
7
- include ./topGroup.pug
6
+ if theme.hometop.recommendList.enable
7
+ .topGroup
8
+ include ./topGroup.pug
@@ -44,15 +44,17 @@ div.recent-post-item(onclick="pjax.loadUrl('" + url_for(post.path) + "')")
44
44
  else
45
45
  case position
46
46
  when 0
47
- div.post_cover
48
- +cover()
47
+ if post.cover
48
+ div.post_cover
49
+ +cover()
49
50
  div.recent-post-info
50
51
  +info()
51
52
  when 1
52
53
  div.recent-post-info
53
54
  +info()
54
- div.post_cover
55
- +cover()
55
+ if post.cover
56
+ div.post_cover
57
+ +cover()
56
58
 
57
59
 
58
60
  if theme.google_adsense && theme.google_adsense.enable && theme.google_adsense.auto_ads === false && theme.google_adsense.post_card
@@ -11,21 +11,27 @@ if skills || careers
11
11
  .skills-style-group
12
12
  .tags-group-all
13
13
  .tags-group-wrapper
14
- each i in [1,2]
15
- - var pair = []
16
- each tag, index in skills.tags
17
- - pair.push(tag)
18
- if pair.length === 2 || index === skills.tags.length - 1
19
- .tags-group-icon-pair
20
- each item in pair
21
- .tags-group-icon(style=`background:${item.color}`)
22
- img(src=item.icon, title=item.title)
23
- - pair = []
14
+ - var pair = []
15
+ each tag, index in skills.tags
16
+ - pair.push(tag)
17
+ if pair.length === 2 || index === skills.tags.length - 1
18
+ .tags-group-icon-pair
19
+ each item in pair
20
+ .tags-group-icon(style=`background:${item.color}`)
21
+ if item.img
22
+ img(src=item.img, title=item.title)
23
+ else if item.icon
24
+ i(class=item.icon, title=item.title, style=`color: ${item.icon_color ? item.icon_color : ''}`)
25
+ - pair = []
24
26
  .skills-list
25
27
  each tag in skills.tags
26
28
  .skill-info
27
29
  .skill-icon(style=`background:${tag.color}`)
28
- img(src=tag.icon, title=tag.title)
30
+ if tag.img
31
+ img(src=tag.img, title=tag.title)
32
+ else if tag.icon
33
+ i(class=tag.icon, title=tag.title, style=`color: ${tag.icon_color ? tag.icon_color : ''}`)
34
+
29
35
  .skill-name
30
36
  span= tag.title
31
37
  .etc ...
@@ -2,7 +2,7 @@
2
2
  .post-copyright
3
3
  .post-copyright__author_group
4
4
  a.post-copyright__author_img(href=url_for(copyright.author.url))
5
- img.post-copyright__author_img_front(src=page.avatar || copyright.author.img || theme.site.icon)
5
+ img.post-copyright__author_img_front(src=url_for(page.avatar || copyright.author.img || theme.site.icon))
6
6
  .post-copyright__author_name= page.author || config.title
7
7
  .post-copyright__author_desc= page.desc || config.subtitle
8
8
  .post-tools#post-tools
@@ -56,9 +56,15 @@
56
56
  #qrcode
57
57
  .reward-dec=_p('post.share.qrcode')
58
58
  script(pjax).
59
- typeof QRCode === 'function' && new QRCode(document.getElementById("qrcode"), '!{path}');
59
+ typeof QRCode === 'function' && new QRCode(document.getElementById("qrcode"), {
60
+ text: '!{path}',
61
+ correctLevel : QRCode.CorrectLevel.L
62
+ });
60
63
  window.addEventListener('DOMContentLoaded', () => {
61
- new QRCode(document.getElementById("qrcode"), '!{path}');
64
+ new QRCode(document.getElementById("qrcode"), {
65
+ text: '!{path}',
66
+ correctLevel : QRCode.CorrectLevel.L
67
+ });
62
68
  });
63
69
 
64
70
  if copyright.enable || page.copyright
@@ -1,4 +1,4 @@
1
- #post-info
1
+ #post-info(style=`${page.top_color ? 'background: ' + page.top_color : ''}`)
2
2
  #post-firstinfo
3
3
  .meta-firstline
4
4
  - var cc = page.reprint ? _p('post.reprint') : _p('post.original')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.1.12",
3
+ "version": "2.1.14",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  algolia_search:
2
2
  name: algoliasearch
3
3
  file: dist/algoliasearch.umd.js
4
- version: 5.14.2
4
+ version: 5.17.1
5
5
  instantsearch:
6
6
  name: instantsearch.js
7
7
  file: dist/instantsearch.production.min.js
8
- version: 4.75.5
8
+ version: 4.75.6
9
9
  pjax:
10
10
  name: pjax
11
11
  file: pjax.min.js
@@ -18,16 +18,16 @@ waline_js:
18
18
  name: '@waline/client'
19
19
  file: dist/waline.js
20
20
  other_name: waline
21
- version: 3.3.2
21
+ version: 3.4.2
22
22
  waline_css:
23
23
  name: '@waline/client'
24
24
  file: dist/waline.css
25
- version: 3.3.2
25
+ version: 3.4.2
26
26
  other_name: waline
27
27
  valine:
28
28
  name: valine
29
29
  file: dist/Valine.min.js
30
- version: 1.5.2
30
+ version: 1.5.3
31
31
  artalk_css:
32
32
  name: artalk
33
33
  file: dist/Artalk.css
@@ -88,7 +88,7 @@ snackbar:
88
88
  fontawesome:
89
89
  name: '@fortawesome/fontawesome-free'
90
90
  file: css/all.min.css
91
- version: 6.7.1
91
+ version: 6.7.2
92
92
  other_name: font-awesome
93
93
  medium_zoom:
94
94
  name: medium-zoom
@@ -107,7 +107,7 @@ fancyapps_css:
107
107
  mermaid_js:
108
108
  name: mermaid
109
109
  file: dist/mermaid.js
110
- version: 11.4.0
110
+ version: 11.4.1
111
111
  chart_js:
112
112
  name: chart.js
113
113
  file: dist/chart.umd.js
@@ -129,6 +129,6 @@ qrcode:
129
129
  other_name: qrcodejs
130
130
  color_thief:
131
131
  name: colorthief
132
- file: color-thief.min.js
132
+ file: dist/color-thief.min.js
133
133
  version: 2.6.0
134
134
  other_name: color-thief
@@ -3,13 +3,14 @@
3
3
  hexo.extend.filter.register('after_post_render', function (data) {
4
4
  data.title = data.title || 'Untitled';
5
5
  const { config } = hexo.theme;
6
- const defaultCover = ['/img/default.avif'];
7
6
 
8
7
  const setCoverAndExcerpt = (layout) => {
9
8
  const { copyright, locate, cover } = hexo.theme.config[layout].default;
10
9
  data.locate = data.locate || locate;
11
10
  data.cc = data.cc || copyright;
12
- data.cover = data.cover || (cover?.length ? cover[getRandomInt(0, cover.length)] : defaultCover[0]);
11
+ data.cover = data.cover || (cover?.length && cover[getRandomInt(0, cover.length)]);
12
+ data.top_color = data.top_color;
13
+ data.not_cover = data.cover ? false : true;
13
14
  data.excerpt = layout === 'post' ? data.description || data.excerpt : data.title;
14
15
  data.toc = !!(config.aside.toc[layout] && data.toc !== false);
15
16
  data.aside = layout === 'post' ? (data.aside || true) : (data.aside || false);
@@ -723,7 +723,7 @@ if hexo-config('aside.card.style') == 2
723
723
  .avatar-img
724
724
  overflow hidden
725
725
  border-radius 500px
726
- width 74px
726
+ width 75px
727
727
  cursor pointer
728
728
  height 74px
729
729
 
@@ -255,8 +255,6 @@ else if hexo-config('index_post_list.direction') == "row"
255
255
  flex-direction row
256
256
  width 100%
257
257
  box-shadow var(--efu-shadow-border)
258
- #tag &:first-child
259
- margin-top: 2.5rem
260
258
 
261
259
  +maxWidth768()
262
260
  border-radius 12px
@@ -37,7 +37,7 @@
37
37
  / #bannerGroup
38
38
  display flex
39
39
  +minWidth1201()
40
- width calc(50% - .25rem)
40
+ flex 1 1 0
41
41
  height calc(328px + .5rem)
42
42
  display flex
43
43
  flex-direction column
@@ -70,10 +70,10 @@
70
70
  display flex
71
71
  flex-direction row
72
72
  flex-wrap wrap
73
+ flex 1 1 0
73
74
  justify-content flex-start
74
75
  height calc(328px + 0.5rem)
75
76
  align-content space-between
76
- width calc(50% - 0.25rem)
77
77
  position relative
78
78
  animation slide-in .6s .1s backwards
79
79
 
@@ -63,13 +63,13 @@
63
63
  width 100%
64
64
  padding-bottom 2rem
65
65
 
66
- .error_title
67
- font-size 4rem
68
-
69
66
  .error_title
70
67
  font-size 9em
71
68
  line-height 1
72
69
 
70
+ +maxWidth768()
71
+ font-size 4rem
72
+
73
73
  .error_subtitle
74
74
  word-break break-word
75
75
  font-size 1.6em
@@ -81,12 +81,12 @@
81
81
  padding .3rem 1.5rem
82
82
  background var(--btn-bg)
83
83
  color var(--btn-color)
84
- transition .3s
85
84
 
86
85
  &:hover
87
86
  background var(--efu-theme)
88
87
 
89
88
  i
89
+ font-size 16px
90
90
  padding-right .3rem
91
91
 
92
92
  .aside-list
@@ -98,10 +98,7 @@
98
98
 
99
99
  +maxWidth768()
100
100
  padding-top 0
101
-
102
- .aside-list-item
103
- .thumbnail
104
- height 100px
101
+ margin 0
105
102
 
106
103
  .aside-list-group
107
104
  display flex
@@ -127,6 +124,9 @@
127
124
  background var(--efu-card-bg)
128
125
  display flex
129
126
 
127
+ +maxWidth768()
128
+ height 100px
129
+
130
130
  .content .title
131
131
  -webkit-line-clamp 2
132
132
  overflow hidden
@@ -186,7 +186,6 @@
186
186
  z-index 1
187
187
 
188
188
  +minWidth1300()
189
- width 1100px
190
189
  font-size 2.6rem !important
191
190
 
192
191
  #post-meta
@@ -148,6 +148,7 @@
148
148
  box-shadow: var(--efu-shadow-lightblack)
149
149
  border-radius: 12px
150
150
  border: var(--style-border-always)
151
+ image-rendering: pixelated
151
152
 
152
153
  .reward-main-btn
153
154
  background: var(--efu-secondbg)
package/source/js/main.js CHANGED
@@ -698,7 +698,7 @@ class tabs {
698
698
  const ele = document.createElement('div');
699
699
  ele.className = 'expire';
700
700
  ele.innerHTML = `<i class="solitude fas fa-circle-exclamation"></i>${expire.text_prev}${-(expire.time - ex)}${expire.text_next}`;
701
- const articleContainer = document.getElementById('article-container');
701
+ const articleContainer = document.querySelector('.article-container');
702
702
  articleContainer.insertAdjacentElement(expire.position === 'top' ? 'afterbegin' : 'beforeend', ele);
703
703
  }
704
704
  }