hexo-theme-solitude 1.4.3 → 1.4.5

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.
Files changed (51) hide show
  1. package/_config.yml +152 -148
  2. package/languages/en-US.yml +1 -1
  3. package/languages/zh-CN.yml +1 -1
  4. package/languages/zh-TW.yml +1 -1
  5. package/layout/includes/footer.pug +2 -5
  6. package/layout/includes/inject/body.pug +4 -7
  7. package/layout/includes/inject/head.pug +1 -4
  8. package/layout/includes/loading.pug +1 -1
  9. package/layout/includes/page/album.pug +1 -2
  10. package/layout/includes/page/gallery.pug +2 -2
  11. package/layout/includes/widgets/aside/asideInfoCard.pug +1 -1
  12. package/layout/includes/widgets/home/bb/json.pug +1 -1
  13. package/layout/includes/widgets/home/bb/local.pug +1 -4
  14. package/layout/includes/widgets/home/bb/memos.pug +2 -1
  15. package/layout/includes/widgets/page/about/award.pug +6 -3
  16. package/layout/includes/widgets/page/says/json.pug +10 -6
  17. package/layout/includes/widgets/page/says/memos.pug +10 -6
  18. package/package.json +1 -1
  19. package/plugins.yml +1 -1
  20. package/scripts/event/cdn.js +0 -1
  21. package/scripts/filter/lazyload.js +2 -3
  22. package/scripts/generator/gallery.js +47 -0
  23. package/source/css/_layout/basic.styl +0 -3
  24. package/source/css/_page/{about → _about}/reward.styl +7 -0
  25. package/source/css/_page/{gallery → _gallery}/index.styl +5 -0
  26. package/source/css/_page/_home/home-top.styl +125 -302
  27. package/source/css/_page/_home/index.styl +9 -4
  28. package/source/css/_page/_home/recent-post.styl +1 -0
  29. package/source/css/_page/index.styl +3 -152
  30. package/source/css/_page/share.styl +318 -0
  31. package/source/css/_widgets/_aside/info.styl +3 -0
  32. package/source/img/loading.gif +0 -0
  33. package/source/js/covercolor/local.js +11 -11
  34. package/source/js/main.js +63 -55
  35. package/source/js/search/algolia.js +1 -3
  36. package/source/js/search/local.js +1 -3
  37. package/source/js/utils.js +8 -27
  38. /package/source/css/_page/{about → _about}/author.styl +0 -0
  39. /package/source/css/_page/{about → _about}/buff.styl +0 -0
  40. /package/source/css/_page/{about → _about}/careers.styl +0 -0
  41. /package/source/css/_page/{about → _about}/contentinfo.styl +0 -0
  42. /package/source/css/_page/{about → _about}/game.styl +0 -0
  43. /package/source/css/_page/{about → _about}/index.styl +0 -0
  44. /package/source/css/_page/{about → _about}/like.styl +0 -0
  45. /package/source/css/_page/{about → _about}/maxim.styl +0 -0
  46. /package/source/css/_page/{about → _about}/myphoto.styl +0 -0
  47. /package/source/css/_page/{about → _about}/oneself.styl +0 -0
  48. /package/source/css/_page/{about → _about}/personalities.styl +0 -0
  49. /package/source/css/_page/{about → _about}/skills.styl +0 -0
  50. /package/source/css/_page/{about → _about}/statistic.styl +0 -0
  51. /package/source/css/_page/{about → _about}/tenyear.styl +0 -0
@@ -7,7 +7,9 @@ case theme.says.style
7
7
  let bilibiliRegex = /{bilibili,(.*?)}/g;
8
8
  let playerRegex = /{player,(.*?)}/g;
9
9
  let imageRegex = /!\[\]\((.*?)\)/g;
10
- let contentRegex = /#.*?\s([^{\n]*)/g
10
+ let contentRegex = /#.*?\s([^{\n]*)/g;
11
+
12
+ document.querySelector('#waterfall').innerHTML = '<i class="scoicon sco-loading-line"></i>'
11
13
 
