hexo-theme-shokax 0.2.0-rc6 → 0.2.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/_config.yml CHANGED
@@ -132,17 +132,14 @@ iconfont: "1832207_igi8uaupcus"
132
132
  menu:
133
133
  home: / || home
134
134
  about:
135
- default: /about/ || user
136
- aboutsite: /about/ || star
137
- updata: /updata/ || cloud
135
+ default: / || user
136
+ aboutsite: /about/ || user
138
137
  admiration: /admiration/ || coffee
139
- privacy: /privacy/ || list-alt
140
138
  posts:
141
139
  default: / || feather
142
140
  archives: /archives/ || list-alt
143
141
  categories: /categories/ || th
144
142
  tags: /tags/ || tags
145
- statistics: /statistics/ || clock
146
143
  friends: /friends/ || heart
147
144
 
148
145
  # https://twikoo.js.org
@@ -236,7 +233,7 @@ widgets:
236
233
 
237
234
  footer:
238
235
  # Specify the date when the site was setup. If not defined, current year will be used.
239
- since: 2021
236
+ since: 2022
240
237
  icon:
241
238
  name: sakura rotate
242
239
  # Change the color of icon, using Hex Code.
@@ -2,12 +2,17 @@ mixin sidebarRender(display_toc)
2
2
  - var related = _category_posts(page)
3
3
  if page && page.prev
4
4
  - var prevlink = page?.prev_link
5
+ if !prevlink && is_home()
6
+ if page.prev === 1
7
+ - prevlink = '/'
8
+ else
9
+ - prevlink = `/page/${page.prev}/`
5
10
  if is_page() || is_post()
6
- - prevlink = page?.next?.path
11
+ - prevlink = page.prev.path
7
12
  if page && page.next
8
13
  - var nextlink = page?.next_link
9
14
  if is_page() || is_post()
10
- - nextlink = page?.prev?.path
15
+ - nextlink = page.next.path
11
16
  div(class="inner")
12
17
  div(class="panels")
13
18
  div(class="inner")
@@ -23,9 +28,8 @@ mixin sidebarRender(display_toc)
23
28
  != partial('_partials/sidebar/overview.pug', {}, {cache: true})
24
29
  ul(id="quick")
25
30
  li(class="prev pjax")
26
- if page && page.prev
27
- if prevlink
28
- != _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
31
+ if prevlink
32
+ != _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
29
33
  li(class="up")
30
34
  i(class="ic i-arrow-up")
31
35
  li(class="down")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.2.0-rc6",
3
+ "version": "0.2.1",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/zkz098/hexo-theme-shokaX",
@@ -12,32 +12,35 @@
12
12
  "docs:build": "vuepress build docs"
13
13
  },
14
14
  "devDependencies": {
15
- "@algolia/client-search": "^4.14.3",
15
+ "@algolia/client-search": "^4",
16
16
  "@types/animejs": "^3.1.7",
17
17
  "@types/fancybox": "^3.5.3",
18
18
  "@types/hexo": "^3.8.8",
19
19
  "@types/jquery": "^3.5.16",
20
20
  "@types/js-yaml": "^4.0.5",
21
21
  "@types/lozad": "^1.16.1",
22
- "@types/node": "^18.13.0",
22
+ "@types/node": "^18.15.6",
23
23
  "@types/shelljs": "^0.8.11",
24
- "@typescript-eslint/eslint-plugin": "^5.51.0",
25
- "@typescript-eslint/parser": "^5.51.0",
26
- "@vuepress/client": "2.0.0-beta.60",
24
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
25
+ "@typescript-eslint/parser": "^5.56.0",
26
+ "@vuepress/client": "2.0.0-beta.61",
27
27
  "@vuepress/plugin-docsearch": "2.0.0-beta.60",
28
- "eslint": "^8.34.0",
28
+ "algoliasearch": "^4.16.0",
29
+ "eslint": "^8.36.0",
29
30
  "eslint-config-standard": "^17.0.0",
30
31
  "eslint-plugin-import": "^2.27.5",
31
32
  "eslint-plugin-n": "^15.6.1",
32
33
  "eslint-plugin-promise": "^6.1.1",
33
- "eslint-plugin-vue": "^9.9.0",
34
- "typescript": "^4.9.5",
34
+ "eslint-plugin-vue": "^9.10.0",
35
+ "instantsearch.js": "^4.53.0",
36
+ "pjax": "^0.2.8",
37
+ "typescript": "^5.0.2",
35
38
  "vue": "^3.2.47",
36
- "vuepress": "2.0.0-beta.60",
37
- "vuepress-plugin-sitemap2": "2.0.0-beta.180"
39
+ "vuepress": "2.0.0-beta.61",
40
+ "vuepress-plugin-sitemap2": "2.0.0-beta.197"
38
41
  },
39
42
  "dependencies": {
40
43
  "js-yaml": "^4.1.0",
41
- "sass": "^1.58.3"
44
+ "sass": "^1.60.0"
42
45
  }
43
46
  }
@@ -121,6 +121,9 @@ const render = anime({
121
121
  }
122
122
  });
123
123
  document.addEventListener(tap, function (e) {
124
+ if (e.target.nodeName === 'A') {
125
+ return;
126
+ }
124
127
  render.play();
125
128
  updateCoords(e);
126
129
  animateParticules(pointerX, pointerY);
@@ -152,7 +152,6 @@ const resizeHandle = function (event) {
152
152
  }
153
153
  oWinHeight = window.innerHeight;
154
154
  oWinWidth = window.innerWidth;
155
- // sideBar.child('.panels').changeOrGetHeight(oWinHeight + 'px');
156
155
  };
157
156
  const scrollHandle = function (event) {
158
157
  const winHeight = window.innerHeight;
@@ -262,30 +262,30 @@ const transition = (target, type, complete) => {
262
262
  });
263
263
  };
264
264
  const pjaxScript = function (element) {
265
- const code = element.text || element.textContent || element.innerHTML || '';
266
- const parent = element.parentNode;
267
- parent.removeChild(element);
265
+ const { text, parentNode, id, className, type, src, dataset } = element;
266
+ const code = text || element.textContent || element.innerHTML || '';
267
+ parentNode.removeChild(element);
268
268
  const script = document.createElement('script');
269
- if (element.id) {
270
- script.id = element.id;
269
+ if (id) {
270
+ script.id = id;
271
271
  }
272
- if (element.className) {
273
- script.className = element.className;
272
+ if (className) {
273
+ script.className = className;
274
274
  }
275
- if (element.type) {
276
- script.type = element.type;
275
+ if (type) {
276
+ script.type = type;
277
277
  }
278
- if (element.src) {
279
- script.src = element.src;
278
+ if (src) {
279
+ script.src = src;
280
280
  script.async = false;
281
281
  }
282
- if (element.dataset.pjax !== undefined) {
282
+ if (dataset.pjax !== undefined) {
283
283
  script.dataset.pjax = '';
284
284
  }
285
285
  if (code !== '') {
286
286
  script.appendChild(document.createTextNode(code));
287
287
  }
288
- parent.appendChild(script);
288
+ parentNode.appendChild(script);
289
289
  };
290
290
  const pageScroll = function (target, offset, complete) {
291
291
  const opt = {