hexo-theme-solitude 1.4.7 → 1.5.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.
Files changed (62) hide show
  1. package/CONTRIBUTING.md +16 -3
  2. package/README.md +2 -2
  3. package/README_EN.md +2 -2
  4. package/_config.yml +115 -186
  5. package/languages/en-US.yml +0 -1
  6. package/languages/zh-CN.yml +0 -1
  7. package/languages/zh-TW.yml +0 -1
  8. package/layout/includes/footer.pug +8 -6
  9. package/layout/includes/inject/body.pug +0 -2
  10. package/layout/includes/inject/head.pug +5 -3
  11. package/layout/includes/nav.pug +3 -3
  12. package/layout/includes/sidebar.pug +1 -1
  13. package/layout/includes/widgets/aside/asideInfoCard.pug +4 -3
  14. package/layout/includes/widgets/home/banner.pug +11 -4
  15. package/layout/includes/widgets/home/categoryGroup.pug +12 -8
  16. package/layout/includes/widgets/home/hometop.pug +1 -2
  17. package/layout/includes/widgets/home/postList.pug +2 -2
  18. package/layout/includes/widgets/nav/group.pug +13 -0
  19. package/layout/includes/widgets/nav/menu.pug +20 -16
  20. package/layout/includes/widgets/page/about/award.pug +1 -1
  21. package/layout/includes/widgets/page/equipment/content.pug +1 -1
  22. package/layout/includes/widgets/page/links/linksCard.pug +0 -1
  23. package/layout/includes/widgets/third-party/comments/waline.pug +2 -0
  24. package/layout/includes/widgets/third-party/news-comment/twikoo.pug +2 -2
  25. package/layout/includes/widgets/third-party/news-comment/waline.pug +2 -2
  26. package/layout/includes/widgets/third-party/search/algolia-search.pug +1 -1
  27. package/layout/includes/widgets/third-party/search/local-search.pug +1 -1
  28. package/layout/index.pug +6 -6
  29. package/package.json +1 -1
  30. package/plugins.yml +0 -5
  31. package/scripts/helper/stylus.js +28 -1
  32. package/source/css/_global/animation.styl +6 -0
  33. package/source/css/_layout/basic.styl +10 -1
  34. package/source/css/_layout/header.styl +5 -5
  35. package/source/css/_layout/index.styl +0 -1
  36. package/source/css/_page/_about/skills.styl +1 -1
  37. package/source/css/_page/_home/category-bar.styl +14 -14
  38. package/source/css/_page/_home/home-top.styl +57 -45
  39. package/source/css/_page/_home/recent-post.styl +1 -1
  40. package/source/css/_page/equipment.styl +3 -2
  41. package/source/css/_page/home.styl +0 -15
  42. package/source/css/_page/links.styl +9 -8
  43. package/source/css/_page/says.styl +1 -2
  44. package/source/css/_page/share.styl +30 -67
  45. package/source/css/_widgets/_aside/flip.styl +3 -6
  46. package/source/css/_widgets/_aside/index.styl +1 -1
  47. package/source/css/_widgets/_aside/info.styl +1 -1
  48. package/source/css/_widgets/_comment/twikoo.styl +4 -6
  49. package/source/css/_widgets/_comment/waline.styl +435 -72
  50. package/source/css/_widgets/_extra/console.styl +2 -1
  51. package/source/css/_widgets/_extra/fullpage.styl +1 -1
  52. package/source/css/_widgets/_mixins/footer.styl +4 -2
  53. package/source/css/_widgets/_post/content.styl +1 -11
  54. package/source/css/_widgets/_post/copyright.styl +2 -2
  55. package/source/css/_widgets/_post/meta.styl +2 -2
  56. package/source/css/_widgets/_post/relatedPost.styl +1 -1
  57. package/source/css/_widgets/_post/tools.styl +1 -1
  58. package/source/css/_widgets/_search/algolia-search.styl +4 -2
  59. package/source/css/_widgets/_tags/note.styl +4 -0
  60. package/source/js/main.js +27 -35
  61. package/source/js/sco-ai.min.js +1 -1
  62. package/layout/includes/widgets/nav/left.pug +0 -10
