hexo-theme-solitude 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/README_en-US.md +2 -2
- package/README_zh-Hant.md +1 -1
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/widgets/page/about/award.pug +2 -1
- package/package.json +3 -3
- package/scripts/tags/button.js +1 -1
- package/scripts/tags/link.js +6 -5
- package/source/css/_comments/comment.styl +1 -0
- package/source/css/_comments/valine.styl +3 -0
- package/source/css/_page/_about/reward.styl +1 -0
- package/source/css/_post/tools.styl +8 -0
- package/source/js/main.js +6 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
39
39
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
40
40
|
|
41
|
-
[预览](https://
|
41
|
+
[文档 & 预览](https://solitude.js.org/)
|
42
42
|
|
43
43
|
</div>
|
44
44
|
|
@@ -87,4 +87,4 @@
|
|
87
87
|
|
88
88
|
## 版权
|
89
89
|
|
90
|
-
[MIT](./LICENSE) License © 2023-至今 [
|
90
|
+
[MIT](./LICENSE) License © 2023-至今 [EverFu](https://github.com/efuo)
|
package/README_en-US.md
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
39
39
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
40
40
|
|
41
|
-
[Preview](https://
|
41
|
+
[Documentation & Preview](https://solitude.js.org/)
|
42
42
|
|
43
43
|
</div>
|
44
44
|
|
@@ -87,4 +87,4 @@ Check out the [Documentation](https://solitude.js.org/) for more information.
|
|
87
87
|
|
88
88
|
## License
|
89
89
|
|
90
|
-
[MIT](./LICENSE) License © 2023-PRESENT [
|
90
|
+
[MIT](./LICENSE) License © 2023-PRESENT [EverFu](https://github.com/efuo)
|
package/README_zh-Hant.md
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
39
39
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
40
40
|
|
41
|
-
[預覽](https://
|
41
|
+
[文档 & 預覽](https://solitude.js.org/)
|
42
42
|
|
43
43
|
</div>
|
44
44
|
|
@@ -27,7 +27,7 @@ include ../head/pwa.pug
|
|
27
27
|
|
28
28
|
script.
|
29
29
|
console.log(
|
30
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.10.
|
30
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.10.2",
|
31
31
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
32
32
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
33
33
|
"padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
|
@@ -32,7 +32,8 @@ if site.data.about.rewardList
|
|
32
32
|
- var rewards = theme.post.award.list
|
33
33
|
each reward in rewards
|
34
34
|
li.reward-item
|
35
|
-
|
35
|
+
a(href=url_for(reward.url))
|
36
|
+
img.post-qr-code-img(alt=reward.name, src=reward.qcode, style="border-color:" + reward.color)
|
36
37
|
.post-qr-code-desc= reward.name
|
37
38
|
.reward-list-tips
|
38
39
|
p= award.tips.replace('{sum}', sum.toFixed(2))
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "1.10.
|
4
|
-
"description": "A beautiful, powerful, and efficient Hexo theme developed by
|
3
|
+
"version": "1.10.2",
|
4
|
+
"description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
|
5
5
|
"main": "package.json",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"theme",
|
12
12
|
"solitude",
|
13
13
|
"Card UI Design",
|
14
|
-
"
|
14
|
+
"EverFu",
|
15
15
|
"hexo-theme-solitude"
|
16
16
|
],
|
17
17
|
"repository": {
|
package/scripts/tags/button.js
CHANGED
@@ -14,7 +14,7 @@ function btn(args) {
|
|
14
14
|
icon = icon.trim();
|
15
15
|
option = option.trim();
|
16
16
|
|
17
|
-
return `<button class="btn-sco ${option}" onclick="
|
17
|
+
return `<button class="btn-sco ${option}" onclick="${url.startsWith("http") ? `window.open('${url}')` : `pjax.loadUrl('${urlFor(url)}')`}"
|
18
18
|
title="${text}">${icon.length ? `<i class="solitude ${icon}"></i>` : ""}${text.length ? `<span>${text}</span>` : ""}</button>`;
|
19
19
|
}
|
20
20
|
|
package/scripts/tags/link.js
CHANGED
@@ -7,6 +7,7 @@ function link(args) {
|
|
7
7
|
let link = args[2];
|
8
8
|
let imgUrl = args[3] || "";
|
9
9
|
let favicon = themeConfig.site.siteIcon;
|
10
|
+
let insideStation = false;
|
10
11
|
|
11
12
|
link = link.trim();
|
12
13
|
imgUrl = imgUrl.trim();
|
@@ -14,12 +15,12 @@ function link(args) {
|
|
14
15
|
|
15
16
|
try {
|
16
17
|
new URL(link);
|
17
|
-
|
18
|
+
insideStation = false;
|
18
19
|
} catch (err) {
|
19
|
-
|
20
|
+
insideStation = true;
|
20
21
|
}
|
21
22
|
|
22
|
-
if ((imgUrl
|
23
|
+
if ((imgUrl === "") && (insideStation === false)) {
|
23
24
|
let domain = new URL(link).hostname
|
24
25
|
if (domain) {
|
25
26
|
imgUrl_online = "https://api.iowen.cn/favicon/" + domain + ".png";
|
@@ -27,10 +28,10 @@ function link(args) {
|
|
27
28
|
}
|
28
29
|
|
29
30
|
return `<a class="tag-link" target="_blank" href="${urlFor(link)}">
|
30
|
-
<div class="tag-link-tips">${
|
31
|
+
<div class="tag-link-tips">${insideStation ? "站内链接" : "引用站外链接"
|
31
32
|
}</div>
|
32
33
|
<div class="tag-link-bottom">
|
33
|
-
<div class="tag-link-left" style="${
|
34
|
+
<div class="tag-link-left" style="${insideStation
|
34
35
|
? `background-image: url(${imgUrl ? imgUrl : favicon})`
|
35
36
|
: `background-image: url(${imgUrl ? imgUrl : imgUrl_online})`
|
36
37
|
}">
|
@@ -108,6 +108,14 @@
|
|
108
108
|
padding 30px 10px 60px
|
109
109
|
border-radius 12px 12px 0 0
|
110
110
|
|
111
|
+
&::before
|
112
|
+
position absolute
|
113
|
+
bottom -10px
|
114
|
+
left 0
|
115
|
+
width 100%
|
116
|
+
height 20px
|
117
|
+
content ""
|
118
|
+
|
111
119
|
.reward-title
|
112
120
|
font-weight 700
|
113
121
|
color var(--efu-red)
|
package/source/js/main.js
CHANGED
@@ -474,12 +474,16 @@ let sco = {
|
|
474
474
|
* @description 监听页码输入
|
475
475
|
*/
|
476
476
|
listenToPageInputPress: function () {
|
477
|
+
const toGroup = document.querySelector(".toPageGroup")
|
477
478
|
const pageText = document.getElementById("toPageText");
|
478
479
|
if (!pageText) return;
|
479
480
|
const pageButton = document.getElementById("toPageButton");
|
480
481
|
const pageNumbers = document.querySelectorAll(".page-number");
|
481
482
|
const lastPageNumber = +pageNumbers[pageNumbers.length - 1].textContent;
|
482
|
-
if (!pageText || lastPageNumber === 1)
|
483
|
+
if (!pageText || lastPageNumber === 1) {
|
484
|
+
toGroup.style.display = "none";
|
485
|
+
return
|
486
|
+
}
|
483
487
|
pageText.addEventListener("keydown", (event) => {
|
484
488
|
if (event.keyCode === 13) {
|
485
489
|
sco.toPage();
|
@@ -500,8 +504,6 @@ let sco = {
|
|
500
504
|
addNavBackgroundInit: function () {
|
501
505
|
const scrollTop = document.documentElement.scrollTop;
|
502
506
|
(scrollTop !== 0) && document.getElementById("page-header").classList.add("nav-fixed", "nav-visible");
|
503
|
-
const cookiesWindow = document.getElementById("cookies-window");
|
504
|
-
cookiesWindow && (cookiesWindow.style.display = 'none')
|
505
507
|
},
|
506
508
|
/**
|
507
509
|
* initAdjust
|
@@ -797,7 +799,7 @@ class tabs {
|
|
797
799
|
window.refreshFn = () => {
|
798
800
|
const {is_home, is_page, page, is_post} = PAGE_CONFIG;
|
799
801
|
const {runtime, lazyload, lightbox, randomlink, covercolor, post_ai} = GLOBAL_CONFIG;
|
800
|
-
const timeSelector = is_home
|
802
|
+
const timeSelector = is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime'
|
801
803
|
document.body.setAttribute('data-type', page);
|
802
804
|
sco.changeTimeFormat(document.querySelectorAll(timeSelector));
|
803
805
|
runtime && sco.addRuntime();
|