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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Efu
3
+ Copyright (c) 2024 EverFu
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -38,7 +38,7 @@
38
38
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
39
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
40
40
 
41
- [预览](https://www.efu.me/) 丨 [文档](https://solitude.js.org/)
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 &copy; 2023-至今 [Efu](https://github.com/efuo)
90
+ [MIT](./LICENSE) License &copy; 2023-至今 [EverFu](https://github.com/efuo)
package/README_en-US.md CHANGED
@@ -38,7 +38,7 @@
38
38
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
39
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
40
40
 
41
- [Preview](https://efu.me/) 丨 [Documentation](https://solitude.js.org/)
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 &copy; 2023-PRESENT [Efu](https://github.com/efuo)
90
+ [MIT](./LICENSE) License &copy; 2023-PRESENT [EverFu](https://github.com/efuo)
package/README_zh-Hant.md CHANGED
@@ -38,7 +38,7 @@
38
38
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
39
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
40
40
 
41
- [預覽](https://efu.me/) 丨 [文档](https://solitude.js.org/)
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.1",
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
- img.post-qr-code-img(alt=reward.name, src=reward.qcode, style="border-color:" + reward.color)
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.1",
4
- "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
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
- "Efu",
14
+ "EverFu",
15
15
  "hexo-theme-solitude"
16
16
  ],
17
17
  "repository": {
@@ -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="location.href = '${urlFor(url)}'"
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
 
@@ -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
- InsideStation = false;
18
+ insideStation = false;
18
19
  } catch (err) {
19
- InsideStation = true;
20
+ insideStation = true;
20
21
  }
21
22
 
22
- if ((imgUrl == "") && (InsideStation == false)) {
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">${InsideStation ? "站内链接" : "引用站外链接"
31
+ <div class="tag-link-tips">${insideStation ? "站内链接" : "引用站外链接"
31
32
  }</div>
32
33
  <div class="tag-link-bottom">
33
- <div class="tag-link-left" style="${InsideStation
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
  }">
@@ -154,6 +154,7 @@ div#post-comment
154
154
  border var(--style-border-always)
155
155
  border-radius 10px
156
156
  z-index 9999
157
+ width 142px
157
158
  display none
158
159
  transform translate(0, -105%)
159
160
  overflow hidden
@@ -36,6 +36,9 @@
36
36
  overflow-y: auto;
37
37
  padding: 10px;
38
38
 
39
+ +maxWidth768()
40
+ max-width 300px
41
+
39
42
  .vwrap
40
43
  flex 1
41
44
  display flex
@@ -1,6 +1,7 @@
1
1
  #about-page
2
2
  .author-content-item
3
3
  &.single.reward
4
+ overflow unset
4
5
  .author-content-item
5
6
  .author-content-item-title
6
7
  color var(--efu-red)
@@ -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) return;
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 || is_page ? '#recent-posts time, .webinfo-item time' : '#post-meta time';
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();