hexo-theme-solitude 3.0.6 → 3.0.8

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/_config.yml CHANGED
@@ -112,8 +112,8 @@ carousel: false
112
112
  # Aside
113
113
  # 侧边栏
114
114
  aside:
115
- # Values: about (info card), newestPost (latest article), allInfo (website information), flip (official account QR code), newest_comment (latest comment)
116
- # 值: about(信息卡), newestPost(最新文章), allInfo(网站信息), flip(官方账号二维码), newest_comment(最新评论)
115
+ # Values: about (info card), newestPost (latest article), allInfo (website information), newest_comment (latest comment)
116
+ # 值: about(信息卡), newestPost(最新文章), allInfo(网站信息), newest_comment(最新评论)
117
117
 
118
118
  # Sticky: Fixed position / noSticky: Not fixed position
119
119
  # Sticky: 固定位置 / noSticky: 不固定位置
@@ -157,16 +157,6 @@ aside:
157
157
  # Bilibili: https://space.bilibili.com/1329819902 || fab fa-bilibili
158
158
  # --------------------------- end ---------------------------
159
159
 
160
- # --------------------------- start ---------------------------
161
- # Sidebar QR code component
162
- # 侧边栏二维码组件
163
- flip:
164
- favicon: # url (favicon)
165
- face: # url (QR code)
166
- backface: # url (QR code)
167
- backcolor: "var(--efu-blue)" # Background color
168
- # --------------------------- end ---------------------------
169
-
170
160
  # --------------------------- start ---------------------------
171
161
  # article table of contents
172
162
  # 文章目录
@@ -187,14 +177,6 @@ aside:
187
177
  # - Hexo
188
178
  # --------------------------- end ---------------------------
189
179
 
190
- # --------------------------- start ---------------------------
191
- # Archive
192
- # 归档
193
- archive:
194
- enable: false
195
- type: "month" # month: by month / year: by year
196
- # --------------------------- end ---------------------------
197
-
198
180
  # --------------------------- start ---------------------------
199
181
  # Site Info
200
182
  # 网站信息
@@ -510,7 +492,7 @@ console:
510
492
  tags: true
511
493
  # Archives
512
494
  # 归档
513
- archive: true
495
+ archive: "month" # month: by month / year: by year
514
496
  # --------------------------- end ---------------------------
515
497
 
516
498
  # --------------------------- start ---------------------------
package/languages/en.yml CHANGED
File without changes
File without changes
File without changes
@@ -45,7 +45,21 @@ div#console
45
45
  sup= tag.length
46
46
  if card.archive
47
47
  div.console-card.history(onclick="sco.hideConsole()")
48
- include ./widgets/aside/asideArchive.pug
48
+ - var archives = getArchiveLength(card.archive ? card.archive : 'year')
49
+ ul.card-archive-list
50
+ each value, key in archives
51
+ li.item
52
+ a(href=`/archives/${key}/`)
53
+ span.date= key
54
+ .count-group
55
+ span.count= value
56
+ span.unit= __('console.archive_unit')
57
+ li.item
58
+ a(href='/archives/')
59
+ span.date= __('console.archive_all')
60
+ .count-group
61
+ span.count= site.posts.length
62
+ span.unit= __('console.archive_unit')
49
63
 
50
64
  div.button-group
51
65
  div.console-btn-item
@@ -31,7 +31,7 @@ div#sidebar(style="zoom: 1;")
31
31
  include ./widgets/nav/group
32
32
  include ./widgets/nav/menu.pug
33
33
  span.sidebar-menu-item-title= __('page.tag')
34
- div.card-widget.card-tags.card-archives.card-webinfo.card-allinfo
34
+ div.card-tags
35
35
  div.card-tag-cloud
36
36
  each tag in site.tags.find({ parent: { $exists: false } }).data
37
37
  a(href=url_for(tag.path))= tag.name
@@ -40,8 +40,5 @@ div#sidebar(style="zoom: 1;")
40
40
  span.sidebar-menu-item-title= __('sidebar.siteinfo')
41
41
  .webinfo
42
42
  .webinfo-item
43
- .webinfo-item-title
44
- i.item-icon.solitude.fas.fa-file-word
45
- .item-name= __('aside.wordcount')
46
- .item-count= totalcount(site)
47
-
43
+ .item-name= __('aside.wordcount')
44
+ .item-count= totalcount(site)
@@ -12,12 +12,12 @@ else if(is_page() || is_archive() || is_tag() || is_category())
12
12
  - Sticky = aside.page.Sticky ? aside.page.Sticky.split(',') : null
13
13
  if noSticky || Sticky
14
14
  .aside-content#aside-content
15
- each item in noSticky
15
+ each item in noSticky || []
16
16
  include ./asideSwitch.pug
