hexo-theme-particlex 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -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">
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/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.6",
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;
@@ -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 {
@@ -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 () {