@@ -1,16 +1,20 @@
1
- .menus_items
2
- - var menu = theme.nav && theme.nav.menu ? theme.nav.menu : {}
3
- each value, x in menu
4
- .menus_item
5
- if !value.url
6
- a.site-page(href="javascript:void(0);")
7
- span= x
8
- ul.menus_item_child
9
- each childValue, y in value.child
10
- li
11
- a.site-page.child(href=url_for(childValue.url))
12
- i.scoicon(class=childValue.icon)
13
- span= y
14
- else
15
- a.site-page.not-child(href=url_for(value.url))
16
- span= x
1
+ - var menu = theme.nav.menu
2
+
3
+ if menu
4
+ .menus_items
5
+ each value, label in menu
6
+ .menus_item
7
+ if typeof value !== 'object'
8
+ a.site-page(href=url_for(value))
9
+ span= label
10
+ else
11
+ a.site-page(href="javascript:void(0);")
12
+ span= label
13
+ ul.menus_item_child
14
+ each childValue, childLabel in value
15
+ li
16
+ - var array = childValue.split('||')
17
+ a.site-page.child(href=url_for(trim(array[0])))
18
+ if array[1]
19
+ i.scoicon(class=array[1])
20
+ span= childLabel
@@ -14,7 +14,7 @@ if site.data.about.rewardList
14
14
  .reward-list-item
15
15
  .reward-list-item-name= reward.name
16
16
  .reward-list-bottom-group
17
- .reward-list-item-money(style=(reward.vip ? "background: var(--sco-vip);" : ""))
17
+ .reward-list-item-money(style=(reward.vip ? "background: var(--sco-vip);color: var(--sco-white)" : ""))
18
18
  if reward.icon
19
19
  i.scoicon(class=reward.icon)
20
20
  | ¥ #{reward.money}
@@ -10,7 +10,7 @@
10
10
  .equipment-item-content-item-cover
11
11
  img.equipment-item-content-item-image(src=item.image, alt=item.name)
12
12
  .equipment-item-content-item-info
13
- .equipment-item-content-item-name= item.name
13
+ .equipment-item-content-item-name(onclick='utils.copy("' + item.name + '")')= item.name
14
14
  .equipment-item-content-item-specification= item.specification
15
15
  .equipment-item-content-item-description= item.description
16
16
  if item.link
@@ -6,7 +6,6 @@
6
6
  i.light
7
7
  a.img(title=item.name, href=url_for(item.link))
8
8
  img.flink-avatar(src=item.topimg + (data.topimg_suffix || ''), alt=item.name)
9
- .img-alt.is-center= item.name
10
9
  a.info.cf-friends-link(title=item.name, href=url_for(item.link))
11
10
  .site-card-avatar
12
11
  img.flink-avatar.cf-friends-avatar(src=item.avatar + (data.suffix || ''), alt=item.name)
@@ -11,4 +11,6 @@ script.
11
11
  search: false,
12
12
  comment: #{theme.post.meta.comment && is_post()},
13
13
  }, !{JSON.stringify(option)}))
14
+
15
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll('#comment .wl-content img:not(.wl-emoji)'))
14
16
  }
@@ -44,12 +44,12 @@ script.
44
44
  const $dom = document.querySelector('#card-newest-comments .aside-list')
