hexo-theme-particlex 2.2.7 → 2.2.9
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 +3 -7
- package/layout/script.ejs +79 -79
- package/package.json +2 -3
- package/source/css/particlex.css +5 -4
- package/source/images/loading.gif +0 -0
- package/source/js/particlex.js +3 -3
package/README.md
CHANGED
|
@@ -48,15 +48,11 @@ git clone https://github.com/argvchs/hexo-theme-particlex.git particlex --depth=
|
|
|
48
48
|
pandoc:
|
|
49
49
|
extra:
|
|
50
50
|
- "no-highlight":
|
|
51
|
-
extensions:
|
|
52
|
-
- "+hard_line_breaks"
|
|
53
|
-
- "+emoji"
|
|
54
|
-
- "-implicit_figures"
|
|
55
51
|
```
|
|
56
52
|
|
|
57
|
-
-
|
|
53
|
+
- 禁用年度月度归档
|
|
58
54
|
|
|
59
|
-
Hexo
|
|
55
|
+
Hexo 会自动生成年度月度归档,可是 ParticleX 主题没有这个功能 ~~我太懒了~~
|
|
60
56
|
|
|
61
57
|
```yaml
|
|
62
58
|
archive_generator:
|
|
@@ -167,7 +163,7 @@ highlightStyle: github # Highlight style
|
|
|
167
163
|
|
|
168
164
|
使用 [Polyfill.io](https://polyfill.io/v3/url-builder) 自动根据 UA 处理新的 JS API 兼容
|
|
169
165
|
|
|
170
|
-
可以配合 [Hexo-
|
|
166
|
+
可以配合 [Hexo-Babel](https://github.com/argvchs/hexo-babel) 插件处理 JS 语法兼容
|
|
171
167
|
|
|
172
168
|
```yaml
|
|
173
169
|
polyfill:
|
package/layout/script.ejs
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
<script src="<%- url_for("/js/functions.js") %>"></script>
|
|
2
2
|
<script src="<%- url_for("/js/particlex.js") %>"></script>
|
|
3
3
|
<% if (type == "post") { %>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
4
|
+
<% if (theme.gitalk.enable) { %>
|
|
5
|
+
<script src="https://cdn.staticfile.org/gitalk/1.8.0/gitalk.min.js"></script>
|
|
6
|
+
<link rel="stylesheet" href="https://cdn.staticfile.org/gitalk/1.8.0/gitalk.min.css">
|
|
7
|
+
<script>
|
|
8
|
+
let clientID = "<%- theme.gitalk.clientID %>",
|
|
9
|
+
clientSecret = "<%- theme.gitalk.clientSecret %>";
|
|
10
|
+
<% Object.keys(theme.gitalk.sites).forEach(key => { %>
|
|
11
|
+
if (window.location.host == "<%- key %>") {
|
|
12
|
+
clientID = "<%- theme.gitalk.sites[key].clientID %>";
|
|
13
|
+
clientSecret = "<%- theme.gitalk.sites[key].clientSecret %>";
|
|
14
|
+
}
|
|
15
|
+
<% }); %>
|
|
16
|
+
const gitalk = new Gitalk({
|
|
17
|
+
clientID: clientID,
|
|
18
|
+
clientSecret: clientSecret,
|
|
19
|
+
repo: "<%- theme.gitalk.repo %>",
|
|
20
|
+
owner: "<%- theme.gitalk.owner %>",
|
|
21
|
+
admin: ["<%- theme.gitalk.admin %>"],
|
|
22
|
+
language: "<%- theme.gitalk.language %>",
|
|
23
|
+
id: location.pathname,
|
|
24
|
+
distractionFreeMode: false,
|
|
25
|
+
<% if (theme.gitalk.proxy) { %>
|
|
26
|
+
proxy: "<%- theme.gitalk.proxy %>",
|
|
27
|
+
<% } %>
|
|
28
|
+
})
|
|
29
|
+
gitalk.render("gitalk-container");
|
|
30
|
+
</script>
|
|
31
|
+
<% } %>
|
|
32
|
+
<% if (theme.giscus.enable) { %>
|
|
33
|
+
<script
|
|
34
|
+
src="<%- theme.giscus.src %>"
|
|
35
|
+
data-repo="<%- theme.giscus.repo %>"
|
|
36
|
+
data-repo-id="<%- theme.giscus.repoID %>"
|
|
37
|
+
data-category="<%- theme.giscus.category %>"
|
|
38
|
+
data-category-id="<%- theme.giscus.categoryID %>"
|
|
39
|
+
data-mapping="<%- theme.giscus.mapping %>"
|
|
40
|
+
data-strict="<%- theme.giscus.strict %>"
|
|
41
|
+
data-reactions-enabled="<%- theme.giscus.reactionsEnabled %>"
|
|
42
|
+
data-emit-metadata="<%- theme.giscus.emitMetadata %>"
|
|
43
|
+
data-input-position="<%- theme.giscus.inputPosition %>"
|
|
44
|
+
data-theme="<%- theme.giscus.theme %>"
|
|
45
|
+
data-lang="<%- theme.giscus.lang %>"
|
|
46
|
+
crossorigin
|
|
47
|
+
async
|
|
48
|
+
></script>
|
|
49
|
+
<% } %>
|
|
50
|
+
<% if (theme.waline.enable) { %>
|
|
51
|
+
<script src="https://cdn.staticfile.org/waline/2.14.7/waline.min.js"></script>
|
|
52
|
+
<link rel="stylesheet" href="https://cdn.staticfile.org/waline/2.14.7/waline.min.css">
|
|
53
|
+
<link rel="stylesheet" href="https://cdn.staticfile.org/waline/2.14.7/waline-meta.min.css">
|
|
54
|
+
<script>
|
|
55
|
+
Waline.init({
|
|
56
|
+
el: "#waline-container",
|
|
57
|
+
serverURL: "<%- theme.waline.serverURL %>",
|
|
58
|
+
commentCount: <%- theme.waline.commentCount %>,
|
|
59
|
+
pageview: <%- theme.waline.pageview %>,
|
|
60
|
+
emoji: "<%- theme.waline.emoji %>".split(","),
|
|
61
|
+
meta: "<%- theme.waline.meta %>".split(","),
|
|
62
|
+
requiredMeta: "<%- theme.waline.requiredMeta %>".split(","),
|
|
63
|
+
lang: "<%- theme.waline.lang %>",
|
|
64
|
+
wordLimit: <%- theme.waline.wordLimit %>,
|
|
65
|
+
pageSize: "<%- theme.waline.pageSize %>",
|
|
66
|
+
login: "<%- theme.waline.login %>",
|
|
67
|
+
locale: <%- JSON.stringify(theme.waline.locale) %>,
|
|
68
|
+
});
|
|
69
|
+
</script>
|
|
70
|
+
<% } %>
|
|
71
|
+
<% if (theme.twikoo.enable) { %>
|
|
72
|
+
<script src="https://cdn.staticfile.org/twikoo/1.6.8/twikoo.all.min.js"></script>
|
|
73
|
+
<script>
|
|
74
|
+
twikoo.init({
|
|
75
|
+
el: "#twikoo-container",
|
|
76
|
+
envId: "<%- theme.twikoo.envId %>",
|
|
77
|
+
region: "<%- theme.twikoo.region %>",
|
|
78
|
+
path: <%- theme.twikoo.path %>,
|
|
79
|
+
lang: "<%- theme.twikoo.lang %>",
|
|
80
|
+
})
|
|
81
|
+
</script>
|
|
82
|
+
<% } %>
|
|
83
83
|
<% } %>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hexo-theme-particlex",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
4
4
|
"description": "A concise Hexo theme, based on Particle.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/argvchs/hexo-theme-particlex#readme",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"hexo-helper-crypto": "^1.0.
|
|
28
|
-
"hexo-renderer-babeljs": "^1.0.7",
|
|
27
|
+
"hexo-helper-crypto": "^1.0.5",
|
|
29
28
|
"hexo-renderer-ejs": "^2.0.0"
|
|
30
29
|
}
|
|
31
30
|
}
|
package/source/css/particlex.css
CHANGED
|
@@ -112,15 +112,16 @@
|
|
|
112
112
|
color: #34d058;
|
|
113
113
|
}
|
|
114
114
|
#home-background {
|
|
115
|
-
background-position: center;
|
|
116
|
-
background-repeat: no-repeat;
|
|
117
|
-
background-size: cover;
|
|
118
115
|
position: absolute;
|
|
116
|
+
z-index: -1;
|
|
119
117
|
height: 100vh;
|
|
120
118
|
left: 0;
|
|
121
119
|
top: 0;
|
|
122
120
|
width: 100vw;
|
|
123
|
-
|
|
121
|
+
background-position: center;
|
|
122
|
+
background-repeat: no-repeat;
|
|
123
|
+
background-size: cover;
|
|
124
|
+
background-attachment: fixed;
|
|
124
125
|
}
|
|
125
126
|
#home-card {
|
|
126
127
|
position: relative;
|
|
Binary file
|
package/source/js/particlex.js
CHANGED
|
@@ -65,9 +65,9 @@ const app = Vue.createApp({
|
|
|
65
65
|
if (wrap) {
|
|
66
66
|
if (newlocal <= window.innerHeight - 100) menu.className += " menu-color";
|
|
67
67
|
if (newlocal <= 400) {
|
|
68
|
-
wrap.style.top =
|
|
69
|
-
footer.style.top =
|
|
70
|
-
} else
|
|
68
|
+
wrap.style.top = newlocal / -5 + "px";
|
|
69
|
+
footer.style.top = newlocal / -5 + 150 + "px";
|
|
70
|
+
} else {
|
|
71
71
|
wrap.style.top = "-80px";
|
|
72
72
|
footer.style.top = "70px";
|
|
73
73
|
}
|