17
17
  .sticky_layout
18
18
  if showToc
19
19
  include ./asideToc.pug
20
- each item in Sticky
20
+ each item in Sticky || []
21
21
  include ./asideSwitch.pug
22
22
  else
23
23
  style.
@@ -2,7 +2,4 @@
2
2
  if theme.aside.tags.enable
3
3
  include ./asideTag
4
4
  hr
5
- if theme.aside.archive.enable
6
- include ./asideArchive
7
- hr
8
5
  include ./asideWebInfo
@@ -1,20 +1,19 @@
1
1
  .card-widget.card-info
2
2
  .card-content
3
3
  .card-info-avatar.is-center
4
- .author-info__top-group
5
- .author-info__sayhi#author-info__sayhi(onclick="sco.changeWittyWord()")
6
- .avatar-img-group
7
- img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.my_card.author.img)
4
+ .top-group
5
+ .sayhi#sayhi(onclick="sco.changeWittyWord()")
6
+ .avatar
7
+ img(alt=_p('aside.avatar'), src=theme.aside.my_card.author.img)
8
8
  if theme.aside.my_card.author.sticker
9
- .avatar-sticker
10
- img.avatar-sticker-img(src=theme.aside.my_card.author.sticker, alt=_p('aside.sticker'))
11
- .author-info__description_group
12
- .author-info__description!= theme.aside.my_card.content
13
- .author-info__bottom-group
14
- span.author-info__bottom-group-left
15
- .author-info__name= config.author
16
- .author-info__desc!= theme.aside.my_card.description
17
- .card-info-social-icons.is-center
9
+ .sticker
10
+ img.sticker-img(src=theme.aside.my_card.author.sticker, alt=_p('aside.sticker'))
11
+ .description!= theme.aside.my_card.content
12
+ .bottom-group
13
+ span.left
14
+ .name= config.author
15
+ .desc!= theme.aside.my_card.description
16
+ .social-icons.is-center
18
17
  each value, label in theme.aside.my_card.information || {}
19
18
  - var array = value.split('||')
20
19
  a.social-icon(href=url_for(trim(array[0])), title=label)
@@ -11,4 +11,4 @@
11
11
  .content
12
12
  span.title(href=url_for(post.path) title=post.title)= post.title
13
13
  if post.categories.data[0]
14
- span.article-recent_post_categories(href=url_for(post.path))= post.categories.data[0].name
14
+ span.categories(href=url_for(post.path))= post.categories.data[0].name
@@ -1,8 +1,6 @@
1
1
  case item
2
2
  when 'about'
3
3
  include ./asideInfoCard.pug
4
- when 'flip'
5
- include ./asideFlipCard.pug
6
4
  when 'newestPost'
7
5
  include ./asideNewestPost.pug
8
6
  when 'allInfo'
@@ -1,16 +1,12 @@
1
1
  .webinfo
2
2
  if theme.aside.siteinfo.postcount
3
3
  .webinfo-item
4
- .webinfo-item-title
5
- i.item-icon.fas.fa-folder-closed
6
- .item-name= __('aside.postcount')
4
+ .item-name= __('aside.postcount')
7
5
  .item-count= site.posts.length
8
6
  if theme.busuanzi
9
7
  if theme.aside.siteinfo.pv
10
8
  .webinfo-item
11
- .webinfo-item-title
12
- i.item-icon.solitude.fas.fa-eye
13
- .item-name= __('aside.pv')
9
+ .item-name= __('aside.pv')
14
10
  if theme.busuanzi_use === 0
15
11
  span#busuanzi_value_site_pv
16
12
  i.solitude.fas.fa-spinner.fa-spin
@@ -19,9 +15,7 @@
19
15
  i.solitude.fas.fa-spinner.fa-spin
20
16
  if theme.aside.siteinfo.uv
21
17
  .webinfo-item
22
- .webinfo-item-title
23
- i.item-icon.solitude.fas.fa-user
24
- .item-name= __('aside.uv')
18
+ .item-name= __('aside.uv')
25
19
  if theme.busuanzi_use === 0
26
20
  span#busuanzi_value_site_uv
27
21
  i.solitude.fas.fa-spinner.fa-spin
@@ -30,19 +24,13 @@
30
24
  i.solitude.fas.fa-spinner.fa-spin
31
25
  if theme.aside.siteinfo.runtimeenable
32
26
  .webinfo-item
33
- .webinfo-item-title
34
- i.item-icon.solitude.fas.fa-calendar-day
35
- .item-name= __('aside.runtime')
27
+ .item-name= __('aside.runtime')
36
28
  .item-count#runtimeshow
37
29
  if theme.aside.siteinfo.updatetime