45
45
  $dom.innerHTML = array.length ? array.map(item => `
46
46
  <div class='aside-list-item'>
47
- <a href='${item.url}' class='thumbnail'>
47
+ <a onclick='pjax.loadUrl("${item.url}")' class='thumbnail'>
48
48
  <img src='${item.avatar}' alt='${item.nick}'>
49
49
  <div class='name'><span>${item.nick}</span></div>
50
50
  </a>
51
51
  <div class='content'>
52
- <a class='comment' href='${item.url}'>${item.content}</a>
52
+ <a class='comment' onclick='pjax.loadUrl("${item.url}")'>${item.content}</a>
53
53
  <time class="datetime" datetime="${item.date}"></time>
54
54
  </div>
55
55
  </div>
@@ -45,12 +45,12 @@ script.
45
45
  const $dom = document.querySelector('#card-newest-comments .aside-list')
46
46
  $dom.innerHTML = array.length ? array.map(item => `
47
47
  <div class='aside-list-item'>
48
- <a href='${item.url}' class='thumbnail'>
48
+ <a onclick='pjax.loadUrl("${item.url}")' class='thumbnail'>
49
49
  <img src='${item.avatar}' alt='${item.nick}'>
50
50
  <div class='name'><span>${item.nick}</span></div>
51
51
  </a>
52
52
  <div class='content'>
53
- <a class='comment' href='${item.url}'>${item.content}</a>
53
+ <a class='comment' onclick='pjax.loadUrl("${item.url}")'>${item.content}</a>
54
54
  <time class="datetime" datetime="${item.date}"></time>
55
55
  </div>
56
56
  </div>
@@ -12,7 +12,7 @@
12
12
  #search-results
13
13
  #algolia-hits
14
14
  each tag in theme.search.tags || []
15
- a.tag-list(href='/tags/' + tag + '/')=tag
15
+ a.tag-list(href="javascript:void(0);" onclick="pjax.loadUrl('/tags/" + tag + "/')")=tag
16
16
 
17
17
  #algolia-tips
18
18
  #algolia-pagination
@@ -10,7 +10,7 @@
10
10
  div#search-results
11
11
  #search-hits
12
12
  each tag in theme.search.tags || []
13
- a.tag-list(href='/tags/' + tag + '/')=tag
13
+ a.tag-list(href='javascript:void(0);' onclick="pjax.loadUrl('/tags/" + tag + "/')")=tag
14
14
  div#search-pagination
15
15
  div#search-tips
16
16
  div#search-mask
package/layout/index.pug CHANGED
@@ -1,20 +1,20 @@
1
- extends includes/layout.pug
1
+ extends includes/layout
2
2
 
3
3
  block content
4
4
  #home_top
5
5
  if theme.says.home_mini
6
6
  include ./includes/widgets/home/bbTimeList
7
7
  if theme.hometop.banner.enable && is_home_first_page()
8
- include ./includes/widgets/home/hometop.pug
8
+ include ./includes/widgets/home/hometop
9
9
  main.layout#content-inner
10
10
  .recent-posts#recent-posts
11
11
  #category-bar
12
- include ./includes/widgets/home/categoryBar.pug
12
+ include ./includes/widgets/home/categoryBar
13
13
  for post in page.posts.sort("-sticky" || "-date").data
14
- include ./includes/widgets/home/postList.pug
14
+ include ./includes/widgets/home/postList
15
15
 
16
16
  // pageination
17
- include ./includes/mixins/pagination.pug
17
+ include ./includes/mixins/pagination
18
18
 
19
19
  // aside
20
- include ./includes/widgets/aside/aside.pug
20
+ include ./includes/widgets/aside/aside
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.4.7",
3
+ "version": "1.5.1",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the wleelw",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -19,11 +19,6 @@ waline_js:
19
19
  file: dist/waline.js
20
20
  other_name: waline
21
21
  version: 2.15.8
22
- waline_css:
23
- name: '@waline/client'
24
- file: dist/waline.css
25
- other_name: waline
26
- version: 2.15.8
27
22
  sharejs:
28
23
  name: butterfly-extsrc
29
24
  file: sharejs/dist/js/social-share.min.js
@@ -21,4 +21,31 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
21
21
  }
22
22
 
23
23
  style.define('about', data && data.about ? Object.keys(data.about) : []);
