hexo-theme-solitude 1.10.1 → 1.10.3
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/_config.yml +2 -2
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/widgets/aside/aside.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/_layout/aside.styl +1 -0
- package/source/css/_page/_about/reward.styl +1 -0
- package/source/css/_post/tools.styl +8 -0
- package/source/css/_tags/gallery.styl +3 -0
- package/source/js/main.js +10 -6
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
|
|
package/_config.yml
CHANGED
@@ -906,8 +906,8 @@ CDN:
|
|
906
906
|
version: true
|
907
907
|
|
908
908
|
# Custom format
|
909
|
-
# For example:
|
910
|
-
custom_format:
|
909
|
+
# For example: //open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}
|
910
|
+
custom_format: //open.lightxi.com/cdnjs/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}
|
911
911
|
|
912
912
|
option:
|
913
913
|
solitude_css: https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css
|
@@ -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.3",
|
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.3",
|
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
@@ -313,7 +313,9 @@ let sco = {
|
|
313
313
|
const observer = new IntersectionObserver((entries) => {
|
314
314
|
entries.forEach(entry => {
|
315
315
|
if (entry.isIntersecting) {
|
316
|
-
|
316
|
+
setTimeout(() => {
|
317
|
+
waterfall(entry.target) || entry.target.classList.add('show');
|
318
|
+
}, 300);
|
317
319
|
}
|
318
320
|
});
|
319
321
|
});
|
@@ -368,7 +370,7 @@ let sco = {
|
|
368
370
|
* @description 添加图片标题
|
369
371
|
*/
|
370
372
|
addPhotoFigcaption: function () {
|
371
|
-
document.querySelectorAll('#article-container img').forEach(image => {
|
373
|
+
document.querySelectorAll('#article-container img:not(.gallery-item img)').forEach(image => {
|
372
374
|
const captionText = image.getAttribute('alt');
|
373
375
|
captionText && image.insertAdjacentHTML('afterend', `<div class="img-alt is-center">${captionText}</div>`);
|
374
376
|
});
|
@@ -474,12 +476,16 @@ let sco = {
|
|
474
476
|
* @description 监听页码输入
|
475
477
|
*/
|
476
478
|
listenToPageInputPress: function () {
|
479
|
+
const toGroup = document.querySelector(".toPageGroup")
|
477
480
|
const pageText = document.getElementById("toPageText");
|
478
481
|
if (!pageText) return;
|
479
482
|
const pageButton = document.getElementById("toPageButton");
|
480
483
|
const pageNumbers = document.querySelectorAll(".page-number");
|
481
484
|
const lastPageNumber = +pageNumbers[pageNumbers.length - 1].textContent;
|
482
|
-
if (!pageText || lastPageNumber === 1)
|
485
|
+
if (!pageText || lastPageNumber === 1) {
|
486
|
+
toGroup.style.display = "none";
|
487
|
+
return
|
488
|
+
}
|
483
489
|
pageText.addEventListener("keydown", (event) => {
|
484
490
|
if (event.keyCode === 13) {
|
485
491
|
sco.toPage();
|
@@ -500,8 +506,6 @@ let sco = {
|
|
500
506
|
addNavBackgroundInit: function () {
|
501
507
|
const scrollTop = document.documentElement.scrollTop;
|
502
508
|
(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
509
|
},
|
506
510
|
/**
|
507
511
|
* initAdjust
|
@@ -797,7 +801,7 @@ class tabs {
|
|
797
801
|
window.refreshFn = () => {
|
798
802
|
const {is_home, is_page, page, is_post} = PAGE_CONFIG;
|
799
803
|
const {runtime, lazyload, lightbox, randomlink, covercolor, post_ai} = GLOBAL_CONFIG;
|
800
|
-
const timeSelector = is_home
|
804
|
+
const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime') + ', .webinfo-item time';
|
801
805
|
document.body.setAttribute('data-type', page);
|
802
806
|
sco.changeTimeFormat(document.querySelectorAll(timeSelector));
|
803
807
|
runtime && sco.addRuntime();
|