hexo-theme-particlex 2.1.2 → 2.1.5
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 +5 -2
- package/layout/card.ejs +6 -2
- package/layout/index.ejs +3 -3
- package/layout/layout.ejs +14 -11
- package/layout/post.ejs +1 -4
- package/layout/script.ejs +9 -6
- package/package.json +1 -1
- package/source/css/particlex.css +13 -16
- package/source/js/functions.js +0 -1
- package/source/js/particlex.js +7 -3
package/README.md
CHANGED
@@ -144,7 +144,10 @@ highlightStyle: github # Highlight style
|
|
144
144
|
支持 Markdown 格式
|
145
145
|
|
146
146
|
```yaml
|
147
|
-
description:
|
147
|
+
description: |-
|
148
|
+
Normal
|
149
|
+
_Italic_
|
150
|
+
**Strong**
|
148
151
|
```
|
149
152
|
|
150
153
|
- 页脚
|
@@ -177,7 +180,7 @@ highlightStyle: github # Highlight style
|
|
177
180
|
|
178
181
|
- 渲染数学公式
|
179
182
|
|
180
|
-
使用
|
183
|
+
使用 KaTeX 渲染数学公式,默认关闭
|
181
184
|
|
182
185
|
```yaml
|
183
186
|
math:
|
package/layout/card.ejs
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
</div>
|
14
14
|
<% }); %>
|
15
15
|
</div>
|
16
|
+
<% if (Object.keys(theme.card.iconLinks).length) { %>
|
16
17
|
<div class="icon-links">
|
17
18
|
<% Object.keys(theme.card.iconLinks).forEach(key => { %>
|
18
19
|
<span class="icon-link">
|
@@ -22,14 +23,17 @@
|
|
22
23
|
</span>
|
23
24
|
<% }); %>
|
24
25
|
</div>
|
26
|
+
<% } %>
|
27
|
+
<% if (Object.keys(theme.card.friendLinks).length) { %>
|
25
28
|
<div class="friend-links">
|
26
29
|
<% Object.keys(theme.card.friendLinks).forEach(key => { %>
|
27
|
-
<
|
30
|
+
<span class="friend-link">
|
28
31
|
<a href="<%- theme.card.friendLinks[key] %>">
|
29
32
|
<%= key %>
|
30
33
|
</a>
|
31
|
-
</
|
34
|
+
</span>
|
32
35
|
<% }); %>
|
33
36
|
</div>
|
37
|
+
<% } %>
|
34
38
|
</div>
|
35
39
|
</div>
|
package/layout/index.ejs
CHANGED
@@ -19,13 +19,13 @@
|
|
19
19
|
<div id="home-posts-wrap" class="<%- theme.card.enable ? "" : "home-posts-wrap-no-card" %>">
|
20
20
|
<div id="home-posts">
|
21
21
|
<div id="posts">
|
22
|
-
<%-
|
23
|
-
<%-
|
22
|
+
<%- partial("posts") %>
|
23
|
+
<%- partial("current") %>
|
24
24
|
</div>
|
25
25
|
</div>
|
26
26
|
<% if (theme.card.enable) { %>
|
27
27
|
<div id="home-card">
|
28
|
-
<%-
|
28
|
+
<%- partial("card") %>
|
29
29
|
</div>
|
30
30
|
<% } %>
|
31
31
|
</div>
|
package/layout/layout.ejs
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
<%
|
2
|
-
let
|
2
|
+
let type = "post";
|
3
3
|
if (is_home())
|
4
|
-
|
4
|
+
type = "index";
|
5
5
|
else if (is_post())
|
6
|
-
|
6
|
+
type = "post";
|
7
7
|
else if (is_category() || page.type == "categories")
|
8
|
-
|
8
|
+
type = "categories";
|
9
9
|
else if (is_tag() || page.type == "tags")
|
10
|
-
|
10
|
+
type = "tags";
|
11
11
|
else if (is_archive() || is_year() || is_month())
|
12
|
-
|
12
|
+
type = "archives";
|
13
13
|
let title = "";
|
14
14
|
if (page.title)
|
15
15
|
title = page.title + " | ";
|
@@ -48,20 +48,23 @@
|
|
48
48
|
<script src="https://cdn.staticfile.org/KaTeX/0.16.4/contrib/auto-render.min.js"></script>
|
49
49
|
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.16.4/katex.min.css">
|
50
50
|
<% } %>
|
51
|
+
<% if (theme.crypto.enable && typeof page.password !== "undefined") { %>
|
52
|
+
<script src="https://cdn.staticfile.org/crypto-js/4.1.1/crypto-js.min.js"></script>
|
53
|
+
<% } %>
|
51
54
|
<link rel="stylesheet" href="<%- url_for("/css/fonts.min.css") %>">
|
52
55
|
<link rel="stylesheet" href="<%- url_for("/css/particlex.css") %>">
|
53
56
|
</head>
|
54
57
|
<body>
|
55
|
-
<%-
|
58
|
+
<%- partial("loading") %>
|
56
59
|
<div id="layout">
|
57
60
|
<transition name="into">
|
58
61
|
<div v-show="showpage" style="display: -not-none">
|
59
62
|
<div id="menushow">
|
60
|
-
<%-
|
63
|
+
<%- partial("menu") %>
|
61
64
|
</div>
|
62
65
|
<div id="main">
|
63
|
-
<%-
|
64
|
-
<%-
|
66
|
+
<%- partial(type) %>
|
67
|
+
<%- partial("footer") %>
|
65
68
|
</div>
|
66
69
|
</div>
|
67
70
|
</transition>
|
@@ -69,6 +72,6 @@
|
|
69
72
|
<img id="showimg-content" alt="showimg">
|
70
73
|
</div>
|
71
74
|
</div>
|
72
|
-
<%-
|
75
|
+
<%- partial("script", { type }) %>
|
73
76
|
</body>
|
74
77
|
</html>
|
package/layout/post.ejs
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
</span>
|
39
39
|
<% } %>
|
40
40
|
</div>
|
41
|
-
<% if (typeof page.password !== "undefined"
|
41
|
+
<% if (theme.crypto.enable && typeof page.password !== "undefined") { %>
|
42
42
|
<%
|
43
43
|
const CryptoJS = crypto();
|
44
44
|
function sha(str) {
|
@@ -51,7 +51,6 @@
|
|
51
51
|
}).toString();
|
52
52
|
}
|
53
53
|
%>
|
54
|
-
<script src="https://cdn.staticfile.org/crypto-js/4.1.1/crypto-js.min.js"></script>
|
55
54
|
<input id="crypto" class="ipt" placeholder="文章被加密,请输入密码" data-encrypt="<%- encrypt(page.content, page.password.toString()) %>" data-check="<%- sha(page.content) %>">
|
56
55
|
<div class="content" style="opacity: 0" v-pre></div>
|
57
56
|
<% } else { %>
|
@@ -60,7 +59,6 @@
|
|
60
59
|
</div>
|
61
60
|
<% } %>
|
62
61
|
<% if (theme.gitalk.enable) { %>
|
63
|
-
<link rel="stylesheet" href="https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.css">
|
64
62
|
<div id="comment">
|
65
63
|
<div id="gitalk-container"></div>
|
66
64
|
</div>
|
@@ -71,7 +69,6 @@
|
|
71
69
|
</div>
|
72
70
|
<% } %>
|
73
71
|
<% if (theme.waline.enable) { %>
|
74
|
-
<link rel="stylesheet" href="https://cdn.staticfile.org/waline/2.9.1/waline.min.css" />
|
75
72
|
<div id="comment">
|
76
73
|
<div id="waline-container"></div>
|
77
74
|
</div>
|
package/layout/script.ejs
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
<script src="<%- url_for("/js/functions.js") %>"></script>
|
2
2
|
<script src="<%- url_for("/js/particlex.js") %>"></script>
|
3
|
-
<% if (
|
3
|
+
<% if (type == "post") { %>
|
4
4
|
<% if (theme.gitalk.enable) { %>
|
5
5
|
<script src="https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.js"></script>
|
6
|
+
<link rel="stylesheet" href="https://cdn.staticfile.org/gitalk/1.7.2/gitalk.min.css">
|
6
7
|
<script>
|
7
|
-
let clientID = "<%- theme.gitalk.clientID %>",
|
8
|
+
let clientID = "<%- theme.gitalk.clientID %>",
|
9
|
+
clientSecret = "<%- theme.gitalk.clientSecret %>";
|
8
10
|
<% Object.keys(theme.gitalk.sites).forEach(key => { %>
|
9
11
|
if (window.location.host == "<%- key %>") {
|
10
12
|
clientID = "<%- theme.gitalk.sites[key].clientID %>";
|
@@ -21,10 +23,10 @@
|
|
21
23
|
id: location.pathname,
|
22
24
|
distractionFreeMode: false,
|
23
25
|
<% if (theme.gitalk.proxy) { %>
|
24
|
-
proxy: "<%- theme.gitalk.proxy %>"
|
26
|
+
proxy: "<%- theme.gitalk.proxy %>",
|
25
27
|
<% } %>
|
26
28
|
})
|
27
|
-
gitalk.render("gitalk-container")
|
29
|
+
gitalk.render("gitalk-container");
|
28
30
|
</script>
|
29
31
|
<% } %>
|
30
32
|
<% if (theme.giscus.enable) { %>
|
@@ -47,6 +49,7 @@
|
|
47
49
|
<% } %>
|
48
50
|
<% if (theme.waline.enable) { %>
|
49
51
|
<script src="https://cdn.staticfile.org/waline/2.9.1/waline.min.js"></script>
|
52
|
+
<link rel="stylesheet" href="https://cdn.staticfile.org/waline/2.9.1/waline.min.css">
|
50
53
|
<script>
|
51
54
|
Waline.init({
|
52
55
|
el: "#waline-container",
|
@@ -60,7 +63,7 @@
|
|
60
63
|
wordLimit: <%- theme.waline.wordLimit %>,
|
61
64
|
pageSize: "<%- theme.waline.pageSize %>",
|
62
65
|
login: "<%- theme.waline.login %>",
|
63
|
-
locale: <%- JSON.stringify(theme.waline.locale)
|
66
|
+
locale: <%- JSON.stringify(theme.waline.locale) %>,
|
64
67
|
});
|
65
68
|
</script>
|
66
69
|
<% } %>
|
@@ -72,7 +75,7 @@
|
|
72
75
|
envId: "<%- theme.twikoo.envId %>",
|
73
76
|
region: "<%- theme.twikoo.region %>",
|
74
77
|
path: <%- theme.twikoo.path %>,
|
75
|
-
lang: "<%- theme.twikoo.lang %>"
|
78
|
+
lang: "<%- theme.twikoo.lang %>",
|
76
79
|
})
|
77
80
|
</script>
|
78
81
|
<% } %>
|
package/package.json
CHANGED
package/source/css/particlex.css
CHANGED
@@ -291,7 +291,7 @@ footer .footer-wrap {
|
|
291
291
|
color: #1e3e3f;
|
292
292
|
}
|
293
293
|
#home-posts .post .post-tags {
|
294
|
-
line-height: 1.
|
294
|
+
line-height: 1.7;
|
295
295
|
}
|
296
296
|
#home-posts .post .post-tags a {
|
297
297
|
font-size: 14px;
|
@@ -414,7 +414,6 @@ footer .footer-wrap {
|
|
414
414
|
font-size: 16px;
|
415
415
|
font-weight: bold;
|
416
416
|
color: #1e3e3f;
|
417
|
-
text-transform: uppercase;
|
418
417
|
}
|
419
418
|
#home-card .card-style .descriptions {
|
420
419
|
margin: 20px auto;
|
@@ -423,9 +422,8 @@ footer .footer-wrap {
|
|
423
422
|
#home-card .card-style .icon-links {
|
424
423
|
width: 85%;
|
425
424
|
margin: 10px auto;
|
426
|
-
padding:
|
425
|
+
padding-top: 10px;
|
427
426
|
border-top: #cdcdcd solid 1px;
|
428
|
-
border-bottom: #cdcdcd solid 1px;
|
429
427
|
}
|
430
428
|
#home-card .card-style .icon-links a {
|
431
429
|
color: #5c6b72;
|
@@ -441,20 +439,18 @@ footer .footer-wrap {
|
|
441
439
|
margin: 5px;
|
442
440
|
}
|
443
441
|
#home-card .card-style .friend-links {
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
text-align: center;
|
442
|
+
width: 85%;
|
443
|
+
margin: 10px auto;
|
444
|
+
padding-top: 10px;
|
445
|
+
border-top: #cdcdcd solid 1px;
|
449
446
|
}
|
450
447
|
#home-card .card-style .friend-links .friend-link a {
|
451
448
|
display: inline-block;
|
452
|
-
width:
|
453
|
-
|
449
|
+
width: 100%;
|
450
|
+
margin-bottom: 5px;
|
451
|
+
line-height: 30px;
|
454
452
|
color: #5c6b72;
|
455
|
-
|
456
|
-
border-radius: 15px;
|
457
|
-
background-blend-mode: darken;
|
453
|
+
border-radius: 10px;
|
458
454
|
}
|
459
455
|
#home-card .card-style .friend-links .friend-link a:hover {
|
460
456
|
color: #fff;
|
@@ -507,6 +503,7 @@ footer .footer-wrap {
|
|
507
503
|
#menu .phone-menu .title {
|
508
504
|
z-index: 10004;
|
509
505
|
cursor: pointer;
|
506
|
+
text-transform: uppercase;
|
510
507
|
color: #555;
|
511
508
|
}
|
512
509
|
#menu .phone-menu .items {
|
@@ -718,7 +715,7 @@ footer .footer-icon {
|
|
718
715
|
text-decoration: none;
|
719
716
|
}
|
720
717
|
#archives .info {
|
721
|
-
line-height: 1.
|
718
|
+
line-height: 1.7;
|
722
719
|
}
|
723
720
|
#archives .category {
|
724
721
|
display: inline-block;
|
@@ -786,7 +783,7 @@ footer .footer-icon {
|
|
786
783
|
margin: 20px 0;
|
787
784
|
}
|
788
785
|
.article .info {
|
789
|
-
line-height: 1.
|
786
|
+
line-height: 1.7;
|
790
787
|
}
|
791
788
|
.article .info a {
|
792
789
|
color: #5c6b72;
|
package/source/js/functions.js
CHANGED
package/source/js/particlex.js
CHANGED
@@ -8,10 +8,14 @@ const app = Vue.createApp({
|
|
8
8
|
composition: false,
|
9
9
|
};
|
10
10
|
},
|
11
|
+
created() {
|
12
|
+
window.addEventListener("load", () => {
|
13
|
+
this.showpage = true;
|
14
|
+
document.getElementById("loading").style.opacity = 0;
|
15
|
+
document.getElementById("loading").style.visibility = "hidden";
|
16
|
+
});
|
17
|
+
},
|
11
18
|
mounted() {
|
12
|
-
this.showpage = true;
|
13
|
-
document.getElementById("loading").style.opacity = 0;
|
14
|
-
document.getElementById("loading").style.visibility = "hidden";
|
15
19
|
if (document.getElementById("home-head"))
|
16
20
|
document.getElementById("menu").className += " menu-color";
|
17
21
|
if (document.getElementById("crypto")) {
|