38
30
  .webinfo-item
39
- .webinfo-item-title
40
- i.item-icon.solitude.fas.fa-arrows-rotate
41
- .item-name= __('aside.updatetime')
31
+ .item-name= __('aside.updatetime')
42
32
  time.item-count(datetime=new Date())
43
33
  if theme.wordcount && theme.aside.siteinfo.wordcount
44
34
  .webinfo-item
45
- .webinfo-item-title
46
- i.item-icon.solitude.fas.fa-file-word
47
- .item-name= __('aside.wordcount')
35
+ .item-name= __('aside.wordcount')
48
36
  .item-count= totalcount(site)
@@ -14,7 +14,7 @@ if site.data.about.rewardList && site.data.about.award.enable
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(--efu-vip);color: var(--efu-white)" : ""))
17
+ .reward-list-item-money(style="background-color:" + reward.color)
18
18
  if reward.icon
19
19
  i.solitude(class=reward.icon)
20
20
  | ¥ #{reward.money}
@@ -10,23 +10,19 @@ if skills || careers
10
10
  span.author-content-item-title= skills.subtitle
11
11
  .skills-style-group
12
12
  .tags-group-all
13
- - let times = 4 * (skills.tags.length? Math.ceil(20/skills.tags.length):0)
14
- - let length = times * skills.tags.length
15
- - let duration = length * 1200 - 900
16
- .tags-group-wrapper(style=`animation-duration: ${duration}ms`)
13
+ .tags-group-wrapper
17
14
  - var pair = []
18
- - for (let i = 0; i < times; i++)
19
- each tag, index in skills.tags
20
- - pair.push(tag)
21
- if pair.length === 2
22
- .tags-group-icon-pair
23
- each item in pair
24
- .tags-group-icon(style=`background:${item.color}`)
25
- if item.img
26
- img(src=item.img, title=item.title)
27
- else if item.icon
28
- i(class=item.icon, title=item.title, style=`color: ${item.icon_color ? item.icon_color : ''}`)
29
- - pair = []
15
+ each tag, index in skills.tags
16
+ - pair.push(tag)
17
+ if pair.length === 2
18
+ .tags-group-icon-pair
19
+ each item in pair
20
+ .tags-group-icon(style=`background:${item.color}`)
21
+ if item.img
22
+ img(src=item.img, title=item.title)
23
+ else if item.icon
24
+ i(class=item.icon, title=item.title, style=`color: ${item.icon_color ? item.icon_color : ''}`)
25
+ - pair = []
30
26
  .skills-list
31
27
  each tag in skills.tags
32
28
  .skill-info
@@ -15,28 +15,18 @@
15
15
  - if (site.data.links.swiper !== false)
16
16
  .tags-group-all.nowrapMove
17
17
  - const data = site.data.links.links.filter(x => x.type !== 'discn')
18
- - var links = []
19
- each x in data
20
- each y in x.link_list
21
- - links.push(y)
22
- - let times = 4 * (links.length? Math.ceil(20/links.length):0)
23
- - let length = times * links.length
24
- - let duration = length * 1500 - 1400
25
- - let originalLinks = links
26
- - for (let i = 1; i < times; i++)
27
- - links = links.concat(originalLinks)
28
- .tags-group-wrapper(style=`animation-duration: ${duration}ms`)
29
- - var pairs = []
30
- each link, index in links
31
- if (index % 2 === 0)
32
- - pairs.push([link])
33
- else
34
- - pairs[pairs.length - 1].push(link)
35
- each pair in pairs
36
- .tags-group-icon-pair
37
- each y in pair
38
- a.tags-group-icon(href=url_for(y.link), title=y.name)
39
- img(src=y.avatar + (site.data.links.banner_suffix || ''), title=y.name)
40
- span.tags-group-title=y.name
18
+ - const links = data.flatMap(x => x.link_list)
19
+ .tags-group-wrapper
20
+ - const pairs = links.reduce(function(acc, link, index) {
21
+ - if (index % 2 === 0) acc.push([link])
22
+ - else acc[acc.length - 1].push(link)
23
+ - return acc
24
+ - }, [])
25
+ each pair in pairs
26
+ .tags-group-icon-pair
27
+ each y in pair
28
+ a.tags-group-icon(href=url_for(y.link), title=y.name)
29
+ img(src=y.avatar + (site.data.links.banner_suffix || ''), title=y.name)
30
+ span.tags-group-title=y.name
41
31
  - else
42
32
  .tags-group-all(style="height:calc(3rem + 72px);")
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
5
5
  "main": "package.json",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
6
9
  "keywords": [
7
10
  "hexo",
8
11
  "theme",
@@ -26,8 +29,5 @@
26
29
  },
