hexo-theme-stellar 1.26.2 → 1.26.3

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
@@ -1,10 +1,10 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.26.2'
3
+ version: '1.26.3'
4
4
  homepage: 'https://xaoxuu.com/wiki/stellar/'
5
5
  repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
6
- cdn_css: # Use cdn links instead of /css/main.css
7
- cdn_js: # Use cdn links instead of /js/main.js
6
+ main_css: /css/main.css
7
+ main_js: /js/main.js
8
8
 
9
9
 
10
10
  ######## head tags ########
@@ -118,11 +118,7 @@ function custom_inject() {
118
118
  <%- feed_tag(config.feed.path, {title: config.title}) %>
119
119
  <% } %>
120
120
 
121
- <% if (theme.stellar.cdn_css) { %>
122
- <%- css(theme.stellar.cdn_css) %>
123
- <% } else { %>
124
- <%- css('/css/main.css') %>
125
- <% } %>
121
+ <link rel="stylesheet" href="<%- `${theme.stellar.main_css}?v=${stellar_info('version')}` %>">
126
122
 
127
123
  <% if (config.favicon) { %>
128
124
  <%- favicon_tag(config.favicon) %>
@@ -166,11 +166,7 @@ function custom_inject() {
166
166
  </script>
167
167
 
168
168
  <!-- required -->
169
- <% if (theme.stellar.cdn_js) { %>
170
- <%- js({src: theme.stellar.cdn_js, async: true}) %>
171
- <% } else { %>
172
- <%- js({src: '/js/main.js', async: true}) %>
173
- <% } %>
169
+ <script src="<%- `${theme.stellar.main_js}?v=${stellar_info('version')}` %>" async></script>
174
170
 
175
171
  <!-- optional -->
176
172
  <%- partial('../plugins/comments/script') %>
@@ -6,6 +6,9 @@ if (page.logo) {
6
6
  const proj = theme.wiki.tree[page.wiki]
7
7
  var l = proj.logo
8
8
  if (l) {
9
+ if (l.title.includes('](') == false) {
10
+ l.title = `[${l.title}](${url_for(proj.homepage?.path || '')})`
11
+ }
9
12
  logo = l
10
13
  } else if (proj.name || proj.icon) {
11
14
  logo = {
@@ -17,7 +17,7 @@ function layoutArchiveList() {
17
17
  }
18
18
  el += `<div class="post-list archives">`
19
19
  var years = []
20
- const posts = page.author != null ? site.posts.filter(p => (p.author || theme.default_author.name) == page.author.name) : site.posts
20
+ const posts = page.author != null ? site.posts.filter(p => (p.author || theme.default_author.id) == page.author.id) : site.posts
21
21
  posts.sort('date', -1).each(function(post) {
22
22
  post.year = date(post.date, 'YYYY')
23
23
  if (post.year && (years.includes(post.year) == false) && (post.title || post.date)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-stellar",
3
- "version": "1.26.2",
3
+ "version": "1.26.3",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -6,10 +6,11 @@ hexo.extend.generator.register('author', function (locals) {
6
6
  const { site_tree, authors } = hexo.theme.config
7
7
  var pages = []
8
8
  for (let key of Object.keys(authors)) {
9
- const author = authors[key]
9
+ var author = authors[key]
10
10
  if (author.hidden) {
11
11
  continue
12
12
  }
13
+ author.id = key
13
14
  pages.push({
14
15
  path: author.path,
15
16
  layout: ['archive'],
@@ -10,6 +10,7 @@
10
10
  height: 48px
11
11
  margin-right: 1rem
12
12
  border-radius: 4px
13
+ flex-shrink: 0
13
14
  a
14
15
  color: inherit
15
16
  display: flex
@@ -56,7 +57,7 @@
56
57
  animation-timing-function: linear
57
58
 
58
59
  a.title
59
- font-size: 1.75rem
60
+ font-size: 1.5rem
60
61
  font-weight: 900
61
62
  color: inherit
62
63
  line-height: 1.2
@@ -1,5 +1,7 @@
1
1
  .widget-wrapper.tagcloud .widget-body
2
- margin-top: 0.25rem
2
+ border-radius: $border-card
3
+ padding: 12px 16px
4
+ background: var(--alpha50)
3
5
  a
4
6
  word-break: break-word
5
7
  color: var(--text-p2)