hexo-theme-solitude 1.12.2 → 1.12.3

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.
@@ -1,7 +1,8 @@
1
1
  # These are supported funding model platforms
2
2
 
3
- github: [everfu] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
4
  patreon: everfu # Replace with a single Patreon username
5
+ polar: everfu
5
6
  open_collective: # Replace with a single Open Collective username
6
7
  ko_fi: # Replace with a single Ko-fi username
7
8
  tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
@@ -10,4 +11,4 @@ liberapay: # Replace with a single Liberapay username
10
11
  issuehunt: # Replace with a single IssueHunt username
11
12
  otechie: # Replace with a single Otechie username
12
13
  lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13
- custom: ['https://afdian.net/a/everfu', 'https://s3.qjqq.cn/47/66374315ebd08.webp!color', 'https://s3.qjqq.cn/47/663742bac8e52.webp!color'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14
+ custom: [https://afdian.net/a/everfu] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
package/README.md CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  主题设计由 [@张洪Heo](https://github.com/zhheo) 全权授权
12
12
 
13
+ <a href="https://polar.sh/everfu"><img src="https://polar.sh/embed/seeks-funding-shield.svg?org=everfu" /></a>
14
+
13
15
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
14
16
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
15
17
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
package/README_en-US.md CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  Theme design is fully licensed by [@张洪Heo](https://github.com/zhheo).
12
12
 
13
+ <a href="https://polar.sh/everfu"><img src="https://polar.sh/embed/seeks-funding-shield.svg?org=everfu" /></a>
14
+
13
15
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
14
16
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
15
17
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
package/README_zh-Hant.md CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  主題設計由 [@张洪Heo](https://github.com/zhheo)全權授權
12
12
 
13
+ <a href="https://polar.sh/everfu"><img src="https://polar.sh/embed/seeks-funding-shield.svg?org=everfu" /></a>
14
+
13
15
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
14
16
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
15
17
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
package/layout/404.pug CHANGED
@@ -19,6 +19,6 @@ block content
19
19
  break
20
20
  .aside-list-item
21
21
  a.thumbnail(href=url_for(post.path), title=post.title)
22
- img(src=post.cover, alt=post.title)
22
+ img(src=url_for(post.cover), alt=post.title)
23
23
  .content
24
24
  a.title(href=url_for(post.path), title=post.title)= post.title
@@ -122,6 +122,16 @@
122
122
  }
123
123
  }
124
124
 
125
+ let highlight = false
126
+ if (theme.highlight.enable) {
127
+ highlight = {
128
+ limit: theme.highlight.limit,
129
+ expand: theme.highlight.expand,
130
+ copy: theme.highlight.copy,
131
+ syntax: config.syntax_highlighter
132
+ }
133
+ }
134
+
125
135
  script.
126
136
  const GLOBAL_CONFIG = {
127
137
  root: '!{config.root}',
@@ -133,13 +143,7 @@ script.
133
143
  error: '!{theme.lazyload.errorimg}'
134
144
  },
135
145
  copyright: !{copyright},
136
- highlight: {
137
- enable: !{theme.highlight.enable},
138
- limit: !{theme.highlight.limit},
139
- expand: !{theme.highlight.expand},
140
- copy: !{theme.highlight.copy},
141
- syntax: '!{config.syntax_highlighter}'
142
- },
146
+ highlight: !{highlight ? JSON.stringify(highlight) : false},
143
147
  randomlink: !{theme.footer.randomlink},
144
148
  lang: !{JSON.stringify(lang)},
145
149
  aside: {
@@ -27,12 +27,10 @@ include ../head/opengraph.pug
27
27
  include ../head/pwa.pug
28
28
 
29
29
  script.
30
- console.log(
31
- "%c Program: Hexo %c Theme: Solitude %c Version: v1.12.2",
32
- "border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
33
- "padding: 5px 10px;color:white;background:#3e9f50;",
34
- "padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
35
- )
30
+ console.log(' %c Solitude %c ' + '!{packageVersion()}' + ' %c https://github.com/everfu/hexo-theme-solitude',
31
+ 'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff',
32
+ 'background:#ff9a9a ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff',
33
+ 'background:unset ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff')
36
34
 
37
35
  if theme.memorial.enable
38
36
  script.
@@ -5,7 +5,7 @@ each post in page.posts.find({ parent: { $exists: false } }).data
5
5
  .article-sort-item.year #{year}
6
6
  .article-sort-item
7
7
  a.article-sort-item-img(href=url_for(post.path) title=post.title)
8
- img(src=post.cover alt=post.title)
8
+ img(src=url_for(post.cover) alt=post.title)
9
9
  .article-sort-item-info
10
10
  a.article-sort-item-title(href=url_for(post.path) title=post.title onclick="window.event.cancelBubble=true;") #{post.title}
11
11
  .article-sort-item-tags
@@ -8,7 +8,7 @@
8
8
  if index <= 5
9
9
  .aside-list-item
10
10
  a.thumbnail(href=url_for(post.path) title=post.title)
11
- img(alt=post.title src=post.cover)
11
+ img(alt=post.title src=url_for(post.cover))
12
12
  .content
13
13
  a.title(href=url_for(post.path) title=post.title)= post.title
14
14
  if post.categories.data[0]
@@ -5,7 +5,7 @@
5
5
  .post_cover
6
6
  a(href=url_for(post.path), title=post.title)
7
7
  span.recent-post-top-text= _p('home.recommend')
8
- img.post_bg(alt=post.title, src=post.cover)
8
+ img.post_bg(alt=post.title, src=url_for(post.cover))
9
9
  .recent-post-info
10
10
  a.article-title(href=url_for(post.path), title=post.title)= post.title
11
11
 
@@ -34,7 +34,7 @@ script().
34
34
  item: '.OwO-items li'
35
35
  })
36
36
 
37
- barrageTwikoo()
37
+ !{commentBarrage} && barrageTwikoo()
38
38
  }
39
39
 
40
40
  const loadTwikoo = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "bugs": {
26
26
  "url": "https://github.com/everfu/hexo-theme-solitude/issues",
27
- "email": "o@efu.me"
27
+ "email": "o@everfu.org"
28
28
  },
29
29
  "homepage": "https://www.efu.me/",
30
- "author": "Hexo-Theme-Solitude<o@efu.me>",
30
+ "author": "Hexo-Theme-Solitude<o@everfu.org>",
31
31
  "license": "MIT"
32
32
  }
