hexo-theme-solitude 1.9.0 → 1.9.2

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  一款优雅的 Hexo 主题,支持懒加载、PWA、Latex以及多种评论系统。
10
10
 
11
- 主题由 [@张洪Heo](https://github.com/zhheo) 作者全权授权、设计!
11
+ 主题设计由 [@张洪Heo](https://github.com/zhheo) 全权授权
12
12
 
13
13
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
package/README_en-US.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  An elegant Hexo theme that supports lazy loading, PWA, Latex, and multiple comment systems.
10
10
 
11
- Theme is fully licensed and designed by the author of [@张洪Heo](https://github.com/zhheo)!
11
+ Theme design is fully licensed by [@张洪Heo](https://github.com/zhheo).
12
12
 
13
13
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?color=blue&logo=npm)
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
package/README_fr.md CHANGED
@@ -9,7 +9,7 @@
9
9
  Un thème Hexo élégant qui prend en charge le chargement paresseux, les PWA, le latex et les systèmes de commentaires
10
10
  multiples.
11
11
 
12
- Le thème se compose de [@张洪Heo](https://github.com/zhheo) Autorisation complète de l’auteur, conception !
12
+ La conception du thème est entièrement autorisée par [@张洪Heo](https://github.comzhheo).
13
13
 
14
14
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
15
15
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
package/README_ja.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  遅延読み込み、PWA、ラテックス、および複数のコメントシステムをサポートするエレガントなHexoテーマ。
10
10
 
11
- テーマは、 [@张洪Heo](https://github.com/zhheo) 著者の完全な権限、デザイン!
11
+ テーマデザインは [@张洪Heo](https://github.comzhheo) によって完全にライセンスされています。
12
12
 
13
13
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
package/README_zh-Hant.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  一款優雅的 Hexo 主題,支援懶載入、PWA、Latex以及多種評論系統。
10
10
 
11
- 主題由 [@张洪Heo](https://github.com/zhheo) 全權授權、設計!
11
+ 主題設計由 [@张洪Heo](https://github.com/zhheo)全權授權
12
12
 
13
13
  ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?color=blue&logo=npm)
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
package/_config.yml CHANGED
@@ -362,6 +362,17 @@ post:
362
362
  # qcode: https://s3.qjqq.cn/47/661ba900c4bc1.webp!color
363
363
  # url: https://github.com/sponsors/efuo
364
364
  # color: var(--efu-black)
365
+ # 分享按钮,需要是什么哪些按钮,填写后开启
366
+ share:
367
+ enable: false
368
+ list:
369
+ # - qq
370
+ # - weibo
371
+ # - twitter
372
+ # - facebook
373
+ # - telegram
374
+ # - whatsapp
375
+ # - linkedin
365
376
  # 版权中订阅按钮跳转链接,填写地址后开启
366
377
  # Subscription button jump link in copyright
367
378
  rss: # /atom.xml
@@ -884,8 +895,6 @@ CDN:
884
895
  # twikoo:
885
896
  # waline_js:
886
897
  # waline_css:
887
- # sharejs:
888
- # sharejs_css:
889
898
  # katex:
890
899
  # katex_copytex:
891
900
  # lazyload:
@@ -52,6 +52,7 @@ div#footer-bar
52
52
  div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By 
53
53
  a.footer-bar-link(href=url_for("/"))= config.author
54
54
  div.footer-bar-right
55
+ a.footer-bar-link(href="https://github.com/valor-x/hexo-theme-solitude" title=__('footer.theme'))= __('footer.theme')
55
56
  each item in theme.footer.links
56
57
  a.footer-bar-link(href=url_for(item.url), alt=item.name)!= item.name
57
58
  a.footer-bar-link.cc(href=url_for(theme.footer.license), aria-label = 'copyright')
@@ -47,7 +47,7 @@ div
47
47
  if theme.post_ai.enable
48
48
  script(src=url_for(theme.cdn.efu_ai))
49
49
 
50
- if theme.capsule.enable || theme.music.enable
50
+ if theme.capsule.enable || theme.music.enable || theme.says.enable
51
51
  script.
52
52
  var meting_api = '!{theme.meting_api}';
53
53
  script(src=url_for(theme.cdn.aplayer_js))
@@ -4,7 +4,7 @@ each item in theme.verify_site || []
4
4
  link(rel="stylesheet", href=url_for(theme.cdn.solitude_css))
5
5
 
6
6
  // aplayer
7
- if theme.capsule.enable || theme.music.enable
7
+ if theme.capsule.enable || theme.music.enable || theme.says.enable
8
8
  link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
9
9
 
10
10
  // swiper
@@ -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.9.0",
30
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.9.2",
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;",
@@ -1,6 +1,6 @@
1
- .card-widget(class=item.class, id=item.id)
1
+ .card-widget(class=custom.class, id=custom.id)
2
2
  .item-headline
3
- i(class=item.icon)
4
- span=item.title
5
- div(class=item.content_class ||'item-content', id=item.content_id, style=item.content_css)
6
- != item.content_html
3
+ i(class=custom.icon)
4
+ span=custom.title
5
+ div(class=custom.content_class ||'item-content', id=custom.content_id, style=custom.content_css)
6
+ != custom.content_html
@@ -30,7 +30,7 @@
30
30
  .author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
31
31
  a.card-info-avatar(href=url_for(theme.aside.card.url) title=_p('aside.avatar'))
32
32
  .avatar-img
33
- img(src=theme.aside.card.author.img)
33
+ img(src=theme.aside.card.author.img alt=_p('aside.avatar'))
34
34
  if theme.aside.card.author.sticker
35
35
  .avatar-sticker
36
36
  img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
@@ -10,6 +10,6 @@ case item
10
10
  default
11
11
  - const custom = site.data?.aside?.find((i) => i.name === item)
12
12
  if custom
13
- != partial("includes/widgets/aside/asideCustom", {item: custom}, {cache: true})
13
+ include ./asideCustom.pug
14
14
  else
15
15
  include ../../page/default.pug
@@ -9,9 +9,9 @@ if personalities
9
9
  .image
10
10
  img.nolazyload(src=personalities.image)
11
11
  .post-tips
12
- = _p('about.personalities.tip1')
13
- a(href="https://www.16personalities.com/")= personalities.linkText
14
- = _p('about.personalities.tip2')
12
+ = _p('about.personalities.tip1') + ' '
13
+ a(href='https://www.16personalities.com/')= personalities.linkText + ' '
14
+ = _p('about.personalities.tip2') + ' '
15
15
  a(href=personalities.typeLink)= personalities.typeName
16
16
  .author-content-item.myphoto
17
17
  img.author-content-img(src=personalities.myphoto, alt="my photo")
@@ -25,4 +25,4 @@
25
25
  a(href=url_for(theme.post.default.copyright.licenurl))
26
26
  | #{theme.post.default.copyright.license}
27
27
  = _p('post.copyright.original_end')
28
- a(href=url_for("/")) #{config.title}
28
+ a(href=url_for("/")) #{config.title}
@@ -22,7 +22,7 @@ script.
22
22
  mailMd5: comment.data.email_encrypted,
23
23
  })
24
24
  const $content = comment.getRender().$content
25
- utils.lightbox($content.querySelectorAll('img:not([atk-emoticon])'))
25
+ GLOBAL_CONFIG.lightbox && utils.lightbox($content.querySelectorAll('img:not([atk-emoticon])'))
26
26
  sco.owoBig({body: '.atk-grp', item: '.atk-item'})
27
27
  })
28
28
  !{commentBarrage} && barrageArtalk(array)
@@ -24,7 +24,7 @@ script().
24
24
  region: '!{region}',
25
25
  path: window.location.pathname,
26
26
  onCommentLoaded: () => {
27
- utils.lightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
27
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
28
28
  }
29
29
  }, !{JSON.stringify(option)}))
30
30
 
package/layout/post.pug CHANGED
@@ -15,6 +15,28 @@ block content
15
15
  span.tags-punctuation
16
16
  | #{data.name}
17
17
  span.tagsPageCount #{data.length}
18
+ .social-share
19
+ - const path = config.url + url_for(page.path);
20
+ - const encodedPath = encodeURIComponent(path);
21
+ - const encodedTitle = encodeURIComponent(page.title);
22
+ - const encodedDescription = encodeURIComponent(page.description);
23
+ - const encodedIcon = encodeURIComponent(page.cover || theme.site.icon);
24
+ each item in theme.post.share.list || []
25
+ case item
26
+ when 'qq'
27
+ a.social-share-ico.icon-qq(href=`https://connect.qq.com/widget/shareqq/index.html?url=${encodedPath}&title=${encodedTitle}&desc=${encodedDescription}&summary=${encodedDescription}&site=${encodedTitle}&pics=${encodedIcon}` title="QQ")
28
+ when 'weibo'
29
+ a.social-share-ico.icon-weibo(href=`http://service.weibo.com/share/share.php?url=${encodedPath}&title=${encodedTitle}&pic=${encodedIcon}` title="Weibo")
30
+ when 'telegram'
31
+ a.social-share-ico.icon-telegram(href=`https://t.me/share/url?url=${encodedPath}&text=${encodedTitle}` title="Telegram")
32
+ when 'whatsapp'
33
+ a.social-share-ico.icon-whatsapp(href=`https://api.whatsapp.com/send?text=${encodedTitle} ${encodedPath}` title="WhatsApp")
34
+ when 'linkedin'
35
+ a.social-share-ico.icon-linkedin(href=`https://www.linkedin.com/shareArticle?mini=true&url=${encodedPath}&title=${encodedTitle}&summary=${encodedDescription}&source=${encodedTitle}` title="LinkedIn")
36
+ when 'facebook'
37
+ a.social-share-ico.icon-facebook(href=`https://www.facebook.com/sharer/sharer.php?u=${encodedPath}` title="Facebook")
38
+ when 'twitter'
39
+ a.social-share-ico.icon-twitter(href=`https://twitter.com/intent/tweet?url=${encodedPath}&text=${encodedTitle}` title="Twitter")
18
40
  if site.posts.length > 1
19
41
  include includes/widgets/post/postNav
20
42
  if theme.related_post.enable
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  flex-direction column
16
16
  position relative
17
17
 
18
- .vemojis
18
+ .vemojis
19
19
  display: none;
20
20
  position: absolute;
21
21
  left: 0;
@@ -194,6 +194,7 @@
194
194
  flex 1
195
195
  padding 0
196
196
  border 0
197
+ overflow visible
197
198
 
198
199
  .vhead
199
200
  display flex
@@ -56,11 +56,10 @@ pre[class*='language-']
56
56
  color: $highlight-blue
57
57
 
58
58
  .token.deleted
59
- text-decoration: line-through
59
+ color: var(--efu-red)
60
60
 
61
61
  .token.inserted
62
- border-bottom: 1px dotted #202746
63
- text-decoration: none
62
+ color: var(--efu-green)
64
63
 
65
64
  .token.italic
66
65
  font-style: italic
@@ -84,4 +84,4 @@
84
84
  background-color var(--efu-main)
85
85
  color var(--efu-white)
86
86
  cursor pointer
87
- border-radius 4px
87
+ border-radius 4px
@@ -191,6 +191,7 @@
191
191
  display flex
192
192
  align-items center
193
193
  flex-direction row
194
+ justify-content space-between
194
195
  flex-wrap wrap
195
196
 
196
197
  .tag_share
@@ -240,4 +241,112 @@
240
241
  text-align center
241
242
  font-size .6rem
242
243
  color var(--efu-fontcolor)
243
- margin-left 4px
244
+ margin-left 4px
245
+ if hexo-config('post.share.enable')
246
+ /.social-share *
247
+ font-family solitude
248
+ /.social-share
249
+ display: flex;
250
+ justify-content: center;
251
+ margin 10px 0
252
+
253
+ +maxWidth768()
254
+ flex-wrap wrap
255
+
256
+ .social-share-ico
257
+ margin: 0 4px
258
+ width: 1.85em
259
+ height: 1.85em
260
+ font-size: 1.2em
261
+ line-height: 1.85em
262
+ border 1px solid
263
+ position: relative
264
+ display: inline-block;
265
+ border-radius 50%
266
+ text-align: center;
267
+ vertical-align: middle;
268
+ transition: background 0.6s ease-out 0s;
269
+ cursor pointer
270
+
271
+ &:hover
272
+ transition all .3s
273
+ color var(--efu-white)
274
+
275
+ .icon-qq
276
+ color #56b6e7
277
+ border-color #56b6e7
278
+
279
+ &:hover
280
+ background-color #56b6e7
281
+
282
+ &::before
283
+ content "\e0d0"
284
+
285
+ .icon-wechat
286
+ color #57bd6a
287
+ border-color #57bd6a
288
+
289
+ &::before
290
+ content "\e0d2"
291
+
292
+ &:hover
293
+ background-color #57bd6a
294
+
295
+ .icon-weibo
296
+ color #d44040
297
+ border-color #d44040
298
+
299
+ &::before
300
+ content "\e0e3"
301
+
302
+ &:hover
303
+ background-color #d44040
304
+
305
+ .icon-facebook
306
+ color #415dc9
307
+ border-color #415dc9
308
+
309
+ &::before
310
+ content "\e0e6"
311
+
312
+ &:hover
313
+ background-color #415dc9
314
+
315
+ .icon-twitter
316
+ color #56b6e7
317
+ border-color #56b6e7
318
+
319
+ &::before
320
+ content "\e0c1"
321
+
322
+ &:hover
323
+ background-color #56b6e7
324
+
325
+ .icon-telegram
326
+ color #56b6e7
327
+ border-color #56b6e7
328
+
329
+ &::before
330
+ content "\e062"
331
+
332
+ &:hover
333
+ background-color #56b6e7
334
+
335
+ .icon-linkedin
336
+ color #0077b5
337
+ border-color #0077b5
338
+
339
+ &::before
340
+ content "\e0ed"
341
+
342
+ &:hover
343
+ background-color #0077b5
344
+ .icon-whatsapp
345
+ color #25d366
346
+ border-color #25d366
347
+
348
+ &::before
349
+ content "\e0f0"
350
+
351
+ &:hover
352
+ background-color #25d366
@@ -101,6 +101,12 @@
101
101
  padding 4px
102
102
  position relative
103
103
 
104
+ +maxWidth1200()
105
+ width 32.97%
106
+
107
+ +maxWidth768()
108
+ width 49.97%
109
+
104
110
  img
105
111
  max-width: 100%;
106
112
  border-radius: 0;
@@ -148,6 +148,7 @@
148
148
  if (!window.fancyboxRun) {
149
149
  Fancybox.bind('[data-fancybox]', {
150
150
  Hash: false,
151
+ animated: true,
151
152
  Thumbs: {showOnStart: false},
152
153
  Images: {Panzoom: {maxScale: 4}},
153
154
  Carousel: {transition: 'slide'},
@@ -157,7 +158,7 @@
157
158
  middle: ['zoomIn', 'zoomOut', 'toggle1to1', 'rotateCCW', 'rotateCW', 'flipX', 'flipY'],
158
159
  right: ['slideshow', 'thumbs', 'close']
159
160
  }
160
- }
161
+ },
161
162
  });
162
163
  window.fancyboxRun = true;
163
164
  }