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 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
 
package/_config.yml CHANGED
@@ -906,8 +906,8 @@ CDN:
906
906
  version: true
907
907
 
908
908
  # Custom format
909
- # For example: https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}
910
- custom_format: https://cdn.staticfile.net/${cdnjs_name}/${version}/${min_cdnjs_file}
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.1",
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",
@@ -1,5 +1,5 @@
1
1
  .aside-content#aside-content
2
- - var noSticky, Sticky, customNoSticky, customSticky;
2
+ - var noSticky, Sticky
3
3
  if(is_home())
4
4
  - noSticky = theme.aside.home.noSticky.split(',')
5
5
  - Sticky = theme.aside.home.Sticky.split(',')
@@ -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.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
- "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
@@ -534,6 +534,7 @@ if hexo-config('aside.card.style') == 1
534
534
  color var(--efu-fontcolor)
535
535
 
536
536
  &:hover
537
+ transform rotate(360deg)
537
538
  color var(--efu-theme)
538
539
 
539
540
  .card-info__desc_group
@@ -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)
@@ -112,6 +112,9 @@
112
112
  border-radius: 0;
113
113
  margin 0
114
114
 
115
+ / #page &
116
+ border-radius 8px
117
+
115
118
  .waterfall
116
119
  opacity 0
117
120
  transition .3s
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
- waterfall(entry.target) || entry.target.classList.add('show');
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) return;
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 || is_page ? '#recent-posts time, .webinfo-item time' : '#post-meta time';
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();