package/plugins.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  algolia_search:
2
2
  name: algoliasearch
3
3
  file: dist/algoliasearch-lite.umd.js
4
- version: 4.23.3
4
+ version: 4.24.0
5
5
  instantsearch:
6
6
  name: instantsearch.js
7
7
  file: dist/instantsearch.production.min.js
8
- version: 4.70.0
8
+ version: 4.73.0
9
9
  pjax:
10
10
  name: pjax
11
11
  file: pjax.min.js
@@ -18,11 +18,11 @@ waline_js:
18
18
  name: '@waline/client'
19
19
  file: dist/waline.js
20
20
  other_name: waline
21
- version: 3.2.1
21
+ version: 3.2.7
22
22
  waline_css:
23
23
  name: '@waline/client'
24
24
  file: dist/waline.css
25
- version: 3.2.1
25
+ version: 3.2.7
26
26
  other_name: waline
27
27
  valine:
28
28
  name: valine
@@ -31,11 +31,11 @@ valine:
31
31
  artalk_css:
32
32
  name: artalk
33
33
  file: dist/Artalk.css
34
- version: 2.8.6
34
+ version: 2.8.7
35
35
  artalk_js:
36
36
  name: artalk
37
37
  file: dist/Artalk.js
38
- version: 2.8.6
38
+ version: 2.8.7
39
39
  katex:
40
40
  name: katex
41
41
  file: dist/katex.min.css