24
- });
24
+
25
+ initGroupColor(theme.config.hometop.group,style);
26
+ });
27
+
28
+ function initGroupColor(gg,style) {
29
+ if(gg === null || gg === undefined) {
30
+ style.define('banner_group', [])
31
+ return;
32
+ }
33
+ let group = Object.keys(gg).map(key => {
34
+ return {
35
+ [key]: (gg[key]).split('||')[2]
36
+ }
37
+ });
38
+
39
+ style.define('banner_group', group);
40
+
41
+ function getGroupColor(key) {
42
+ let color = '';
43
+ group.forEach(item => {
44
+ if (item[key]) {
45
+ color = item[key];
46
+ }
47
+ });
48
+ return color;
49
+ }
50
+ style.define('getGroupColor', getGroupColor);
51
+ }
@@ -214,6 +214,12 @@
214
214
  transform translate3d(85px, 0, 0)
215
215
 
216
216
  @keyframes rowup
217
+ from
218
+ transform translateY(0)
219
+ to
220
+ transform translateY(-50%)
221
+
222
+ @keyframes rowleft
217
223
  from
218
224
  transform translateX(0)
219
225
  to
@@ -296,4 +296,13 @@ b, strong
296
296
  .button--animated
297
297
  border-radius 8px
298
298
  transition .3s
299
- position relative
299
+ position relative
300
+
301
+ if hexo-config('fancybox')
302
+ a.fancybox
303
+ border-bottom 0
304
+ padding 0
305
+ margin auto
306
+ display contents
307
+ width fit-content
308
+ user-select none
@@ -97,7 +97,7 @@
97
97
  transition 0.3s
98
98
  display flex
99
99
  justify-content center
100
- -webkit-user-select none
100
+ user-select none
101
101
 
102
102
  +maxWidth768()
103
103
  background linear-gradient(to top, var(--sco-main-none) 0, var(--sco-main) 100%)
@@ -558,7 +558,7 @@
558
558
  font-size .78em
559
559
  cursor pointer
560
560
 
561
- if hexo-config('nav.left.enable')
561
+ if hexo-config('nav.group')
562
562
  .back-home-button
563
563
  &:hover
564
564
  +minWidth900()
@@ -658,7 +658,7 @@
658
658
  transition .3s
659
659
  white-space nowrap
660
660
 
661
- if hexo-config('nav.left.enable')
661
+ if hexo-config('nav.group')
662
662
  .back-home-button
663
663
  display flex
664
664
  width 35px
@@ -749,7 +749,7 @@ if hexo-config('nav.left.enable')
749
749
  +minWidth900()
750
750
  background var(--sco-lighttext)
751
751
 
752
- if hexo-config('nav.left.enable')
752
+ if hexo-config('nav.group')
753
753
  .back-home-button
754
754
  color var(--sco-fontcolor)
755
755
 
@@ -767,7 +767,7 @@ if hexo-config('nav.left.enable')
767
767
  background-color var(--sco-main)
768
768
 
769
769
  .post
770
- if hexo-config('nav.left.enable')
770
+ if hexo-config('nav.group')
771
771
  .back-home-button
772
772
  color var(--sco-white)
773
773
 
@@ -30,7 +30,6 @@
30
30
  align-self flex-start
31
31
  animation slide-in .6s .1s backwards
32
32
  position relative
33
- overflow hidden
34
33
 
35
34
  +maxWidth768()
36
35
  box-shadow none
@@ -16,7 +16,7 @@
16
16
  margin-top 20px
17
17
  display flex
18
18
  flex-wrap nowrap
19
- animation rowup 60s linear infinite
19
+ animation rowleft 60s linear infinite
20
20
 
21
21
  .skills-style-group
22
22
  position relative
@@ -1,18 +1,18 @@
1
1
  #category-bar
2
- padding: 0.4rem 1rem 0.4rem 0.7rem;
3
- background: var(--sco-card-bg);
4
- border-radius: 12px;
5
- display: flex;
6
- white-space: nowrap;
7
- overflow: hidden;
8
- margin-bottom: 1rem;
9
- border: var(--style-border);
10
- transition: 0.3s;
11
- height: 50px;
12
- width: 100%;
13
- justify-content: space-between;
14
- -webkit-user-select: none;
15
- align-items: center;
2
+ padding 0.4rem 1rem 0.4rem 0.7rem
3
+ background var(--sco-card-bg)
4
+ border-radius 12px
5
+ display flex
6
+ white-space nowrap
7
+ overflow hidden
8
+ margin-bottom 1rem
9
+ border var(--style-border)
10
+ transition 0.3s
11
+ height 50px
12
+ width 100%
13
+ justify-content space-between
14
+ user-select none
15
+ align-items center
16
16
 
