hexo-theme-particlex 2.6.2 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hexo-Theme-ParticleX
2
2
 
3
- [ParticleX](https://github.com/argvchs/hexo-theme-particlex) 主题,诞生原因是因为原来的 [Particle](https://github.com/korilin/hexo-theme-particle) 主题不维护了,但是我觉得还是很好的
3
+ [ParticleX](https://github.com/theme-particlex/hexo-theme-particlex) 主题,诞生原因是因为原来的 [Particle](https://github.com/korilin/hexo-theme-particle) 主题不维护了,但是我觉得还是很好的
4
4
 
5
5
  原来用的是 Vue 2 + Ant Design Vue 1,现更新到 Vue 3,去除 Ant Design Vue 采用自定义样式,图标更改为 Font Awesome 6,CDN 改为 Staticfile
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > 目前有 Full、Night 和 Maiden **两个**主题样式
10
10
 
11
- 虽然更改后只有一种了,如果你想改颜色就在 `main.css` 里替换吧
11
+ 但是更改后只有一种了,如果你想改颜色就在 `main.css` 里替换吧
12
12
 
13
13
  # 1. 演示
14
14
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  ```bash
22
22
  cd themes
23
- git clone https://github.com/argvchs/hexo-theme-particlex.git particlex --depth=1
23
+ git clone https://github.com/theme-particlex/hexo-theme-particlex.git particlex --depth=1
24
24
  ```
25
25
 
26
26
  然后在根目录 `_config.yml` 设置主题为 ParticleX 即可
@@ -156,7 +156,7 @@ footer:
156
156
 
157
157
  使用 [Polyfill.io](https://polyfill.io) 自动根据 UA 处理新的 JS API 兼容
158
158
 
159
- 可以配合 [Hexo-Babel](https://github.com/argvchs/hexo-babel) 插件处理 JS 语法兼容
159
+ 可以配合 [Hexo-Babel](https://github.com/theme-particlex/hexo-babel) 插件处理 JS 语法兼容
160
160
 
161
161
  ```yaml
162
162
  # Polyfill
@@ -205,7 +205,7 @@ preview:
205
205
 
206
206
  一般来说,缩略展示文档只需要在文档中添加 `<!-- more -->` 即可,缩略内容在显示全文中也会出现
207
207
 
208
- 但考虑到不想把缩略内容放在正文里,就添加了此参数,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置
208
+ 但考虑到不想把缩略内容放在正文里,就添加了此参数,在 [Front-Matter](https://hexo.io/docs/front-matter) 里设置
209
209
 
210
210
  支持 Markdown 格式
211
211
 
@@ -216,11 +216,11 @@ description: |
216
216
 
217
217
  ### 3.3.6. 文章置顶
218
218
 
219
- 在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `pinned` 作为置顶参数,越大越靠前,默认为 0
219
+ 在 [Front-Matter](https://hexo.io/docs/front-matter) 里设置 `pinned` 作为置顶参数,越大越靠前,默认为 0
220
220
 
221
221
  ### 3.3.7. 文章加密
222
222
 
223
- 使用 AES 加密算法,在 [Front-Matter](https://hexo.io/zh-cn/docs/front-matter) 里设置 `secret` 作为密码,**使用请安装插件 [Hexo-Helper-Crypto](https://github.com/argvchs/hexo-helper-crypto)**
223
+ 使用 AES 加密算法,在 [Front-Matter](https://hexo.io/docs/front-matter) 里设置 `secret` 作为密码,**使用请安装插件 [Hexo-Helper-Crypto](https://github.com/theme-particlex/hexo-helper-crypto)**
224
224
 
225
225
  ```yaml
226
226
  # Article encryption
@@ -264,7 +264,7 @@ giscus:
264
264
  emitMetadata: 0
265
265
  inputPosition: bottom
266
266
  theme: preferred_color_scheme
267
- lang: zh-CN
267
+ lang:
268
268
  ```
269
269
 
270
270
  ### 3.4.2. Gitalk
@@ -283,7 +283,7 @@ gitalk:
283
283
  repo: # The name of repository of store comments
284
284
  owner: # GitHub repo owner
285
285
  admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
286
- language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
286
+ language: # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
287
287
  proxy: # CORS proxy
288
288
  ```
289
289
 
@@ -315,7 +315,7 @@ waline:
315
315
  - link
316
316
  requiredMeta: # Set required meta field, e.g.: [nick] | [nick, mail]
317
317
  - nick
318
- lang: zh-CN # Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP
318
+ lang: # Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP
319
319
  wordLimit: 0 # Word limit, no limit when setting to 0
320
320
  login: enable # Whether enable login, can choose from 'enable', 'disable' and 'force'
321
321
  pageSize: 10 # Comment per page
@@ -333,7 +333,7 @@ twikoo:
333
333
  envID:
334
334
  region:
335
335
  path: location.pathname
336
- lang: zh-CN
336
+ lang:
337
337
  ```
338
338
 
339
339
  # 4. 写在最后
package/_config.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # ParticleX Configuration
2
- # https://github.com/argvchs/hexo-theme-particlex
2
+ # https://github.com/theme-particlex/hexo-theme-particlex
3
3
 
4
4
  # Avatar image
5
5
  avatar: /images/avatar.jpg
@@ -100,7 +100,7 @@ giscus:
100
100
  emitMetadata: 0
101
101
  inputPosition: bottom
102
102
  theme: preferred_color_scheme
103
- lang: zh-CN
103
+ lang:
104
104
 
105
105
  # Gitalk
106
106
  # https://github.com/gitalk/gitalk
@@ -111,7 +111,7 @@ gitalk:
111
111
  repo: # The name of repository of store comments
112
112
  owner: # GitHub repo owner
113
113
  admin: # GitHub repo owner and collaborators, only these guys can initialize github issues
114
- language: zh-CN # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
114
+ language: # en, zh-CN, zh-TW, es-ES, fr, ru, de, pl and ko are currently available
115
115
  proxy: # CORS proxy
116
116
 
117
117
  # Waline
@@ -135,7 +135,7 @@ waline:
135
135
  - link
136
136
  requiredMeta: # Set required meta field, e.g.: [nick] | [nick, mail]
137
137
  - nick
138
- lang: zh-CN # Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP
138
+ lang: # Language, available values: en-US, zh-CN, zh-TW, pt-BR, ru-RU, jp-JP
139
139
  wordLimit: 0 # Word limit, no limit when setting to 0
140
140
  login: enable # Whether enable login, can choose from 'enable', 'disable' and 'force'
141
141
  pageSize: 10 # Comment per page
@@ -147,4 +147,4 @@ twikoo:
147
147
  envID:
148
148
  region:
149
149
  path: location.pathname
150
- lang: zh-CN
150
+ lang:
package/layout/footer.ejs CHANGED
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  <div>
12
12
  Based on the <a href="https://hexo.io">Hexo Engine</a> &amp;
13
- <a href="https://github.com/argvchs/hexo-theme-particlex">ParticleX Theme</a>
13
+ <a href="https://github.com/theme-particlex/hexo-theme-particlex">ParticleX Theme</a>
14
14
  </div>
15
15
  <% if (theme.footer.ICP.enable) { %>
16
16
  <div>
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/argvchs/hexo-theme-particlex.git"
7
+ "url": "git+https://github.com/theme-particlex/hexo-theme-particlex.git"
8
8
  },
9
9
  "keywords": [
10
10
  "hexo",
@@ -17,11 +17,11 @@
17
17
  "author": "Argvchs",
18
18
  "license": "MIT",
19
19
  "bugs": {
20
- "url": "https://github.com/argvchs/hexo-theme-particlex/issues"
20
+ "url": "https://github.com/theme-particlex/hexo-theme-particlex/issues"
21
21
  },
22
- "homepage": "https://github.com/argvchs/hexo-theme-particlex#readme",
22
+ "homepage": "https://github.com/theme-particlex/hexo-theme-particlex#readme",
23
23
  "dependencies": {
24
- "hexo-helper-crypto": "^1.1.2",
24
+ "hexo-helper-crypto": "^1.1.3",
25
25
  "hexo-renderer-ejs": "^2.0.0"
26
26
  },
27
27
  "scripts": {
@@ -5,8 +5,8 @@ mixins.crypto = {
5
5
  watch: {
6
6
  crypto(value) {
7
7
  let input = this.$refs.crypto,
8
- content = this.$refs.content,
9
- { encrypted, shasum } = input.dataset;
8
+ content = this.$refs.content;
9
+ let { encrypted, shasum } = input.dataset;
10
10
  try {
11
11
  let decrypted = CryptoJS.AES.decrypt(encrypted, value).toString(CryptoJS.enc.Utf8);
12
12
  if (CryptoJS.SHA256(decrypted).toString() === shasum) {
@@ -7,12 +7,15 @@ mixins.highlight = {
7
7
  this.renderers.push(this.highlight);
8
8
  },
9
9
  methods: {
10
+ sleep(time) {
11
+ return new Promise(resolve => setTimeout(resolve, time));
12
+ },
10
13
  highlight() {
11
14
  let codes = document.querySelectorAll("pre");
12
15
  for (let i of codes) {
13
- let code = i.innerText,
14
- language = [...i.classList, ...i.firstChild.classList][0] || "plaintext",
15
- highlighted;
16
+ let code = i.innerText;
17
+ let language = [...i.classList, ...i.firstChild.classList][0] || "plaintext";
18
+ let highlighted;
16
19
  try {
17
20
  highlighted = hljs.highlight(code, { language }).value;
18
21
  } catch {
@@ -32,7 +35,7 @@ mixins.highlight = {
32
35
  this.copying = true;
33
36
  copycode.classList.add("copied");
34
37
  await navigator.clipboard.writeText(code);
35
- await new Promise(resolve => setTimeout(resolve, 1000));
38
+ await this.sleep(1000);
36
39
  copycode.classList.remove("copied");
37
40
  this.copying = false;
38
41
  });
@@ -1,8 +1,8 @@
1
1
  mixins.home = {
2
2
  mounted() {
3
- let background = this.$refs.homeBackground,
4
- images = background.dataset.images.split(","),
5
- id = Math.floor(Math.random() * images.length);
3
+ let background = this.$refs.homeBackground;
4
+ let images = background.dataset.images.split(",");
5
+ let id = Math.floor(Math.random() * images.length);
6
6
  background.style.backgroundImage = `url('${images[id]}')`;
7
7
  this.menuColor = true;
8
8
  },
@@ -8,8 +8,8 @@ mixins.preview = {
8
8
  methods: {
9
9
  preview() {
10
10
  let preview = this.$refs.preview,
11
- content = this.$refs.previewContent,
12
- images = document.querySelectorAll("img");
11
+ content = this.$refs.previewContent;
12
+ let images = document.querySelectorAll("img");
13
13
  for (let i of images)
14
14
  i.addEventListener("click", () => {
15
15
  content.alt = i.alt;
package/source/js/main.js CHANGED
@@ -25,8 +25,8 @@ const app = Vue.createApp({
25
25
  for (let i of this.renderers) i();
26
26
  },
27
27
  handleScroll() {
28
- let wrap = this.$refs.homePostsWrap,
29
- newScrollTop = document.documentElement.scrollTop;
28
+ let wrap = this.$refs.homePostsWrap;
29
+ let newScrollTop = document.documentElement.scrollTop;
30
30
  if (this.scrollTop < newScrollTop) {
31
31
  this.hiddenMenu = true;
32
32
  this.showMenuItems = false;