@@ -83,4 +83,9 @@ hexo.extend.helper.register('inject_head_js', function () {
83
83
  }
84
84
  `
85
85
  return `<script>(()=>{${createJS()}})()</script>`
86
+ })
87
+
88
+ hexo.extend.helper.register('packageVersion', function () {
89
+ const {version} = require('../../package.json')
90
+ return version
86
91
  })
@@ -148,9 +148,6 @@ hr
148
148
  overflow visible
149
149
  display: none
150
150
 
151
- pre
152
- font-family monospace, monospace
153
-
154
151
  a
155
152
  color var(--efu-fontcolor)
156
153
  text-decoration none
@@ -165,7 +162,7 @@ abbr[title]
165
162
  b, strong
166
163
  font-weight bolder
167
164
 
168
- code, kbd, samp
165
+ code, kbd, samp, pre
169
166
  font-family $code-font-family
170
167
  font-size $code-font-size
171
168
 
@@ -1,4 +1,5 @@
1
- @import "diff"
1
+ if hexo-config('highlight.enable')
2
+ @import "diff"
2
3
  figure
3
4
  pre
4
5
  margin 0
@@ -1,6 +1,6 @@
1
- @import "color"
2
-
3
- @import "theme/" + hexo-config('highlight.theme')
1
+ if hexo-config('highlight.enable')
2
+ @import "color"
3
+ @import "theme/" + hexo-config('highlight.theme')
4
4
 
5
5
  if $highlight_enable
6
6
  @require "highlight/index.styl"
@@ -1,6 +1,7 @@
1
1
  @require line-number
2
2
 
3
- @require diff
3
+ if hexo-config('highlight.enable')
4
+ @require diff
4
5
 
5
6
  #article-container
6
7
  pre[class*='language-']
@@ -692,6 +692,7 @@ if hexo-config('nav.group')
692
692
  opacity 0
693
693
  pointer-events none
694
694
  backdrop-filter blur(20px)
695
+ -webkit-backdrop-filter blur(20px)
695
696
 
696
697
  +maxWidth768()
697
698
  left 0
@@ -79,6 +79,7 @@
79
79
  display flex
80
80
  flex-direction column
81
81
  width calc(100% / 3 - 0.5rem)
82
+ min-width 200px
82
83
  align-items flex-start
83
84
  background var(--efu-card-bg)
84
85
  border-radius 12px
@@ -4,7 +4,14 @@
4
4
  border var(--style-border-always)
5
5
 
6
6
  div:only-child
7
- width 100%!important
7
+ &.next-post, &.prev-post
8
+ width 100%
9
+
10
+ &.next-post a
11
+ border-left 0
12
+
13
+ &.prev-post a
14
+ border-right 0
8
15
 
9
16
  +minWidth1300()
10
17
  position fixed
@@ -113,7 +120,7 @@
113
120
  a
114
121
  +minWidth768()
115
122
  border-right var(--efu-main-op)
116
- border-right-width 1px
123
+ border-right-width .5px
117
124
  border-right-style solid
118
125
 
119
126
  +minWidth1300()
@@ -131,7 +138,7 @@
131
138
  a
132
139
  +minWidth768()
133
140
  border-left var(--efu-main-op)
134
- border-left-width 1px
141
+ border-left-width .5px
135
142
  border-left-style solid
136
143
  display flex
137
144
  align-items flex-start
@@ -54,7 +54,7 @@ class ScoMusicPlayer {
54
54
  if (musicCover) {
55
55
  loadingElement.style.display = "none";
56
56
  clearInterval(timer);
57
- document.querySelector('meting-js').aplayer.volume(0.8, true);
57
+ document.querySelector('meting-js');
58
58
  this.addEventListenerChangeMusicBg();
59
59
  backgroundElement.style.display = "block";
60
60
  }
@@ -9,12 +9,8 @@ document.onmouseup = document.ondbclick = selectText;
9
9
  const rm = {
10
10
  mask: document.getElementById("rightmenu-mask"),
11
11
  menu: document.getElementById("rightMenu"),
12
- get width() {
13
- return this.menu.offsetWidth;
14
- },
15
- get height() {
16
- return this.menu.offsetHeight;
17
- },
12
+ width: 0,
13
+ height: 0,
18
14
  domhref: "",
19
15
  domsrc: "",
20
16
  globalEvent: null,
@@ -54,8 +50,10 @@ const rm = {
54
50
  rm.mask.style.display = "none";
55
51
  },
56
52
  reLoadSize() {
57
- this.menu.style.display = "block";
58
- this.menu.style.display = "none";
53
+ rm.menu.style.display = "block";
54
+ rm.width = rm.menu.offsetWidth;
55
+ rm.height = rm.menu.offsetHeight;
56
+ rm.menu.style.display = 'none';
59
57
  },
60
58
  copyText(e) {
61
59
  navigator.clipboard && navigator.clipboard.writeText(e);
@@ -101,9 +99,9 @@ const rm = {
101
99
  };
102
100
 
103
101
  function stopMaskScroll() {
104
- utils.addEventListenerPjax(rm.menu, "mousewheel", rm.hideRightMenu);
105
- utils.addEventListenerPjax(rm.mask, "mousewheel", rm.hideRightMenu);
106
- utils.addEventListenerPjax(rm.mask, "click", rm.hideRightMenu);
102
+ utils.addEventListenerPjax(rm.menu, "mousewheel", rm.hideRightMenu, { passive: true });
103
+ utils.addEventListenerPjax(rm.mask, "mousewheel", rm.hideRightMenu, { passive: true });
104
+ utils.addEventListenerPjax(rm.mask, "click", rm.hideRightMenu, { passive: true });
107
105
  }
108
106
 
109
107
  window.oncontextmenu = (ele) => {