hexo-theme-particlex 2.0.8 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/layout/categories.ejs +3 -3
- package/layout/loading.ejs +5 -5
- package/layout/tags.ejs +3 -3
- package/package.json +1 -1
- package/source/css/particlex.css +1 -0
- package/source/js/functions.js +1 -1
package/layout/categories.ejs
CHANGED
@@ -4,12 +4,12 @@
|
|
4
4
|
<% site.categories.data.forEach(category => { %>
|
5
5
|
<%
|
6
6
|
const color = is_category(category.name)
|
7
|
-
? ["
|
8
|
-
: ["
|
7
|
+
? ["linear-gradient(120deg, #9abbf7 0%, #ffbbf4 100%)"]
|
8
|
+
: ["#ffa2c4", "#00bcd4", "#03a9f4", "#00a596", "#ff7d73"];
|
9
9
|
let num = Math.floor(Math.random() * color.length);
|
10
10
|
%>
|
11
11
|
<span>
|
12
|
-
<a href="<%- url_for(category.path) %>" style="<%- color[num] %>">
|
12
|
+
<a href="<%- url_for(category.path) %>" style="background: <%- color[num] %>">
|
13
13
|
<span class="icon">
|
14
14
|
<i class="fa-solid fa-bookmark fa-fw"></i>
|
15
15
|
</span>
|
package/layout/loading.ejs
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="loading" style="height:100vh;width:100vw;position:fixed;display:flex;z-index:2147483647;justify-content:space-between;background
|
2
|
-
<div style="position:fixed;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center">
|
3
|
-
<div id="loadcontent" style="width:50vmin;height:50vmin;padding:50px;border-radius:50%;display:flex;justify-content:center;align-items:center;border:solid 10px #a3ddfb;text-align:center">
|
1
|
+
<div id="loading" style="height: 100vh; width: 100vw; position: fixed; display: flex; z-index: 2147483647; justify-content: space-between; background: #fff; transition: all 0.3s ease-out; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none">
|
2
|
+
<div style="position: fixed; height: 100vh; width: 100vw; display: flex; justify-content: center; align-items: center">
|
3
|
+
<div id="loadcontent" style="width: 50vmin; height: 50vmin; padding: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: solid 10px #a3ddfb; text-align: center">
|
4
4
|
<div>
|
5
5
|
<h2>LOADING...</h2>
|
6
|
-
<p style="word-break:keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
|
6
|
+
<p style="word-break: keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
|
7
7
|
<div>
|
8
|
-
<img alt="loading" src="<%- url_for("/loading.gif") %>" style="width:60px">
|
8
|
+
<img alt="loading" src="<%- url_for("/loading.gif") %>" style="width: 60px">
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
</div>
|
package/layout/tags.ejs
CHANGED
@@ -4,12 +4,12 @@
|
|
4
4
|
<% site.tags.data.forEach(tag => { %>
|
5
5
|
<%
|
6
6
|
const color = is_tag(tag.name)
|
7
|
-
? ["
|
8
|
-
: ["
|
7
|
+
? ["linear-gradient(120deg, #9abbf7 0%, #ffbbf4 100%)"]
|
8
|
+
: ["#ffa2c4", "#00bcd4", "#03a9f4", "#00a596", "#ff7d73"];
|
9
9
|
let num = Math.floor(Math.random() * color.length);
|
10
10
|
%>
|
11
11
|
<span>
|
12
|
-
<a href="<%- url_for(tag.path) %>" style="<%- color[num] %>">
|
12
|
+
<a href="<%- url_for(tag.path) %>" style="background: <%- color[num] %>">
|
13
13
|
<span class="icon">
|
14
14
|
<i class="fa-solid fa-tags fa-fw"></i>
|
15
15
|
</span>
|
package/package.json
CHANGED
package/source/css/particlex.css
CHANGED
package/source/js/functions.js
CHANGED
@@ -4,7 +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 lang = code.classList[0] || "text";
|
7
|
+
let lang = [...code.classList, ...code.firstChild.classList][0] || "text";
|
8
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>`;
|
9
9
|
let copycode = code.getElementsByClassName("copycode")[0];
|
10
10
|
copycode.addEventListener("click", async function () {
|