hexo-theme-particlex 2.0.5 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [ParticleX](https://github.com/argvchs/hexo-theme-particlex) 主题,诞生原因是因为原来的 [Particle](https://github.com/korilin/hexo-theme-particle) 主题不维护了,但是我觉得还是很好的
4
4
 
5
- 原来用的是 Vue 2 + Ant Design Vue 1,现更新到 Vue 3,去除 Ant Design Vue 采用自定义样式,图标更改为 Font Awesome 6,将不能用的 JSDelivr 改为 Staticfile CDN
5
+ 原来用的是 Vue 2 + Ant Design Vue 1,现更新到 Vue 3,去除 Ant Design Vue 采用自定义样式,图标更改为 Font Awesome 6,CDN 改为 Staticfile
6
6
 
7
7
  原项目 `README.md` 里说:
8
8
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  ## 演示
14
14
 
15
- - [Github Pages](https://argvchs.github.io)
15
+ - [GitHub Pages](https://argvchs.github.io)
16
16
  - [Netlify](https://argvchs.netlify.app)
17
17
  - [Vercel](https://argvchs.vercel.app)
18
18
 
@@ -192,7 +192,7 @@ highlightStyle: github # Highlight style
192
192
 
193
193
  - Gitalk
194
194
 
195
- Gitalk 是一个基于 Github Issue 和 Preact 的评论系统
195
+ Gitalk 是一个基于 GitHub Issue 和 Preact 的评论系统
196
196
 
197
197
  考虑到博客可能部署到多个网站同步评论,但 OAuth APP 只能有一个回调 URL,所以添加了 `sites` 参数用于其他网站的评论,请注册多个 Oauth APP
198
198
 
@@ -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
- <svg class="fa-icon"><use xlink:href="#bookmark-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#tags-solid"></use></svg>
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>
@@ -11,7 +11,7 @@
11
11
  <span>
12
12
  <a href="<%- url_for(category.path) %>" style="<%- color[num] %>">
13
13
  <span class="icon">
14
- <svg class="fa-icon"><use xlink:href="#bookmark-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#bookmark-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#tags-solid"></use></svg>
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">
@@ -3,7 +3,7 @@
3
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
8
  <img alt="loading" src="<%- url_for("/loading.gif") %>">
9
9
  </div>
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
- <svg class="fa-icon"><use xlink:href="#calendar-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#bookmark-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#tags-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#bookmark-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#calendar-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#tags-solid"></use></svg>
39
+ <i class="fa-solid fa-tags fa-fw"></i>
40
40
  </span>
41
41
  <% } %>
42
42
  <% post.tags.data.forEach(data => { %>
package/layout/script.ejs CHANGED
@@ -41,6 +41,7 @@
41
41
  data-input-position="<%- theme.giscus.inputPosition %>"
42
42
  data-theme="<%- theme.giscus.theme %>"
43
43
  data-lang="<%- theme.giscus.lang %>"
44
+ crossorigin
44
45
  async
45
46
  ></script>
46
47
  <% } %>
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
- <svg class="fa-icon"><use xlink:href="#tags-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#bookmark-solid"></use></svg>
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
- <svg class="fa-icon"><use xlink:href="#tags-solid"></use></svg>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-particlex",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "A concise Hexo theme, based on Particle.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -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;
@@ -541,8 +536,8 @@ footer .footer-wrap {
541
536
  top: -70px !important;
542
537
  }
543
538
  .menu-color {
544
- background: #00000033 !important;
545
- box-shadow: 0 -1px 10px 0 #ffffff00 !important;
539
+ background: #0003 !important;
540
+ box-shadow: 0 -1px 10px 0 #fff0 !important;
546
541
  }
547
542
  .menu-color .title {
548
543
  color: #fff !important;
@@ -660,20 +655,20 @@ footer .footer-wrap {
660
655
  .content .copycode:hover {
661
656
  opacity: 0.8;
662
657
  }
663
- .content .copycode svg {
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 svg:first-child {
665
+ .content .copycode.copied i:first-child {
671
666
  opacity: 0;
672
667
  }
673
- .content .copycode:not(.copied) svg:last-child {
668
+ .content .copycode:not(.copied) i:last-child {
674
669
  opacity: 0;
675
670
  }
676
- .content .copycode.copied svg {
671
+ .content .copycode.copied i {
677
672
  transform: scale(1.25);
678
673
  }
679
674
  .content .hljs {
@@ -983,11 +978,11 @@ body::-webkit-scrollbar-track {
983
978
  border: 3px solid #e6efff;
984
979
  background-image: linear-gradient(
985
980
  45deg,
986
- rgba(255, 255, 255, 0.4) 25%,
981
+ #fff6 25%,
987
982
  transparent 25%,
988
983
  transparent 50%,
989
- rgba(255, 255, 255, 0.4) 50%,
990
- rgba(255, 255, 255, 0.4) 75%,
984
+ #fff6 50%,
985
+ #fff6 75%,
991
986
  transparent 75%,
992
987
  transparent
993
988
  );
@@ -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 langs = [...code.classList, ...code.firstChild.classList];
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 () {