17
17
  +maxWidth1300()
18
18
  margin-bottom 1rem
@@ -5,7 +5,7 @@
5
5
  overflow-x auto
6
6
  width 100%
7
7
  margin-bottom 0
8
- -webkit-user-select none
8
+ user-select none
9
9
 
10
10
  +maxWidth768()
11
11
  border-radius 0
@@ -31,15 +31,27 @@
31
31
  flex-direction column
32
32
  justify-content space-between
33
33
 
34
+ .tags-group-wrapper
35
+ margin-top 0
36
+ display flex
37
+ flex-wrap wrap
38
+ animation rowup 60s linear infinite
39
+ width 300px
40
+ margin-left auto
41
+
42
+ .tags-group-icon-pair
43
+ display flex
44
+
45
+ .tags-group-icon:nth-child(even)
46
+ margin-left 4rem
47
+
34
48
  .categoryGroup
35
49
  display flex
36
50
  flex-direction column
37
51
  justify-content space-between
38
52
  min-width 200px
39
53
  +minWidth1200()
40
- flex-direction row
41
- height 24%
42
- animation slide-in .6s .2s backwards
54
+ display none
43
55
  +maxWidth768()
44
56
  min-width 130px
45
57
  margin-bottom .5rem
@@ -59,22 +71,6 @@
59
71
  height 47%
60
72
  box-shadow none
61
73
 
62
- &:nth-child(3)
63
- display none
64
- +minWidth1200()
65
- width calc(100% / 3 - .33rem)
66
- height 100%
67
- margin-right .5rem
68
-
69
- &:last-child
70
- margin-right 0
71
-
72
- &:hover
73
- width 50%
74
-
75
- &:nth-child(3)
76
- display flex
77
-
78
74
  a.categoryButton
79
75
  height 100%
80
76
  width 100%
@@ -129,30 +125,6 @@
129
125
  .categoryButtonText
130
126
  padding-left 21px