12
14
  await fetch("!{url_for(theme.says.mode_link)}")
13
15
  .then(res => res.json())
@@ -49,11 +51,11 @@ case theme.says.style
49
51
  </div>
50
52
  </li>`;
51
53
  }).join('');
54
+ sco.reflashEssayWaterFall();
55
+ GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
56
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
57
+ changeTimeFormat();
52
58
  }).catch(error => console.log(error));
53
- sco.reflashEssayWaterFall();
54
- GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
55
- GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
56
- changeTimeFormat();
57
59
  }();
58
60
  when 2
59
61
  script.
@@ -64,6 +66,8 @@ case theme.says.style
64
66
  let imageRegex = /!\[\]\((.*?)\)/g;
65
67
  let contentRegex = /#.*?\s([^{\n]*)/g
66
68
 
69
+ document.querySelector('#waterfall').innerHTML = '<i class="scoicon sco-loading-line"></i>'
70
+
67
71
  await fetch("!{url_for(theme.says.mode_link)}")
68
72
  .then(res => res.json())
69
73
  .then(data => {
@@ -84,7 +88,7 @@ case theme.says.style
84
88
  let content = item.content.match(contentRegex).map(item => item.replace(contentRegex, '$1'));
85
89
  return `<li class="item">
86
90
  <div class="meta">
87
- <img class="no-lightbox no-lazyload avatar" src="!{theme.aside.card.author.img}">
91
+ <img class="no-lightbox nolazyload avatar" src="!{theme.aside.card.author.img}">
88
92
  <div class="info">
89
93
  <span class="bber_nick">#{config.author}</span>
90
94
  <time class="datetime bber_date" datetime="${time}"></time>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the DuoSco team",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -64,7 +64,7 @@ pace_js:
64
64
  file: pace.min.js
65
65
  version: 1.2.4
66
66
  lunr_js:
67
- name: lunr
67
+ name: lunr.js
68
68
  file: lunr.min.js
69
69
  version: 2.3.9
70
70
  swiper_css:
@@ -106,7 +106,6 @@ hexo.extend.filter.register('before_generate', () => {
106
106
  unpkg: `https://unpkg.com/${name}${verType}/${file}`,
107
107
  cdnjs: `https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}`,
108
108
  custom: (CDN.custom_format || '').replace(/\$\{(.+?)\}/g, (match, $1) => value[$1]),
109
- custom_cdn: `${CDN.custom_cdn + cdnjs_file}`,
110
109
  cdncbd: `https://cdn.cbd.int/${name}${verType}/${file}`,
111
110
  }
112
111
 
@@ -3,9 +3,8 @@ const urlFor = require('hexo-util').url_for.bind(hexo)
3
3
  hexo.extend.filter.register('after_render:html', function (data) {
4
4
  const config = hexo.theme.config.lazyload
5
5
  if (!config.enable) return
6
- const bg = config.placeholder ? urlFor(config.placeholder) : 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
7
6
  return data.replace(
8
- /(<img(?!.*?class[\t]*=[\t]*['"].*?nolazyload.*?['"]).*? src=)/gi,
9
- `$1 "${bg}" data-lazy-src=`
7
+ /(<img(?!.*?class[\t]*=[\t]*['"].*?nolazyload.*?['"]).*?)( src=)/gi,
8
+ `$1 data-lazy-src=`
10
9
  )
11
10
  })
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Created by wleelw on 2024/2/4.
3
+ */
4
+
5
+ hexo.extend.generator.register('gallery', function (locals) {
6
+ if (!hexo.theme.config.album.enable) return;
7
+ const album = locals.data.gallery.gallery;
8
+ if (!album) return;
9
+ return {
10
+ path: album.url + '/index.html', layout: ['page'], data: {
11
+ url: album.url,
12
+ cover: album.cover,
13
+ type: 'gallery',
14
+ comment: album.comment,
15
+ desc: album.title,
16
+ title: album.title,
17
+ album: album.album_list,
18
+ leftend: album.descr,
19
+ rightbtn: album.rightbtn,
20
+ rightbtnlink: album.rightbtnlink
21
+ }
22
+ }
23
+ });
24
+
25
+ hexo.extend.generator.register('album', function (locals) {
26
+ if (!hexo.theme.config.album.enable) return;
27
+ const album = locals.data.gallery.gallery;
28
+ let back = hexo.config.language === 'zh-CN' ? '返回相册' : hexo.config.language === 'zh-TW' ? '返回相冊' : 'Back to Album';
29
+ if (!album) return;
30
+ const albumPages = [];
31
+ album.album_list.forEach(function (item) {
32
+ albumPages.push({
33
+ path: album.url + '/' + item.album + '/index.html', layout: ['page'], data: {
34
+ album: item,
35
+ type: 'album',
36
+ cover: item.cover,
37
+ title: item.class_name,
38
+ desc: item.class_name,
39
+ leftend: item.descr,
40
+ rightbtn: back,
41
+ rightbtnlink: `/${album.url}/`,
42
+ comment: item.comment
43
+ }
44
+ });
45
+ });
46
+ return albumPages;
47
+ });
@@ -59,9 +59,6 @@ a
59
59
  overflow-wrap break-word
60
60
  -webkit-user-drag none
61
61
 
62
- &:hover
63
- color var(--sco-lighttext)
64
-
65
62
  abbr[title]
66
63
  border-bottom none
67
64
  text-decoration underline dotted
@@ -98,10 +98,17 @@
98
98
  color var(--sco-card-bg)
99
99
  font-size 12px
100
100
  line-height 1
101
+ display flex
102
+ align-items center
103
+ justify-content center
101
104
  border-radius 4px
102
105
  margin-right 4px
103
106
  white-space nowrap
104
107
 
108
+ .scoicon
109
+ font-size 14px
110
+ margin-right 4px
111
+
105
112
  .reward-list-item-time
106
113
  font-size 12px
107
114
  color var(--sco-secondtext)
@@ -19,6 +19,11 @@
19
19
  width calc(100% / 3 - 16px)
20
20
  cursor pointer
21
21
  margin 8px
22
+ +maxWidth1200()
23
+ width calc(100% / 2 - 16px)
24
+
25
+ +maxWidth768()
26
+ width 100%
22
27
 
23
28
  &:hover
24
29
  .cover
@@ -1,335 +1,158 @@
1
- // 首页顶部一坨 and 友链banner
2
- div#banners
3
- display none
4
- +minWidth1200()
5
- display flex
6
- width 100%
7
- height 76%
8
- background var(--sco-card-bg)
9
- margin-bottom .5rem
10
- border var(--style-border)
1
+ #home_top
2
+ .recent-top-post-group
11
3
  border-radius 12px
12
4
  overflow hidden
13
- position relative
14
- box-shadow var(--sco-shadow-border)
15
- flex-direction column
16
- transition .3s
17
- will-change transform
18
- animation slide-in .6s .1s backwards
19
-
20
- :not(.flink)&:hover
21
- box-shadow var(--sco-shadow-main)
22
-
23
- .banner-button-group
24
- position absolute
25
- right 2rem
26
- top 2rem
27
- display flex
5
+ overflow-x auto
6
+ width 100%
7
+ margin-bottom 0
8
+ -webkit-user-select none
28
9
 
29
- .banner-button
30
- padding 8px 12px
31
- background var(--sco-fontcolor)
32
- border-radius 12px
33
- color var(--sco-card-bg)
34
- display flex
35
- align-items center
36
- z-index 1
37
- transition .3s
38
- cursor pointer
39
- box-shadow var(--sco-shadow-black)
40
-
41
- &.secondary
42
- background var(--sco-secondbg)
43
- border var(--style-border-always)
44
- color var(--sco-lighttext)
45
- margin-right 1rem
46
- box-shadow var(--sco-shadow-border)
47
-
48
- &:hover
49
- background var(--sco-theme)
50
- color var(--sco-white)
51
-
52
- i
53
- margin-right 8px
54
- font-size 1rem
55
-
56
- .banners-title
57
- top 2rem
58
- left 1.5rem
59
- position absolute
60
- display flex
61
- flex-direction column
10
+ +maxWidth768()
11
+ border-radius 0
62
12
 
63
- &-big
64
- font-size 36px
65
- line-height 1
66
- font-weight 700
67
- margin-bottom 8px
68
-
69
- &-small
70
- font-size 12px
71
- line-height 1
72
- color var(--sco-secondtext)
73
- margin-top 8px
74
- margin-bottom .5rem
75
-
76
- #banner-hover
77
- position absolute
78
- width 100%
79
- height 100%
80
- top 0
81
- left 0
82
- border-radius 12px
83
- background var(--sco-theme)
84
- color var(--sco-card-bg)
85
- padding-left .5rem
13
+ .recent-post-top
86
14
  display flex
87
- flex-direction column
88
- justify-content center
89
- opacity 0
90
- transition cubic-bezier(.71, .15, .16, 1.15) .6s
91
-
92
- i
93
- font-size 80px
94
- opacity .4
95
-
96
- &:hover
97
- #banner-hover
98
- opacity 1
99
- padding-left 2rem
100
- background var(--sco-theme-op-deep)
101
- backdrop-filter blur(15px)
102
- transform translateZ(0)
103
- transition .3s
104
- background-size 200%
105
- cursor pointer
106
-
107
- .flink
108
- .banners-title
109
- top 1.5rem
110
-
111
- .bannerText
112
- font-size 4rem
113
- line-height 4rem
114
- font-weight 700
115
-
116
- .tags-group-all
117
- display flex
118
- transform rotate(-30deg)
119
-
120
- &.nowrapMove
121
- transform rotate(0)
122
- padding-bottom 2rem
123
-
124
- .tags-group-wrapper
125
- margin-top: 7rem
126
- animation: rowup 120s linear infinite
127
-
128
- .tags-group-icon
129
- border-radius 50%
130
-
131
- img
132
- min-width 100%
133
- min-height 100%
134
- border-radius 50%
135
- object-fit cover
136
-
137
- .tags-group-wrapper
138
- margin-top: 5rem
139
- display: flex
140
- flex-wrap: nowrap
141
- animation: rowup 60s linear infinite
142
-
143
- /.tags-group-icon-pair
144
- margin-left 1rem
145
- user-select none
146
-
147
- a img
148
- border-radius 50%
149
-
150
- .tags-group-icon
151
- width 120px
152
- height 120px
153
- display flex
154
- align-items center
155
- justify-content center
156
- color #fff
157
- font-size 66px
158
- font-weight 700
159
- box-shadow var(--sco-shadow-blackdeep)
160
-
161
- &:nth-child(even)
162
- margin-top 1rem
163
- transform translate(-60px)
164
-
165
- img
166
- width 60%
167
-
168
- #home_top
169
- max-width 1400px
170
- margin .5rem auto auto
171
- padding 0 1.5rem
172
-
173
- +maxWidth768()
174
- padding 0
175
- margin-top 0
176
-
177
- // banner
178
- if hexo-config('hometop.banner.enable')
179
- .recent-top-post-group
180
- border-radius 12px
181
- overflow hidden
182
- overflow-x auto
15
+ flex-direction row
16
+ flex-wrap nowrap
183
17
  width 100%
184
- margin-bottom 0
185
- -webkit-user-select none
18
+ overflow-x scroll
186
19
 
187
- +maxWidth768()
188
- border-radius 0
20
+ &::-webkit-scrollbar
21
+ display none
189
22
 
190
- .recent-post-top
23
+ / #bannerGroup
191
24
  display flex
192
- flex-direction row
193
- flex-wrap nowrap
194
- width 100%
195
- overflow-x scroll
196
25
 
197
- &::-webkit-scrollbar
198
- display none
199
-
200
- / #bannerGroup
26
+ +minWidth1200()
27
+ width calc(50% - .25rem)
28
+ margin-right .5rem
29
+ height calc(328px + .5rem)
201
30
  display flex
31
+ flex-direction column
32
+ justify-content space-between
202
33
 
34
+ .categoryGroup
35
+ display flex
36
+ flex-direction column
37
+ justify-content space-between
38
+ min-width 200px
203
39
  +minWidth1200()
204
- width calc(50% - .25rem)
205
- margin-right .5rem
206
- height calc(328px + .5rem)
207
- display flex
208
- flex-direction column
209
- justify-content space-between
40
+ flex-direction row
41
+ height 24%
42
+ animation slide-in .6s .2s backwards
43
+ +maxWidth768()
44
+ min-width 130px
45
+ margin-bottom .5rem
46
+ margin-left 1rem
47
+ max-height 164px
48
+ overflow hidden
49
+ position relative
50
+
51
+ .categoryItem
52
+ overflow hidden
53
+ transform scale(1)
54
+ transition all .8s cubic-bezier(.65, .15, .37, 1.19)
55
+ height 48%
56
+ border-radius 12px
57
+ +maxWidth768()
58
+ border-radius 0
59
+ height 47%
60
+ box-shadow none
210
61
 
211
- .categoryGroup
212
- display flex
213
- flex-direction column
214
- justify-content space-between
215
- min-width 200px
62
+ &:nth-child(3)
63
+ display none
216
64
  +minWidth1200()
217
- flex-direction row
218
- height 24%
219
- animation slide-in .6s .2s backwards
220
- +maxWidth768()
221
- min-width 130px
222
- margin-bottom .5rem
223
- margin-left 1rem
224
- max-height 164px
225
- overflow hidden
226
- position relative
65
+ width calc(100% / 3 - .33rem)
66
+ height 100%
67
+ margin-right .5rem
227
68
 
228
- .categoryItem
229
- overflow hidden
230
- transform scale(1)
231
- transition all .8s cubic-bezier(.65, .15, .37, 1.19)
232
- height 48%
69
+ &:last-child
70
+ margin-right 0
71
+
72
+ &:hover
73
+ width 50%
74
+
75
+ &:nth-child(3)
76
+ display flex
77
+
78
+ a.categoryButton
79
+ height 100%
80
+ width 100%
81
+ background var(--sco-card-bg)
233
82
  border-radius 12px
83
+ display inline-block
84
+ text-align left
85
+ line-height 4em
86
+ font-weight 700
87
+ font-size .9rem
88
+ color var(--sco-white)
89
+ transition all .8s cubic-bezier(.39, .575, .565, 1)
90
+ transform scale(1)
91
+ overflow hidden
234
92
  +maxWidth768()
235
- border-radius 0
236
- height 47%
237
- box-shadow none
93
+ border-radius 8px
94
+
95
+ &:after
96
+ top 50px
97
+ width 1rem
98
+ left 21px
99
+ height 2px
100
+ background var(--sco-white)
101
+ content ""
102
+ border-radius 1px
103
+ position absolute
104
+
105
+ i
106
+ font-size 5rem
107
+ opacity .2
108
+ position absolute
109
+ right 0
110
+ top 20%
111
+ transition .3s
112
+ width 100px
113
+ text-align center
114
+ filter blur(2px)
115
+ transform scale(1) rotate(15deg)
238
116
 
239
- &:nth-child(3)
240
- display none
241
- +minWidth1200()
242
- width calc(100% / 3 - .33rem)
243
- height 100%
244
- margin-right .5rem
245
-
246
- &:last-child
247
- margin-right 0
248
-
249
- &:hover
250
- width 50%
251
-
252
- &:nth-child(3)
253
- display flex
254
-
255
- a.categoryButton
256
- height 100%
257
- width 100%
258
- background var(--sco-card-bg)
259
- border-radius 12px
260
- display inline-block
261
- text-align left
262
- line-height 4em
263
- font-weight 700
264
- font-size .9rem
265
- color var(--sco-white)
266
- transition all .8s cubic-bezier(.39, .575, .565, 1)
267
- transform scale(1)
268
- overflow hidden
269
117
  +maxWidth768()
270
- border-radius 8px
271
-
272
- &:after
273
- top 50px
274
- width 1rem
275
- left 21px
276
- height 2px
277
- background var(--sco-white)
278
- content ""
279
- border-radius 1px
280
- position absolute
118
+ display none
281
119
 
120
+ &:hover
282
121
  i
283
- font-size 5rem
284
- opacity .2
285
- position absolute
286
- right 0
287
- top 20%
288
- transition .3s
289
- width 100px
290
- text-align center
291
- filter blur(2px)
292
- transform scale(1) rotate(15deg)
293
-
294
- +maxWidth768()
295
- display none
296
-
297
- &:hover
298
- i
299
- opacity .8
300
- transition .8s
301
- transition-delay .15s
302
- transform scale(1.03) rotate(0)
303
- font-size 2.5rem
304
- filter blur(0)
305
-
306
- .categoryButtonText
307
- padding-left 21px
308
-
309
- &.bikan
310
- background linear-gradient(to right, #358bff, #15c6ff)
122
+ opacity .8
123
+ transition .8s
124
+ transition-delay .15s
125
+ transform scale(1.03) rotate(0)
126
+ font-size 2.5rem
127
+ filter blur(0)
128
+
129
+ .categoryButtonText
130
+ padding-left 21px
131
+
132
+ &.bikan
133
+ background linear-gradient(to right, #358bff, #15c6ff)
134
+ background-size 200%
135
+
136
+ [data-theme=dark] &
137
+ background linear-gradient(to right, #0653b8, #2fcbff)
311
138
  background-size 200%
312
139
 
313
- [data-theme=dark] &
314
- background linear-gradient(to right, #0653b8, #2fcbff)
315
- background-size 200%
140
+ &.remen
141
+ background linear-gradient(to right, #f65, #ffbf37)
142
+ background-size 200%
316
143
 
317
- &.remen
318
- background linear-gradient(to right, #f65, #ffbf37)
144
+ [data-theme=dark] &
145
+ background linear-gradient(to right, #e22a16, #da980c)
319
146
  background-size 200%
320
147
 
321
- [data-theme=dark] &
322
- background linear-gradient(to right, #e22a16, #da980c)
323
- background-size 200%
148
+ &.shiyong
149
+ background linear-gradient(to right, #18e7ae, #1eebeb)
150
+ background-size 200%
324
151
 
325
- &.shiyong
326
- background linear-gradient(to right, #18e7ae, #1eebeb)
152
+ [data-theme=dark] &
153
+ background linear-gradient(to right, #099e74, #0ea4a4)
327
154
  background-size 200%
328
155
 
329
- [data-theme=dark] &
330
- background linear-gradient(to right, #099e74, #0ea4a4)
331
- background-size 200%
332
-
333
156
  /.topGroup
334
157
  display: flex
335
158
 
@@ -1,7 +1,12 @@
1
- /**
2
- * 首页样式
3
- */
4
- // 首页顶部
1
+ #home_top
2
+ max-width 1400px
3
+ margin .5rem auto auto
4
+ padding 0 1.5rem
5
+
6
+ +maxWidth768()
7
+ padding 0
8
+ margin-top 0
9
+
5
10
  if hexo-config('hometop.banner.enable')
6
11
  @import "home-top.styl"
7
12
 
@@ -82,6 +82,7 @@
82
82
  img.post_bg
83
83
  width 100%
84
84
  height 100%
85
+ transition all .6s ease 0s
85
86
  object-fit cover
86
87
 
87
88
  +maxWidth1300()