27
30
  "homepage": "https://solitude.js.org",
28
31
  "author": "Hexo-Theme-Solitude<o@efu.me>",
29
- "license": "Apache-2.0",
30
- "scripts": {
31
- "test": "echo \"Error: no test specified\" && exit 1"
32
- }
33
- }
32
+ "license": "Apache-2.0"
33
+ }
@@ -53,12 +53,6 @@ hexo.extend.filter.register('before_generate', () => {
53
53
  witty_words: [],
54
54
  information: null,
55
55
  },
56
- flip: {
57
- favicon: '',
58
- face: '',
59
- backface: '',
60
- backcolor: 'var(--efu-blue)'
61
- },
62
56
  newest_comment: {
63
57
  enable: false,
64
58
  storage: 0.5,
@@ -66,7 +60,6 @@ hexo.extend.filter.register('before_generate', () => {
66
60
  },
67
61
  toc: { post: true, page: false, vague: true },
68
62
  tags: { enable: true, limit: 20, highlight: false, list: [] },
69
- archive: { enable: true, type: 'month' },
70
63
  siteinfo: {
71
64
  postcount: true,
72
65
  wordcount: false,
@@ -55,6 +55,8 @@
55
55
  --card-hover-box-shadow 0 3px 8px 6px rgba(7, 17, 27, 0.15)
56
56
  --offset 0px
57
57
  --hlscrollbar-bg #121212
58
+ --gap .5rem
59
+ --radius 8px
58
60
 
59
61
  body
60
62
  position relative
@@ -143,10 +145,8 @@ h1, h2, h3, h4, h5, h6
143
145
  color var(--efu-fontcolor)
144
146
 
145
147
  hr
146
- box-sizing content-box
147
- height 0
148
- overflow visible
149
- display none
148
+ margin .5rem 0
149
+ border 1px dashed var(--efu-theme-op)
150
150
 
151
151
  a
152
152
  color var(--efu-fontcolor)
@@ -381,15 +381,16 @@ i.solitude
381
381
  max-width 1400px
382
382
  flex-grow 1
383
383
 
384
- /.hide-aside.layout
385
- max-width 1400px
386
-
387
- > div
388
- width 100% !important
384
+ &.hide-aside
385
+ > div:first-child
386
+ width 100%
389
387
 
390
388
  > div:first-child
391
389
  width calc(100% - 300px)
392
390
 
391
+ .hide-aside &
392
+ width 100%
393
+
393
394
  +maxWidth1200()
394
395
  width 100%
395
396
 
@@ -426,9 +427,6 @@ span.tags-punctuation
426
427
  margin-right 2px
427
428
  opacity .4
428
429
 
429
- .hide-aside #page &
430
- font-size 16px
431
-
432
430
  #post-info &
433
431
  font-size 14px
434
432
  line-height 32px
@@ -22,16 +22,6 @@
22
22
  &.fancybox
23
23
  border-bottom none
24
24
 
25
- &:not(.fancybox)
26
- padding 0 4px
27
-
28
- &:hover
29
- border 0
30
- text-decoration none
31
- color var(--efu-white)
32
- border-radius 4px
33
- background var(--efu-main)
34
-
35
25
  .table-wrap
36
26
  margin 1rem 0
37
27
  border-radius 8px
@@ -73,16 +63,16 @@
73
63
  a
74
64
  &:not(.fancybox)
75
65
  text-decoration none
76
- border-bottom 2px dotted var(--efu-lighttext)
77
- color var(--efu-fontcolor)
66
+ border none
67
+ color var(--efu-theme)
78
68
  font-weight 700
79
69
  padding 0 4px
80
- border-radius 4px 4px 0 0
70
+ background linear-gradient(to top, var(--efu-theme-op), var(--efu-theme-op)) no-repeat bottom / 100% .1em
71
+ transition all .2s
81
72
 
82
73
  &:hover
83
- color var(--efu-white)
84
74
  border-radius 4px
85
- background var(--efu-main)
75
+ background-size: 100% 100%
86
76
 
87
77
  blockquote
88
78
  p
@@ -91,13 +81,14 @@
91
81
  font-size 15px
92
82
 
93
83
  code:not([class*='language-'])
94
- color var(--efu-white)
95
- padding 0.2rem 0.4rem
84
+ color var(--efu-fontcolor)
85
+ padding .4em
96
86
  border-radius 4px
97
- margin 0 4px
98
- background var(--efu-pink)
99
- line-height 2
87
+ font-size 12px
88
+ background var(--efu-card-bg)
89
+ line-height 1.5
100
90
  box-shadow var(--efu-shadow-border)
91
+ border var(--style-border)
101
92
 
102
93
  img:not(.post_bg)
103
94
  border-radius 12px