hexo-theme-solitude 1.8.2 → 1.8.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.
@@ -28,7 +28,7 @@ if theme.pwa.enable
28
28
 
29
29
  script.
30
30
  console.log(
31
- "%c Program: Hexo %c Theme: Solitude %c Version: v1.8.2",
31
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.8.3",
32
32
  "border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
33
33
  "padding: 5px 10px;color:white;background:#3e9f50;",
34
34
  "border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
@@ -1,9 +1,13 @@
1
- - var item_suffix = ''
2
1
  include ../widgets/page/banner
3
2
  .flink#article-container
4
3
  each data in site.data.tlink.links
5
- h2= data.class_name
4
+ h2= data.class_name + " (" + data.link_list.length + ")"
6
5
  .flink-desc= data.descr
7
- include ../widgets/page/links/linksItem
8
-
6
+ case data.type
7
+ when 'card'
8
+ include ../widgets/page/links/linksCard
9
+ when 'item'
10
+ include ../widgets/page/links/linksItem
11
+ when 'discn'
12
+ include ../widgets/page/links/linksDiscn
9
13
  != page.content
@@ -7,7 +7,7 @@ if site.data.about.rewardList
7
7
  .author-content-item-tips= _p('award.thanks')
8
8
  span.author-content-item-title= _p('award.title')
9
9
  .author-content-item-description
10
- = award.description
10
+ != award.description
11
11
  .reward-list-all
12
12
  each reward in site.data.about.rewardList
13
13
  - sum += reward.money
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -1,12 +1,14 @@
1
1
  hexo.on('ready', () => {
2
- const {version} = require('../../package.json')
3
- hexo.log.info(`
4
- ╭─────────────────────────────────────────────────────────────────────────────────────────────╮
5
- │ │
6
- Theme: Solitude │
7
- Version: v${version} │
8
- Changelog: https://github.com/valor-x/hexo-theme-solitude/releases/tag/v${version} │
9
- │ │
10
- ╰─────────────────────────────────────────────────────────────────────────────────────────────╯
11
- `)
2
+ const {version} = require('../../package.json')
3
+ hexo.log.info(`
4
+ ===================================================================
5
+ ##### #### # ##### ###### # # ###### ######
6
+ # # # # # # # # # # #
7
+ ##### # # # # # # # # # ######
8
+ # # # # # # # # # # #
9
+ ###### #### ##### ##### # ### ###### ######
10
+ ${version}
11
+ ===================================================================
12
+ GitHub: https://github.com/valor-x/hexo-theme-solitude
13
+ `)
12
14
  })
@@ -2,13 +2,8 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
2
2
  const {config, theme} = this;
3
3
  const data = hexo.locals.get('data');
4
4
 
5
- // about card
6
5
  style.define('$about', data && data.about ? Object.keys(data.about) : false);
7
-
8
- // links
9
- style.define('$link', !!(data && data.links))
10
-
11
- // equipment
6
+ style.define('$link', !!(data && data.links) || !!(data && data.tlink))
12
7
  style.define('$equipment', !!(data && data.equipment))
13
8
 
14
9
  // highlight
@@ -58,7 +58,7 @@ function initializeCommentBarrage(array) {
58
58
  }
59
59
 
60
60
  async initBarrage() {
61
- const storageSwitch = localStorage.getItem("commentBarrageSwitch");
61
+ const storageSwitch = utils.saveToLocal.get("commentBarrageSwitch");
62
62
  this.config.dom.style.display = storageSwitch ? "flex" : "none";
63
63
  this.config.barrageList = this.filterAndFlatten(array);
64
64
  this.config.dom.innerHTML = "";
package/source/js/main.js CHANGED
@@ -269,12 +269,12 @@ let sco = {
269
269
  if (window.getComputedStyle(commentBarrageElement).display === "flex") {
270
270
  commentBarrageElement.style.display = "none";
271
271
  document.querySelector("#consoleCommentBarrage").classList.remove("on");
272
- localStorage.removeItem("commentBarrageSwitch");
272
+ utils.saveToLocal.set("commentBarrageSwitch", false, .2);
273
273
  right_menu && rm.barrage(true)
274
274
  } else {
275
275
  commentBarrageElement.style.display = "flex";
276
276
  document.querySelector("#consoleCommentBarrage").classList.add("on");
277
- localStorage.setItem("commentBarrageSwitch", "false");
277
+ utils.saveToLocal.set("commentBarrageSwitch", true, .2);
278
278
  right_menu && rm.barrage(false)
279
279
  }
280
280
  }
@@ -219,6 +219,10 @@ window.oncontextmenu = (ele) => {
219
219
  rm.hideRightMenu()
220
220
  })
221
221
 
222
+ if(GLOBAL_CONFIG.comment.commentBarrage){
223
+ rm.barrage(!utils.saveToLocal.get('commentBarrageSwitch'))
224
+ }
225
+
222
226
  rm.menuItems.paste.addEventListener('click', () => rm.pasteText() && rm.hideRightMenu())
223
227
  GLOBAL_CONFIG.comment && rm.menuItems.comment.addEventListener('click', () => rm.hideRightMenu() || sco.toTalk(selectTextNow))
224
228
  rm.menuItems.new.addEventListener('click', () => window.open(rm.domhref) && rm.hideRightMenu())