hexo-theme-particlex 2.3.0 → 2.3.2

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/README.md CHANGED
@@ -23,9 +23,15 @@ cd themes
23
23
  git clone https://github.com/argvchs/hexo-theme-particlex.git particlex --depth=1
24
24
  ```
25
25
 
26
+ 然后在根目录 `_config.yml` 设置主题为 ParticleX 即可
27
+
28
+ ```yaml
29
+ theme: particlex
30
+ ```
31
+
26
32
  - 关闭自带 Highlight
27
33
 
28
- 在博客根目录下的 `_config.yml`,修改 `highlight` `prismjs` 参数
34
+ Hexo 有自带的 Highlight,但是和 ParticleX Highlight 不兼容
29
35
 
30
36
  ```yaml
31
37
  highlight:
@@ -80,23 +86,23 @@ highlightStyle: github # Highlight style
80
86
 
81
87
  ```yaml
82
88
  menu:
83
- home:
89
+ Home:
84
90
  name: house
85
91
  theme: solid
86
92
  src: /
87
- about:
93
+ About:
88
94
  name: id-card
89
95
  theme: solid
90
96
  src: /about
91
- archives:
97
+ Archives:
92
98
  name: box-archive
93
99
  theme: solid
94
100
  src: /archives
95
- categories:
101
+ Categories:
96
102
  name: bookmark
97
103
  theme: solid
98
104
  src: /categories
99
- tags:
105
+ Tags:
100
106
  name: tags
101
107
  theme: solid
102
108
  src: /tags
package/_config.yml CHANGED
@@ -19,23 +19,23 @@ highlightStyle: github
19
19
 
20
20
  # Main menu navigation
21
21
  menu:
22
- home:
22
+ Home:
23
23
  name: house
24
24
  theme: solid
25
25
  src: /
26
- about:
26
+ About:
27
27
  name: id-card
28
28
  theme: solid
29
29
  src: /about
30
- archives:
30
+ Archives:
31
31
  name: box-archive
32
32
  theme: solid
33
33
  src: /archives
34
- categories:
34
+ Categories:
35
35
  name: bookmark
36
36
  theme: solid
37
37
  src: /categories
38
- tags:
38
+ Tags:
39
39
  name: tags
40
40
  theme: solid
41
41
  src: /tags
@@ -4,14 +4,14 @@
4
4
  %>
5
5
  <div id="archives">
6
6
  <% if (theme.search.enable) { %>
7
- <div id="search-mask" style="z-index: <%= posts.length + 1 %>"></div>
8
- <input id="search-bar" class="input" placeholder="搜索" style="z-index: <%= posts.length + 2 %>">
7
+ <div id="search-mask" style="z-index: <%- posts.length + 1 %>"></div>
8
+ <input id="search-bar" class="input" placeholder="搜索" style="z-index: <%- posts.length + 2 %>">
9
9
  <% } %>
10
10
  <% posts.forEach((post, id) => { %>
11
- <div class="timeline" style="z-index: <%= posts.length - id %>" data-title="<%- post.title.toLowerCase().replace(/\s+/gm, "") %>">
11
+ <div class="timeline" style="z-index: <%- posts.length - id %>" data-title="<%- post.title.toLowerCase().replace(/\s+/gm, "") %>">
12
12
  <div class="timeline-tail"></div>
13
13
  <div class="timeline-content">
14
- <div class="item-time"><%- date(post.date, "YYYY/M/D") %></div>
14
+ <div class="item-time"><%= date(post.date, "YYYY/M/D") %></div>
15
15
  <a href="<%- url_for(post.path) %>">
16
16
  <h3><%= post.title %></h3>
17
17
  </a>
@@ -37,9 +37,7 @@
37
37
  const color = ["color: #ffa2c4", "color: #00bcd4", "color: #03a9f4", "color: #00a596", "color: #ff7d73"];
38
38
  let num = Math.floor(Math.random() * color.length);
39
39
  %>
40
- <a href="<%- url_for(data.path) %>" style="<%- color[num] %>">
41
- <%= data.name %>
42
- </a>
40
+ <a href="<%- url_for(data.path) %>" style="<%- color[num] %>"><%= data.name %></a>
43
41
  </span>
44
42
  <% }); %>
45
43
  </span>
package/layout/card.ejs CHANGED
@@ -3,9 +3,7 @@
3
3
  <div class="avatar">
4
4
  <img src="<%- url_for(theme.avatar) %>" alt="avatar">
5
5
  </div>
6
- <div class="name">
7
- <%= config.author %>
8
- </div>
6
+ <div class="name"><%= config.author %></div>
9
7
  <div class="description">
10
8
  <%- markdown(theme.card.description) %>
11
9
  </div>
@@ -24,9 +22,7 @@
24
22
  <div class="friend-links">
25
23
  <% Object.keys(theme.card.friendLinks).forEach(key => { %>
26
24
  <div class="friend-link">
27
- <a href="<%- url_for(theme.card.friendLinks[key]) %>">
28
- <%= key %>
29
- </a>
25
+ <a href="<%- url_for(theme.card.friendLinks[key]) %>"><%= key %></a>
30
26
  </div>
31
27
  <% }); %>
32
28
  </div>
@@ -30,7 +30,7 @@
30
30
  <div class="timeline-content">
31
31
  <div class="item-time"><%= date(post.date, "YYYY/M/D") %></div>
32
32
  <a href="<%- url_for(post.path) %>">
33
- <h3><%= titlecase(post.title) %></h3>
33
+ <h3><%= post.title %></h3>
34
34
  </a>
35
35
  <div class="info">
36
36
  <% if (post.categories && post.categories.data.length != 0) { %>
@@ -54,9 +54,7 @@
54
54
  const color = ["color: #ffa2c4", "color: #00bcd4", "color: #03a9f4", "color: #00a596", "color: #ff7d73"];
55
55
  let num = Math.floor(Math.random() * color.length);
56
56
  %>
57
- <a href="<%- url_for(data.path) %>" style="<%- color[num] %>">
58
- <%= data.name %>
59
- </a>
57
+ <a href="<%- url_for(data.path) %>" style="<%- color[num] %>"><%= data.name %></a>
60
58
  </span>
61
59
  <% }); %>
62
60
  </span>
@@ -18,41 +18,29 @@
18
18
  <a class="page-num" href="<%- config.root %>">1</a>
19
19
  <% } %>
20
20
  <% if (page.current - 2 != 1) { %>
21
- <a class="page-num" href="<%- url_for("page/" + (page.current - 2)) %>">
22
- <%= page.current - 2 %>
23
- </a>
21
+ <a class="page-num" href="<%- url_for("page/" + (page.current - 2)) %>"><%= page.current - 2 %></a>
24
22
  <% } %>
25
23
  <% } %>
26
- <a class="page-num" href="<%- url_for(page.prev_link) %>">
27
- <%= page.prev %>
28
- </a>
24
+ <a class="page-num" href="<%- url_for(page.prev_link) %>"><%= page.prev %></a>
29
25
  </span>
30
26
  <% } %>
31
- <span class="current">
32
- <%= page.current %>
33
- </span>
27
+ <span class="current"><%= page.current %></span>
34
28
  <% if (page.current != page.total) { %>
35
29
  <span>
36
- <a class="page-num" href="<%- url_for(page.next_link) %>">
37
- <%= page.next %>
38
- </a>
30
+ <a class="page-num" href="<%- url_for(page.next_link) %>"><%= page.next %></a>
39
31
  <% if (page.current + 2 <= page.total) { %>
40
- <a class="page-num" href="<%- url_for("page/" + (page.current + 2)) %>">
41
- <%= page.current + 2 %>
42
- </a>
32
+ <a class="page-num" href="<%- url_for("page/" + (page.current + 2)) %>"><%= page.current + 2 %></a>
43
33
  <% } %>
44
34
  <% if (page.current + 3 <= page.total) { %>
45
35
  <span class="page-omit">...</span>
46
- <a class="page-num" href="<%- url_for("page/" + page.total) %>">
47
- <%= page.total %>
48
- </a>
36
+ <a class="page-num" href="<%- url_for("page/" + page.total) %>"><%= page.total %></a>
49
37
  <% } %>
50
38
  </span>
51
39
  <% } %>
52
40
  </div>
53
41
  <div class="next">
54
42
  <% if (page.current != page.total) { %>
55
- <a class="page-num" href="<%- url_for(page.next_link) %> ">
43
+ <a class="page-num" href="<%- url_for(page.next_link) %>">
56
44
  <i class="fa-solid fa-caret-right fa-fw"></i>
57
45
  </a>
58
46
  <% } %>
package/layout/footer.ejs CHANGED
@@ -1,21 +1,20 @@
1
1
  <footer id="footer">
2
2
  <div class="footer-wrap">
3
3
  <div>
4
- © <%= theme.footer.since %> - <%= date(Date.now(), "YYYY") %> <%= config.title %>
4
+ &copy;
5
+ <%= theme.footer.since %> - <%= date(Date.now(), "YYYY") %> <%= config.title %>
5
6
  <span class="footer-icon">
6
7
  <i class="fa-solid fa-font-awesome fa-fw"></i>
7
8
  </span>
8
- @<%= config.author %>
9
+ &commat;<%= config.author %>
9
10
  </div>
10
11
  <div></div>
11
- <div>Based on the <a href="https://hexo.io">Hexo Engine</a> & <a href="https://github.com/argvchs/hexo-theme-particlex">ParticleX Theme</a></div>
12
+ <div>Based on the <a href="https://hexo.io">Hexo Engine</a> &amp; <a href="https://github.com/argvchs/hexo-theme-particlex">ParticleX Theme</a></div>
12
13
  <% if (theme.footer.ICP.enable) { %>
13
14
  <div>
14
- 备案号:
15
+ 备案号
15
16
  <% if (theme.footer.ICP.link) { %>
16
- <a href="<%= theme.footer.ICP.link %>">
17
- <%= theme.footer.ICP.code %>
18
- </a>
17
+ <a href="<%- theme.footer.ICP.link %>"><%= theme.footer.ICP.code %></a>
19
18
  <% } else { %>
20
19
  <%= theme.footer.ICP.code %>
21
20
  <% } %>
package/layout/layout.ejs CHANGED
@@ -8,7 +8,7 @@
8
8
  type = "categories";
9
9
  else if (is_tag() || page.type == "tags")
10
10
  type = "tags";
11
- else if (is_archive() || is_year() || is_month())
11
+ else if (is_archive())
12
12
  type = "archives";
13
13
  let title = "";
14
14
  if (page.title)
@@ -17,7 +17,7 @@
17
17
  title = "Categories: " + page.category + " | ";
18
18
  else if (is_tag())
19
19
  title = "Tags: " + page.tag + " | ";
20
- else if (is_archive() || is_year() || is_month())
20
+ else if (is_archive())
21
21
  title = "Archives | ";
22
22
  title += config.title;
23
23
  %>
@@ -25,7 +25,7 @@
25
25
  <html lang="<%- config.language %>">
26
26
  <head>
27
27
  <meta charset="UTF-8">
28
- <title><%= titlecase(title) %></title>
28
+ <title><%= title %></title>
29
29
  <meta name="author" content="<%- config.author %>">
30
30
  <meta name="description" content="<%- config.description %>">
31
31
  <meta name="keywords" content="<%- config.keywords %>">
@@ -36,7 +36,7 @@
36
36
  <link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/11.7.0/styles/<%- theme.highlightStyle %>.min.css">
37
37
  <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.2.1/css/all.min.css">
38
38
  <% if (theme.polyfill.enable) { %>
39
- <script src="https://polyfill.io/v3/polyfill.min.js?features=<% theme.polyfill.features.join(",") %>"></script>
39
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=<%- theme.polyfill.features.join(",") %>"></script>
40
40
  <% } %>
41
41
  <% if (theme.math.enable) { %>
42
42
  <script src="https://cdn.staticfile.org/KaTeX/0.16.4/katex.min.js"></script>
@@ -4,9 +4,7 @@
4
4
  <div>
5
5
  <h2>LOADING...</h2>
6
6
  <p style="word-break: keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
7
- <div>
8
- <img alt="loading" src="<%- url_for("/images/loading.gif") %>" style="height: 50px">
9
- </div>
7
+ <img alt="loading" src="<%- url_for("/images/loading.gif") %>" style="height: 50px">
10
8
  </div>
11
9
  </div>
12
10
  </div>
package/layout/menu.ejs CHANGED
@@ -1,25 +1,25 @@
1
1
  <nav id="menu">
2
2
  <div class="desktop-menu">
3
3
  <a href="<%- config.root %>">
4
- <span class="title"><%- config.title %></span>
4
+ <span class="title"><%= config.title.toUpperCase() %></span>
5
5
  </a>
6
6
  <% Object.keys(theme.menu).forEach(key => { %>
7
- <a href="<%= url_for(theme.menu[key].src) %>">
7
+ <a href="<%- url_for(theme.menu[key].src) %>">
8
8
  <i class="fa-<%- theme.menu[key].theme %> fa-<%- theme.menu[key].name %> fa-fw"></i>
9
9
  <span>&ensp;<%= key %></span>
10
10
  </a>
11
11
  <% }); %>
12
12
  </div>
13
- <div :class="'phone-menu ' + menushow" id="phone-menu">
13
+ <div :class="&quot;phone-menu &quot; + menushow" id="phone-menu">
14
14
  <div class="curtain" @click="menushow = !menushow" v-show="menushow"></div>
15
15
  <div class="title" @click="menushow = !menushow">
16
16
  <i class="fa-solid fa-bars fa-fw"></i>
17
- <span>&emsp;<%- config.title %></span>
17
+ <span>&emsp;<%= config.title.toUpperCase() %></span>
18
18
  </div>
19
19
  <transition name="slide">
20
20
  <div class="items" v-show="menushow">
21
21
  <% Object.keys(theme.menu).forEach(key => { %>
22
- <a href="<%= url_for(theme.menu[key].src) %>">
22
+ <a href="<%- url_for(theme.menu[key].src) %>">
23
23
  <div class="item">
24
24
  <div style="min-width: 20px; max-width: 50px; width: 10%">
25
25
  <i class="fa-<%- theme.menu[key].theme %> fa-<%- theme.menu[key].name %> fa-fw"></i>
package/layout/post.ejs CHANGED
@@ -1,6 +1,6 @@
1
1
  <div class="article">
2
2
  <div>
3
- <h1><%= titlecase(page.title) %> </h1>
3
+ <h1><%= page.title %> </h1>
4
4
  </div>
5
5
  <div class="info">
6
6
  <span class="date">
@@ -30,9 +30,7 @@
30
30
  const color = ["color: #ffa2c4", "color: #00bcd4", "color: #03a9f4", "color: #00a596", "color: #ff7d73"];
31
31
  let num = Math.floor(Math.random() * color.length);
32
32
  %>
33
- <a href="<%- url_for(data.path) %>" style="<%- color[num] %>">
34
- <%= data.name %>
35
- </a>
33
+ <a href="<%- url_for(data.path) %>" style="<%- color[num] %>"><%= data.name %></a>
36
34
  </span>
37
35
  <% }); %>
38
36
  </span>
@@ -52,7 +50,7 @@
52
50
  }
53
51
  %>
54
52
  <input id="crypto" class="input" placeholder="文章被加密,请输入密码" data-encrypt="<%- encrypt(page.content, page.password.toString()) %>" data-check="<%- sha(page.content) %>">
55
- <div class="content" style="opacity: 0" v-pre></div>
53
+ <div class="content" v-pre style="opacity: 0"></div>
56
54
  <% } else { %>
57
55
  <div class="content" v-pre>
58
56
  <%- page.content %>
package/layout/posts.ejs CHANGED
@@ -10,7 +10,7 @@
10
10
  <% posts.forEach(post => { %>
11
11
  <div class="post">
12
12
  <a href="<%- url_for(post.path) %>">
13
- <h2 class="post-title"><%= titlecase(post.title) %></h2>
13
+ <h2 class="post-title"><%= post.title %></h2>
14
14
  </a>
15
15
  <div class="category-and-date">
16
16
  <% if (post.categories.data.length != 0) { %>
@@ -40,11 +40,11 @@
40
40
  </span>
41
41
  <% } %>
42
42
  </div>
43
- <div class="excerpt">
43
+ <div class="description">
44
44
  <div class="content" v-pre>
45
45
  <% if (typeof post.description !== "undefined") { %>
46
46
  <%- markdown(post.description) %>
47
- <% } else if (typeof post.excerpt !== "undefined") { %>
47
+ <% } else if (post.excerpt) { %>
48
48
  <%- post.excerpt %>
49
49
  <% } else { %>
50
50
  <%- post.content %>
package/layout/tags.ejs CHANGED
@@ -30,7 +30,7 @@
30
30
  <div class="timeline-content">
31
31
  <div class="item-time"><%= date(post.date, "YYYY/M/D") %></div>
32
32
  <a href="<%- url_for(post.path) %>">
33
- <h3><%= titlecase(post.title) %></h3>
33
+ <h3><%= post.title %></h3>
34
34
  </a>
35
35
  <div class="info">
36
36
  <% if (post.categories && post.categories.data.length != 0){ %>
@@ -54,9 +54,7 @@
54
54
  const color = ["color: #ffa2c4", "color: #00bcd4", "color: #03a9f4", "color: #00a596", "color: #ff7d73"];
55
55
  let num = Math.floor(Math.random() * color.length);
56
56
  %>
57
- <a href="<%- url_for(data.path) %>" style="<%- color[num] %>">
58
- <%= data.name %>
59
- </a>
57
+ <a href="<%- url_for(data.path) %>" style="<%- color[num] %>"><%= data.name %></a>
60
58
  </span>
61
59
  <% }); %>
62
60
  </span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -330,7 +330,7 @@
330
330
  display: inline-block;
331
331
  margin-left: 25px;
332
332
  }
333
- #home-posts .post .excerpt {
333
+ #home-posts .post .description {
334
334
  color: #1e3e3f;
335
335
  }
336
336
  #home-posts .post .go-post {
@@ -408,7 +408,6 @@
408
408
  display: inline-block;
409
409
  font-family: Lexend, "Noto Sans SC", sans-serif;
410
410
  margin-left: 30px;
411
- text-transform: uppercase;
412
411
  }
413
412
  #menu .desktop-menu a {
414
413
  color: #555;
@@ -452,7 +451,6 @@
452
451
  #menu .phone-menu .title {
453
452
  color: #555;
454
453
  cursor: pointer;
455
- text-transform: uppercase;
456
454
  z-index: 10004;
457
455
  }
458
456
  #menu.hidden-menu {
@@ -853,7 +851,7 @@ ol {
853
851
  margin-bottom: 25px;
854
852
  padding: 50px;
855
853
  }
856
- #home-posts .post .excerpt {
854
+ #home-posts .post .description {
857
855
  padding: 20px 0;
858
856
  }
859
857
  #home-posts-wrap {
@@ -935,7 +933,7 @@ ol {
935
933
  margin-bottom: 30px;
936
934
  padding: 20px 30px;
937
935
  }
938
- #home-posts .post .excerpt {
936
+ #home-posts .post .description {
939
937
  padding: 20px 0;
940
938
  }
941
939
  #home-posts .post .post-tags {