131
127
 
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)
138
- background-size 200%
139
-
140
- &.remen
141
- background linear-gradient(to right, #f65, #ffbf37)
142
- background-size 200%
143
-
144
- [data-theme=dark] &
145
- background linear-gradient(to right, #e22a16, #da980c)
146
- background-size 200%
147
-
148
- &.shiyong
149
- background linear-gradient(to right, #18e7ae, #1eebeb)
150
- background-size 200%
151
-
152
- [data-theme=dark] &
153
- background linear-gradient(to right, #099e74, #0ea4a4)
154
- background-size 200%
155
-
156
128
  /.topGroup
157
129
  display: flex
158
130
 
@@ -340,4 +312,44 @@
340
312
  transform: scale(1.2)
341
313
 
342
314
  .banner-button-group
343
- bottom: 1rem
315
+ bottom: 1rem
316
+
317
+ .banners-links
318
+ display flex
319
+ position absolute
320
+ bottom 20px
321
+ left 40px
322
+ flex-direction column
323
+ justify-content space-between
324
+ flex-wrap wrap
325
+ height 120px
326
+
327
+ .tags-group-icon-pair
328
+ margin-left 1rem
329
+ user-select none
330
+
331
+ .banners-link-btn
332
+ display flex
333
+ flex-direction row
334
+ align-items center
335
+ padding 8px 18px 8px 14px
336
+ border-radius 60px
337
+ margin-bottom 12px
338
+ color var(--sco-white)
339
+ width 94px
340
+ position relative
341
+ background-size 200%
342
+
343
+ &:not(:last-child)
344
+ margin-right 10px
345
+
346
+ &:hover
347
+ background-position 100% 0
348
+
349
+ .banners-link-title
350
+ margin-left auto
351
+
352
+ for name in banner_group
353
+ .banners-link-{name}
354
+ background convert(getGroupColor(name))
355
+ background-size 200%
@@ -6,7 +6,7 @@
6
6
  justify-content space-between
7
7
  align-items flex-start
8
8
  align-content flex-start
9
- -webkit-user-select none
9
+ user-select none
10
10
  transition width .3s
11
11
 
12
12
  +maxWidth768()
@@ -26,6 +26,7 @@
26
26
  box-shadow var(--sco-shadow-border)
27
27
  min-height 400px
28
28
  position relative
29
+ user-select none
29
30
 
30
31
  +maxWidth1200()
31
32
  width calc(50% - 12px)
@@ -56,11 +57,11 @@
56
57
  white-space nowrap
57
58
  overflow hidden
58
59
  text-overflow ellipsis
59
- cursor pointer
60
60
  width fit-content
61
61
 
62
62
  &:hover
63
- color var(--sco-main)
63
+ color var(--sco-vip)
64
+ cursor pointer
64
65
 
65
66
  .equipment-item-content-item-specification
66
67
  font-size 12px
@@ -15,21 +15,6 @@
15
15
  > div:not(.author-content-item)
16
16
  animation slide-in .6s .2s backwards
17
17
 
18
- .tags-group-icon
19
- width: 120px
20
- height: 120px
21
- border-radius: 30px
22
- display: flex
23
- align-items: center
24
- justify-content: center
25
- color: #fff
26
- font-size: 66px
27
- font-weight: 700
28
- box-shadow: var(--sco-shadow-blackdeep)
29
-
30
- img
31
- width: 60%
32
-
33
18
  +minWidth768()
34
19
  > div:nth-child(1) > a::before
35
20
  height: 24px
@@ -82,7 +82,6 @@
82
82
  width calc(50% - 16px)
83
83
 
84
84
  .img
85
- -webkit-mask-image -webkit-radial-gradient(center, #fff, #000)
86
85
  border-radius 0
87
86
  height 120px
88
87
  width 100%
@@ -91,17 +90,16 @@
91
90
  padding 0
92
91
  transition all .3s ease 0s
93
92
  overflow hidden
94
- background-color #f6f6f6
95
93
 
96
94
  img
97
- width 100%
98
- height 100%
99
- object-fit cover
100
95
  border-radius 0
101
96
  transform scale(1.03)
102
97
  transition .3s
103
98
  margin 0
104
99
  max-width 100%
100
+ width 100%
101
+ height 100%
102
+ object-fit cover
105
103
 
106
104
  .img-alt
107
105
  display none
@@ -158,18 +156,21 @@
158
156
  box-shadow var(--sco-shadow-main)
159
157
 
160
158
  .site-card-tag
161
- left: -80px
159
+ left: -60px
162
160
 
163
161
  .img
164
162
  height 80px
163
+ transform scale(1.1)
164
+ filter brightness(.3)
165
+ border-radius 12px
166
+ background var(--sco-lighttext)
165
167
 
166
168
  img
169
+ border-radius 12px
167
170
  transform scale(1.1)
168
171
  filter brightness(.3)
169
- cursor pointer
170
172
 
171
173
  a
172
- border-bottom 2px solid var(--sco-none)
173
174
  color var(--sco-white)
174
175
  background var(--sco-main)
175
176
  box-shadow var(--sco-shadow-main)
@@ -11,7 +11,7 @@ if hexo-config('says.home_mini')
11
11
  height 50px
12
12
  width 100%
13
13
  justify-content space-between
14
- -webkit-user-select none
14
+ user-select none
15
15
  align-items center
16
16
  padding .5rem 1rem
17
17
 
@@ -108,7 +108,6 @@ if hexo-config('says.enable')
108
108
  display flex
109
109
  justify-content space-between
110
110
  width 100%
111
- -webkit-user-select none
112
111
  user-select none
113
112
 
114
113
  .bber-info