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.
@@ -4,12 +4,12 @@
4
4
  <% site.categories.data.forEach(category => { %>
5
5
  <%
6
6
  const color = is_category(category.name)
7
- ? ["background: linear-gradient(120deg, #9abbf7 0%, #ffbbf4 100%)"]
8
- : ["background: #ffa2c4", "background: #00bcd4", "background: #03a9f4", "background: #00a596", "background: #ff7d73"];
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>
@@ -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:#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">
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
- ? ["background: linear-gradient(120deg, #9abbf7 0%, #ffbbf4 100%)"]
8
- : ["background: #ffa2c4", "background: #00bcd4", "background: #03a9f4", "background: #00a596", "background: #ff7d73"];
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -553,6 +553,7 @@ footer .footer-wrap {
553
553
  background: #bddcf76b;
554
554
  padding: 4px 8px;
555
555
  border-radius: 4px;
556
+ line-height: 2.5;
556
557
  font-size: 14px;
557
558
  color: #4b616b;
558
559
  }
@@ -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 () {