hexo-theme-particlex 2.6.1 → 2.6.3

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
 
@@ -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
@@ -220,7 +220,7 @@ description: |
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/zh-cn/docs/front-matter) 里设置 `secret` 作为密码,**使用请安装插件 [Hexo-Helper-Crypto](https://github.com/theme-particlex/hexo-helper-crypto)**
224
224
 
225
225
  ```yaml
226
226
  # Article encryption
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
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/layout/import.ejs CHANGED
@@ -40,7 +40,7 @@
40
40
  <link rel="stylesheet" href="https://cdn.staticfile.org/waline/2.14.8/waline-meta.min.css" />
41
41
  <% } %>
42
42
  <% if (theme.twikoo.enable) { %>
43
- <script src="https://cdn.staticfile.org/twikoo/1.6.10/twikoo.all.min.js"></script>
43
+ <script src="https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js"></script>
44
44
  <% } %>
45
45
  <% } %>
46
46
  <% if (type === "index") { %>
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
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;