hexo-theme-particlex 2.2.1 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/layout/archives.ejs +8 -4
- package/layout/card.ejs +5 -5
- package/layout/categories.ejs +1 -5
- package/layout/current.ejs +16 -32
- package/layout/layout.ejs +9 -14
- package/layout/loading.ejs +1 -1
- package/layout/posts.ejs +20 -2
- package/layout/tags.ejs +1 -5
- package/package.json +1 -1
- package/source/css/particlex.css +624 -753
- package/source/{loading.gif → images/loading.gif} +0 -0
- package/source/js/functions.js +1 -1
package/README.md
CHANGED
package/layout/archives.ejs
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
+
<%
|
2
|
+
let posts = site.posts;
|
3
|
+
posts.data.sort((a, b) => b.date - a.date);
|
4
|
+
%>
|
1
5
|
<div id="archives">
|
2
6
|
<% if (theme.search.enable) { %>
|
3
|
-
<div id="search-mask" style="z-index: <%=
|
4
|
-
<input id="search-bar" class="ipt" placeholder="搜索" style="z-index: <%=
|
7
|
+
<div id="search-mask" style="z-index: <%= posts.length + 1 %>"></div>
|
8
|
+
<input id="search-bar" class="ipt" placeholder="搜索" style="z-index: <%= posts.length + 2 %>">
|
5
9
|
<% } %>
|
6
|
-
<%
|
7
|
-
<div class="timeline" style="z-index: <%=
|
10
|
+
<% posts.forEach((post, id) => { %>
|
11
|
+
<div class="timeline" style="z-index: <%= posts.length - id %>" data-title="<%- post.title.toLowerCase().replace(/\s+/gm, "") %>">
|
8
12
|
<div class="timeline-tail"></div>
|
9
13
|
<div class="timeline-content">
|
10
14
|
<div class="item-time"><%- date(post.date, "YYYY/M/D") %></div>
|
package/layout/card.ejs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="card-div">
|
2
2
|
<div class="card-style" style="width: 300px">
|
3
3
|
<div class="avatar">
|
4
|
-
<img src="<%- theme.avatar %>" alt="avatar">
|
4
|
+
<img src="<%- url_for(theme.avatar) %>" alt="avatar">
|
5
5
|
</div>
|
6
6
|
<div class="name">
|
7
7
|
<%= config.author %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<div class="icon-links">
|
14
14
|
<% Object.keys(theme.card.iconLinks).forEach(key => { %>
|
15
15
|
<span class="icon-link">
|
16
|
-
<a href="<%- theme.card.iconLinks[key].link %>">
|
16
|
+
<a href="<%- url_for(theme.card.iconLinks[key].link) %>">
|
17
17
|
<i class="fa-<%- theme.card.iconLinks[key].theme %> fa-<%- theme.card.iconLinks[key].name %> fa-fw"></i>
|
18
18
|
</a>
|
19
19
|
</span>
|
@@ -23,11 +23,11 @@
|
|
23
23
|
<% if (Object.keys(theme.card.friendLinks).length) { %>
|
24
24
|
<div class="friend-links">
|
25
25
|
<% Object.keys(theme.card.friendLinks).forEach(key => { %>
|
26
|
-
<
|
27
|
-
<a href="<%- theme.card.friendLinks[key] %>">
|
26
|
+
<div class="friend-link">
|
27
|
+
<a href="<%- url_for(theme.card.friendLinks[key]) %>">
|
28
28
|
<%= key %>
|
29
29
|
</a>
|
30
|
-
</
|
30
|
+
</div>
|
31
31
|
<% }); %>
|
32
32
|
</div>
|
33
33
|
<% } %>
|
package/layout/categories.ejs
CHANGED
@@ -19,11 +19,7 @@
|
|
19
19
|
<% if (is_category(category.name)) { %>
|
20
20
|
<%
|
21
21
|
posts = category.posts;
|
22
|
-
posts.data.sort((a, b) =>
|
23
|
-
if (typeof a.top === "undefined") a.top = 0;
|
24
|
-
if (typeof b.top === "undefined") b.top = 0;
|
25
|
-
return a.top == b.top ? b.date - a.date : b.top - a.top
|
26
|
-
});
|
22
|
+
posts.data.sort((a, b) => b.date - a.date);
|
27
23
|
%>
|
28
24
|
<% } %>
|
29
25
|
<% }); %>
|
package/layout/current.ejs
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
<div class="page-current">
|
2
2
|
<div class="prev">
|
3
3
|
<% if (page.current != 1) { %>
|
4
|
-
<a href="<%- url_for(page.prev_link) %>">
|
5
|
-
<
|
6
|
-
<i class="fa-solid fa-caret-left fa-fw"></i>
|
7
|
-
</span>
|
4
|
+
<a class="page-num" href="<%- url_for(page.prev_link) %>">
|
5
|
+
<i class="fa-solid fa-caret-left fa-fw"></i>
|
8
6
|
</a>
|
9
7
|
<% } %>
|
10
8
|
</div>
|
@@ -12,27 +10,21 @@
|
|
12
10
|
<% if (page.current != 1) { %>
|
13
11
|
<span>
|
14
12
|
<% if (page.current - 3 >= 1) { %>
|
15
|
-
<a href="<%- config.root %>"
|
13
|
+
<a class="page-num" href="<%- config.root %>">1</a>
|
16
14
|
<span class="page-omit">...</span>
|
17
15
|
<% } %>
|
18
16
|
<% if (page.current - 2 >= 1) { %>
|
19
17
|
<% if (page.current - 2 == 1) { %>
|
20
|
-
<a href="<%- config.root %>">
|
21
|
-
<span class="page-num">1</span>
|
22
|
-
</a>
|
18
|
+
<a class="page-num" href="<%- config.root %>">1</a>
|
23
19
|
<% } %>
|
24
20
|
<% if (page.current - 2 != 1) { %>
|
25
|
-
<a href="<%- url_for("page/" + (page.current - 2)) %>">
|
26
|
-
|
27
|
-
<%= page.current - 2 %>
|
28
|
-
</span>
|
21
|
+
<a class="page-num" href="<%- url_for("page/" + (page.current - 2)) %>">
|
22
|
+
<%= page.current - 2 %>
|
29
23
|
</a>
|
30
24
|
<% } %>
|
31
25
|
<% } %>
|
32
|
-
<a href="<%- url_for(page.prev_link) %>">
|
33
|
-
|
34
|
-
<%= page.prev %>
|
35
|
-
</span>
|
26
|
+
<a class="page-num" href="<%- url_for(page.prev_link) %>">
|
27
|
+
<%= page.prev %>
|
36
28
|
</a>
|
37
29
|
</span>
|
38
30
|
<% } %>
|
@@ -41,24 +33,18 @@
|
|
41
33
|
</span>
|
42
34
|
<% if (page.current != page.total) { %>
|
43
35
|
<span>
|
44
|
-
<a href="<%- url_for(page.next_link) %>">
|
45
|
-
|
46
|
-
<%= page.next %>
|
47
|
-
</span>
|
36
|
+
<a class="page-num" href="<%- url_for(page.next_link) %>">
|
37
|
+
<%= page.next %>
|
48
38
|
</a>
|
49
39
|
<% if (page.current + 2 <= page.total) { %>
|
50
|
-
<a href="<%- url_for("page/" + (page.current + 2)) %>">
|
51
|
-
|
52
|
-
<%= page.current + 2 %>
|
53
|
-
</span>
|
40
|
+
<a class="page-num" href="<%- url_for("page/" + (page.current + 2)) %>">
|
41
|
+
<%= page.current + 2 %>
|
54
42
|
</a>
|
55
43
|
<% } %>
|
56
44
|
<% if (page.current + 3 <= page.total) { %>
|
57
45
|
<span class="page-omit">...</span>
|
58
|
-
<a href="<%- url_for("page/" + page.total) %>">
|
59
|
-
|
60
|
-
<%= page.total %>
|
61
|
-
</span>
|
46
|
+
<a class="page-num" href="<%- url_for("page/" + page.total) %>">
|
47
|
+
<%= page.total %>
|
62
48
|
</a>
|
63
49
|
<% } %>
|
64
50
|
</span>
|
@@ -66,10 +52,8 @@
|
|
66
52
|
</div>
|
67
53
|
<div class="next">
|
68
54
|
<% if (page.current != page.total) { %>
|
69
|
-
<a href="<%- url_for(page.next_link) %> ">
|
70
|
-
<
|
71
|
-
<i class="fa-solid fa-caret-right fa-fw"></i>
|
72
|
-
</span>
|
55
|
+
<a class="page-num" href="<%- url_for(page.next_link) %> ">
|
56
|
+
<i class="fa-solid fa-caret-right fa-fw"></i>
|
73
57
|
</a>
|
74
58
|
<% } %>
|
75
59
|
</div>
|
package/layout/layout.ejs
CHANGED
@@ -20,11 +20,6 @@
|
|
20
20
|
else if (is_archive() || is_year() || is_month())
|
21
21
|
title = "Archives | ";
|
22
22
|
title += config.title;
|
23
|
-
site.posts.data.sort((a, b) => {
|
24
|
-
if (typeof a.top === "undefined") a.top = 0;
|
25
|
-
if (typeof b.top === "undefined") b.top = 0;
|
26
|
-
return a.top == b.top ? b.date - a.date : b.top - a.top;
|
27
|
-
});
|
28
23
|
%>
|
29
24
|
<!DOCTYPE html>
|
30
25
|
<html lang="<%- config.language %>">
|
@@ -35,7 +30,7 @@
|
|
35
30
|
<meta name="author" content="<%- config.author %>">
|
36
31
|
<meta name="description" content="<%- config.description %>">
|
37
32
|
<meta name="keywords" content="<%- config.keywords %>">
|
38
|
-
<link rel="icon" href="<%- theme.avatar %>">
|
33
|
+
<link rel="icon" href="<%- url_for(theme.avatar) %>">
|
39
34
|
<script src="https://cdn.staticfile.org/vue/3.2.45/vue.global.prod.min.js"></script>
|
40
35
|
<script src="https://cdn.staticfile.org/highlight.js/11.7.0/highlight.min.js"></script>
|
41
36
|
<link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/11.7.0/styles/<%- theme.highlightStyle %>.min.css">
|
@@ -58,15 +53,15 @@
|
|
58
53
|
<%- partial("loading") %>
|
59
54
|
<div id="layout">
|
60
55
|
<transition name="into">
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
</div>
|
65
|
-
<div id="main">
|
66
|
-
<%- partial(type) %>
|
67
|
-
<%- partial("footer") %>
|
68
|
-
</div>
|
56
|
+
<div v-show="showpage" style="display: -not-none">
|
57
|
+
<div id="menushow">
|
58
|
+
<%- partial("menu") %>
|
69
59
|
</div>
|
60
|
+
<div id="main">
|
61
|
+
<%- partial(type) %>
|
62
|
+
<%- partial("footer") %>
|
63
|
+
</div>
|
64
|
+
</div>
|
70
65
|
</transition>
|
71
66
|
<div id="showimg">
|
72
67
|
<img id="showimg-content" alt="showimg">
|
package/layout/loading.ejs
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<h2>LOADING...</h2>
|
6
6
|
<p style="word-break: keep-all">加载过慢请开启缓存(浏览器默认开启)</p>
|
7
7
|
<div>
|
8
|
-
<img alt="loading" src="<%- url_for("/loading.gif") %>" style="
|
8
|
+
<img alt="loading" src="<%- url_for("/images/loading.gif") %>" style="height: 50px">
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
</div>
|
package/layout/posts.ejs
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
<%
|
2
|
-
|
1
|
+
<%
|
2
|
+
let posts = site.posts,
|
3
|
+
current = (page.current - 1) * config.index_generator.per_page;
|
4
|
+
posts.data.sort((a, b) => {
|
5
|
+
let topa = a.top ?? 0, topb = b.top ?? 0;
|
6
|
+
return topa == topb ? b.date - a.date : topb - topa;
|
7
|
+
});
|
8
|
+
posts = posts.slice(current, config.index_generator.per_page + current);
|
9
|
+
%>
|
10
|
+
<% posts.forEach(post => { %>
|
3
11
|
<div class="post">
|
4
12
|
<a href="<%- url_for(post.path) %>">
|
5
13
|
<h2 class="post-title"><%= titlecase(post.title) %></h2>
|
@@ -21,6 +29,16 @@
|
|
21
29
|
</span>
|
22
30
|
<%- date(post.date, "YYYY/M/D") %>
|
23
31
|
</span>
|
32
|
+
<% if (theme.crypto.enable && typeof post.password !== "undefined") { %>
|
33
|
+
<span class="special">
|
34
|
+
<i class="fa-solid fa-lock fa-fw"></i>
|
35
|
+
</span>
|
36
|
+
<% } %>
|
37
|
+
<% if (typeof post.top !== "undefined" && post.top > 0) { %>
|
38
|
+
<span class="special">
|
39
|
+
<i class="fa-solid fa-grip-vertical fa-fw"></i>
|
40
|
+
</span>
|
41
|
+
<% } %>
|
24
42
|
</div>
|
25
43
|
<div class="excerpt">
|
26
44
|
<div class="content" v-pre>
|
package/layout/tags.ejs
CHANGED
@@ -19,11 +19,7 @@
|
|
19
19
|
<% if (is_tag(tag.name)) { %>
|
20
20
|
<%
|
21
21
|
posts = tag.posts;
|
22
|
-
posts.data.sort((a, b) =>
|
23
|
-
if (typeof a.top === "undefined") a.top = 0;
|
24
|
-
if (typeof b.top === "undefined") b.top = 0;
|
25
|
-
return a.top == b.top ? b.date - a.date : b.top - a.top;
|
26
|
-
});
|
22
|
+
posts.data.sort((a, b) => b.date - a.date);
|
27
23
|
%>
|
28
24
|
<% } %>
|
29
25
|
<% }); %>
|