hexo-theme-solitude 1.9.0 → 1.9.1

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:
@@ -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.1",
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;",
@@ -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}
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.1",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -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
@@ -201,10 +202,6 @@
201
202
  flex-wrap wrap
202
203
  flex-direction row
203
204
 
204
- a
205
- margin-bottom 8px
206
- margin-right 8px
207
-
208
205
  .post-meta__tags
209
206
  background var(--efu-card-bg)
210
207
  border var(--style-border-always)
@@ -240,4 +237,112 @@
240
237
  text-align center
241
238
  font-size .6rem
242
239
  color var(--efu-fontcolor)
243
- margin-left 4px
240
+ margin-left 4px
241
+ if hexo-config('post.share.enable')
242
+ /.social-share *
243
+ font-family solitude
244
+ /.social-share
245
+ display: flex;
246
+ justify-content: center;
247
+ margin 10px 0
248
+
249
+ +maxWidth768()
250
+ flex-wrap wrap
251
+
252
+ .social-share-ico
253
+ margin: 0 4px
254
+ width: 1.85em
255
+ height: 1.85em
256
+ font-size: 1.2em
257
+ line-height: 1.85em
258
+ border 1px solid
259
+ position: relative
260
+ display: inline-block;
261
+ border-radius 50%
262
+ text-align: center;
263
+ vertical-align: middle;
264
+ transition: background 0.6s ease-out 0s;
265
+ cursor pointer
266
+
267
+ &:hover
268
+ transition all .3s
269
+ color var(--efu-white)
270
+
271
+ .icon-qq
272
+ color #56b6e7
273
+ border-color #56b6e7
274
+
275
+ &:hover
276
+ background-color #56b6e7
277
+
278
+ &::before
279
+ content "\e0d0"
280
+
281
+ .icon-wechat
282
+ color #57bd6a
283
+ border-color #57bd6a
284
+
285
+ &::before
286
+ content "\e0d2"
287
+
288
+ &:hover
289
+ background-color #57bd6a
290
+
291
+ .icon-weibo
292
+ color #d44040
293
+ border-color #d44040
294
+
295
+ &::before
296
+ content "\e0e3"
297
+
298
+ &:hover
299
+ background-color #d44040
300
+
301
+ .icon-facebook
302
+ color #415dc9
303
+ border-color #415dc9
304
+
305
+ &::before
306
+ content "\e0e6"
307
+
308
+ &:hover
309
+ background-color #415dc9
310
+
311
+ .icon-twitter
312
+ color #56b6e7
313
+ border-color #56b6e7
314
+
315
+ &::before
316
+ content "\e0c1"
317
+
318
+ &:hover
319
+ background-color #56b6e7
320
+
321
+ .icon-telegram
322
+ color #56b6e7
323
+ border-color #56b6e7
324
+
325
+ &::before
326
+ content "\e062"
327
+
328
+ &:hover
329
+ background-color #56b6e7
330
+
331
+ .icon-linkedin
332
+ color #0077b5
333
+ border-color #0077b5
334
+
335
+ &::before
336
+ content "\e0ed"
337
+
338
+ &:hover
339
+ background-color #0077b5
340
+ .icon-whatsapp
341
+ color #25d366
342
+ border-color #25d366
343
+
344
+ &::before
345
+ content "\e0f0"
346
+
347
+ &:hover
348
+ 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;