hexo-theme-particlex 2.0.6 → 2.0.8
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 +43 -18
- package/layout/archives.ejs +4 -6
- package/layout/categories.ejs +3 -3
- package/layout/layout.ejs +1 -5
- package/layout/loading.ejs +1 -1
- package/layout/post.ejs +3 -3
- package/layout/posts.ejs +3 -3
- package/layout/tags.ejs +3 -3
- package/package.json +1 -1
- package/source/css/particlex.css +4 -9
- package/source/js/functions.js +1 -2
package/README.md
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
## 演示
|
14
14
|
|
15
|
-
- [
|
15
|
+
- [GitHub Pages](https://argvchs.github.io)
|
16
16
|
- [Netlify](https://argvchs.netlify.app)
|
17
17
|
- [Vercel](https://argvchs.vercel.app)
|
18
18
|
|
@@ -23,24 +23,49 @@ cd themes
|
|
23
23
|
git clone https://github.com/argvchs/hexo-theme-particlex.git particlex --depth=1
|
24
24
|
```
|
25
25
|
|
26
|
-
|
26
|
+
- 关闭自带 Highlight
|
27
27
|
|
28
|
-
|
28
|
+
在博客根目录下的 `_config.yml`,修改 `highlight` 和 `prismjs` 参数
|
29
29
|
|
30
|
-
```yaml
|
31
|
-
highlight:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
prismjs:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
```
|
30
|
+
```yaml
|
31
|
+
highlight:
|
32
|
+
enable: false
|
33
|
+
line_number: true
|
34
|
+
auto_detect: false
|
35
|
+
tab_replace: ""
|
36
|
+
wrap: true
|
37
|
+
hljs: false
|
38
|
+
prismjs:
|
39
|
+
enable: false
|
40
|
+
preprocess: true
|
41
|
+
line_number: true
|
42
|
+
tab_replace: ""
|
43
|
+
```
|
44
|
+
|
45
|
+
如果使用 Pandoc 还需要设置一下
|
46
|
+
|
47
|
+
```yaml
|
48
|
+
pandoc:
|
49
|
+
extra:
|
50
|
+
- "no-highlight":
|
51
|
+
extensions:
|
52
|
+
- "+hard_line_breaks"
|
53
|
+
- "+emoji"
|
54
|
+
- "-implicit_figures"
|
55
|
+
```
|
56
|
+
|
57
|
+
- 禁用年度/月度归档
|
58
|
+
|
59
|
+
Hexo 会自动生成年度/月度归档,可是 ParticleX 主题没有这个功能 ~~我太懒了~~
|
60
|
+
|
61
|
+
```yaml
|
62
|
+
archive_generator:
|
63
|
+
enabled: true
|
64
|
+
per_page: 0
|
65
|
+
yearly: false
|
66
|
+
monthly: false
|
67
|
+
daily: false
|
68
|
+
```
|
44
69
|
|
45
70
|
修改完请 `hexo cl` 清除缓存
|
46
71
|
|
@@ -192,7 +217,7 @@ highlightStyle: github # Highlight style
|
|
192
217
|
|
193
218
|
- Gitalk
|
194
219
|
|
195
|
-
Gitalk 是一个基于
|
220
|
+
Gitalk 是一个基于 GitHub Issue 和 Preact 的评论系统
|
196
221
|
|
197
222
|
考虑到博客可能部署到多个网站同步评论,但 OAuth APP 只能有一个回调 URL,所以添加了 `sites` 参数用于其他网站的评论,请注册多个 Oauth APP
|
198
223
|
|
package/layout/archives.ejs
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
<% if (theme.search.enable) { %>
|
3
3
|
<div class="search-mask" style="z-index: <%= site.posts.length + 1 %>"></div>
|
4
4
|
<input class="ipt search-bar" placeholder="搜索..." style="z-index: <%= site.posts.length + 2 %>">
|
5
|
+
<script src="<%- url_for("/js/searcher.js") %>"></script>
|
6
|
+
<script>searcher.init("<%- url_for(theme.search.path) %>");</script>
|
5
7
|
<% } %>
|
6
8
|
<% site.posts.forEach((post, id) => { %>
|
7
9
|
<div class="timeline" path="<%- url_for(post.path) %>" style="z-index: <%= site.posts.length - id %>">
|
@@ -16,7 +18,7 @@
|
|
16
18
|
<span class="category">
|
17
19
|
<a href="<%- url_for(post.categories.data[0].path) %>">
|
18
20
|
<span class="icon">
|
19
|
-
<
|
21
|
+
<i class="fa-solid fa-bookmark fa-fw"></i>
|
20
22
|
</span>
|
21
23
|
<%= post.categories.data[0].name %>
|
22
24
|
</a>
|
@@ -25,7 +27,7 @@
|
|
25
27
|
<% if (post.tags && post.tags.data.length != 0) { %>
|
26
28
|
<span class="tags">
|
27
29
|
<span class="icon">
|
28
|
-
<
|
30
|
+
<i class="fa-solid fa-tags fa-fw"></i>
|
29
31
|
</span>
|
30
32
|
<% post.tags.data.forEach(data => { %>
|
31
33
|
<span class="tag">
|
@@ -44,8 +46,4 @@
|
|
44
46
|
</div>
|
45
47
|
</div>
|
46
48
|
<% }); %>
|
47
|
-
<% if (theme.search.enable) { %>
|
48
|
-
<script src="<%- url_for("/js/searcher.js") %>"></script>
|
49
|
-
<script>searcher.init("<%- url_for(theme.search.path) %>");</script>
|
50
|
-
<% } %>
|
51
49
|
</div>
|
package/layout/categories.ejs
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
<span>
|
12
12
|
<a href="<%- url_for(category.path) %>" style="<%- color[num] %>">
|
13
13
|
<span class="icon">
|
14
|
-
<
|
14
|
+
<i class="fa-solid fa-bookmark fa-fw"></i>
|
15
15
|
</span>
|
16
16
|
<%= category.name %>
|
17
17
|
</a>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<span class="category">
|
32
32
|
<a href="<%- url_for(post.categories.data[0].path) %>">
|
33
33
|
<span class="icon">
|
34
|
-
<
|
34
|
+
<i class="fa-solid fa-bookmark fa-fw"></i>
|
35
35
|
</span>
|
36
36
|
<%= post.categories.data[0].name %>
|
37
37
|
</a>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<% if (post.tags && post.tags.data.length != 0) { %>
|
41
41
|
<span class="tags">
|
42
42
|
<span class="icon">
|
43
|
-
<
|
43
|
+
<i class="fa-solid fa-tags fa-fw"></i>
|
44
44
|
</span>
|
45
45
|
<% post.tags.data.forEach(data => { %>
|
46
46
|
<span class="tag">
|
package/layout/layout.ejs
CHANGED
@@ -32,11 +32,10 @@
|
|
32
32
|
<meta name="description" content="<%- config.description %>">
|
33
33
|
<meta name="keywords" content="<%- config.keywords %>">
|
34
34
|
<link rel="icon" href="<%- theme.avatar %>">
|
35
|
-
<script src="https://cdn.staticfile.org/instant.page/5.1.1/instantpage.min.js" type="module"></script>
|
36
|
-
<script src="https://cdn.staticfile.org/font-awesome/6.2.1/js/all.min.js"></script>
|
37
35
|
<script src="https://cdn.staticfile.org/vue/3.2.45/vue.global.prod.min.js"></script>
|
38
36
|
<script src="https://cdn.staticfile.org/highlight.js/11.7.0/highlight.min.js"></script>
|
39
37
|
<link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/11.7.0/styles/<%- theme.highlightStyle %>.min.css">
|
38
|
+
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.2.1/css/all.min.css">
|
40
39
|
<% if (theme.polyfill.enable) { %>
|
41
40
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=<% theme.polyfill.features.join(",") %>"></script>
|
42
41
|
<% } %>
|
@@ -51,9 +50,6 @@
|
|
51
50
|
<body>
|
52
51
|
<%- include("loading") %>
|
53
52
|
<div id="layout">
|
54
|
-
<i data-fa-symbol="calendar-solid" class="fa-solid fa-calendar fa-fw"></i>
|
55
|
-
<i data-fa-symbol="bookmark-solid" class="fa-solid fa-bookmark fa-fw"></i>
|
56
|
-
<i data-fa-symbol="tags-solid" class="fa-solid fa-tags fa-fw"></i>
|
57
53
|
<transition name="into">
|
58
54
|
<div v-show="showpage" style="display: -not-none">
|
59
55
|
<div id="menushow">
|
package/layout/loading.ejs
CHANGED
package/layout/post.ejs
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="info">
|
6
6
|
<span class="date">
|
7
7
|
<span class="icon">
|
8
|
-
<
|
8
|
+
<i class="fa-solid fa-calendar fa-fw"></i>
|
9
9
|
</span>
|
10
10
|
<%= date(page.date, "YYYY/M/D") %>
|
11
11
|
</span>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<span class="category">
|
14
14
|
<a href="<%- url_for(page.categories.data[0].path) %>">
|
15
15
|
<span class="icon">
|
16
|
-
<
|
16
|
+
<i class="fa-solid fa-bookmark fa-fw"></i>
|
17
17
|
</span>
|
18
18
|
<%= page.categories.data[0].name %>
|
19
19
|
</a>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% if (page.tags && page.tags.data.length != 0) { %>
|
23
23
|
<span class="tags">
|
24
24
|
<span class="icon">
|
25
|
-
<
|
25
|
+
<i class="fa-solid fa-tags fa-fw"></i>
|
26
26
|
</span>
|
27
27
|
<% page.tags.data.forEach(data => { %>
|
28
28
|
<span class="tag">
|
package/layout/posts.ejs
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
<span class="category">
|
10
10
|
<a href="<%- url_for(post.categories.data[0].path) %>">
|
11
11
|
<span class="icon">
|
12
|
-
<
|
12
|
+
<i class="fa-solid fa-bookmark fa-fw"></i>
|
13
13
|
</span>
|
14
14
|
<%= post.categories.data[0].name %>
|
15
15
|
</a>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<% } %>
|
18
18
|
<span class="date">
|
19
19
|
<span class="icon">
|
20
|
-
<
|
20
|
+
<i class="fa-solid fa-calendar fa-fw"></i>
|
21
21
|
</span>
|
22
22
|
<%- date(post.date, "YYYY/M/D") %>
|
23
23
|
</span>
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<div class="post-tags">
|
37
37
|
<% if (post.tags.data.length != 0) { %>
|
38
38
|
<span class="icon">
|
39
|
-
<
|
39
|
+
<i class="fa-solid fa-tags fa-fw"></i>
|
40
40
|
</span>
|
41
41
|
<% } %>
|
42
42
|
<% post.tags.data.forEach(data => { %>
|
package/layout/tags.ejs
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
<span>
|
12
12
|
<a href="<%- url_for(tag.path) %>" style="<%- color[num] %>">
|
13
13
|
<span class="icon">
|
14
|
-
<
|
14
|
+
<i class="fa-solid fa-tags fa-fw"></i>
|
15
15
|
</span>
|
16
16
|
<%= tag.name %>
|
17
17
|
</a>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<span class="category">
|
32
32
|
<a href="<%- url_for(post.categories.data[0].path) %>">
|
33
33
|
<span class="icon">
|
34
|
-
<
|
34
|
+
<i class="fa-solid fa-bookmark fa-fw"></i>
|
35
35
|
</span>
|
36
36
|
<%= post.categories.data[0].name %>
|
37
37
|
</a>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<% if (post.tags && post.tags.data.length != 0) { %>
|
41
41
|
<span class="tags">
|
42
42
|
<span class="icon">
|
43
|
-
<
|
43
|
+
<i class="fa-solid fa-tags fa-fw"></i>
|
44
44
|
</span>
|
45
45
|
<% post.tags.data.forEach(data => { %>
|
46
46
|
<span class="tag">
|
package/package.json
CHANGED
package/source/css/particlex.css
CHANGED
@@ -162,11 +162,6 @@ pre .copycode {
|
|
162
162
|
footer .footer-wrap {
|
163
163
|
box-sizing: border-box;
|
164
164
|
}
|
165
|
-
.fa-icon {
|
166
|
-
width: 1em;
|
167
|
-
height: 1em;
|
168
|
-
vertical-align: -0.125em;
|
169
|
-
}
|
170
165
|
.icon {
|
171
166
|
margin-right: 5px;
|
172
167
|
color: #5c6b72;
|
@@ -660,20 +655,20 @@ footer .footer-wrap {
|
|
660
655
|
.content .copycode:hover {
|
661
656
|
opacity: 0.8;
|
662
657
|
}
|
663
|
-
.content .copycode
|
658
|
+
.content .copycode i {
|
664
659
|
position: absolute;
|
665
660
|
top: 0;
|
666
661
|
right: 0;
|
667
662
|
padding: 15px;
|
668
663
|
transition: transform 0.25s;
|
669
664
|
}
|
670
|
-
.content .copycode.copied
|
665
|
+
.content .copycode.copied i:first-child {
|
671
666
|
opacity: 0;
|
672
667
|
}
|
673
|
-
.content .copycode:not(.copied)
|
668
|
+
.content .copycode:not(.copied) i:last-child {
|
674
669
|
opacity: 0;
|
675
670
|
}
|
676
|
-
.content .copycode.copied
|
671
|
+
.content .copycode.copied i {
|
677
672
|
transform: scale(1.25);
|
678
673
|
}
|
679
674
|
.content .hljs {
|
package/source/js/functions.js
CHANGED
@@ -4,8 +4,7 @@ function highlight() {
|
|
4
4
|
hljs.configure({ ignoreUnescapedHTML: true });
|
5
5
|
let codes = document.getElementsByTagName("pre");
|
6
6
|
for (let code of codes) {
|
7
|
-
let
|
8
|
-
let lang = [].filter.call(langs, i => i != "sourceCode")[0] || "text";
|
7
|
+
let lang = code.classList[0] || "text";
|
9
8
|
code.innerHTML = `<div class="code-content">${code.innerHTML}</div><div class="language">${lang}</div><div class="copycode"><i class="fa-solid fa-copy fa-fw"></i><i class="fa-solid fa-clone fa-fw"></i></div>`;
|
10
9
|
let copycode = code.getElementsByClassName("copycode")[0];
|
11
10
|
copycode.addEventListener("click", async function () {
|