hexo-theme-solitude 1.7.1 → 1.7.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.
Files changed (35) hide show
  1. package/.github/FUNDING.yml +2 -2
  2. package/_config.yml +12 -15
  3. package/languages/en.yml +1 -5
  4. package/languages/zh-CN.yml +1 -4
  5. package/languages/zh-TW.yml +1 -4
  6. package/layout/includes/head/config.pug +40 -34
  7. package/layout/includes/inject/head.pug +1 -1
  8. package/layout/includes/page/says.pug +2 -2
  9. package/layout/includes/widgets/aside/asideTag.pug +9 -4
  10. package/layout/includes/widgets/home/banner.pug +1 -1
  11. package/layout/post.pug +2 -1
  12. package/package.json +3 -3
  13. package/scripts/event/merge_config.js +1 -1
  14. package/scripts/event/welcome.js +7 -9
  15. package/scripts/helper/related_post.js +5 -0
  16. package/scripts/helper/stylus.js +7 -39
  17. package/source/css/_layout/article-container.styl +197 -0
  18. package/source/css/_layout/aside.styl +483 -486
  19. package/source/css/_page/_about/{index.styl → about.styl} +12 -12
  20. package/source/css/_page/_home/home-top.styl +1 -6
  21. package/source/css/_page/_home/{index.styl → home.styl} +0 -3
  22. package/source/css/_page/_home/recent-post.styl +1 -0
  23. package/source/css/_page/category.styl +0 -2
  24. package/source/css/_page/error.styl +1 -1
  25. package/source/css/_page/google.styl +17 -17
  26. package/source/css/_page/index.styl +48 -15
  27. package/source/css/_page/moment.styl +73 -74
  28. package/source/css/_page/{share.styl → other.styl} +1 -3
  29. package/source/css/_post/content.styl +0 -197
  30. package/source/css/_post/index.styl +0 -3
  31. package/source/img/404.webp +0 -0
  32. package/source/img/pwa/favicon_512.ico +0 -0
  33. package/source/js/search/algolia.js +0 -10
  34. package/source/js/search/local.js +3 -14
  35. package/source/css/_page/home.styl +0 -34
@@ -32,16 +32,6 @@ window.addEventListener("load", () => {
32
32
 
33
33
  const searchClickFn = () => {
34
34
  utils.addEventListenerPjax(document.querySelector("#search-button > .search"), "click", openSearch);
35
-
36
- GLOBAL_CONFIG.rightside.enable && document.getElementById("menu-search").addEventListener("click", function (){
37
- rm.hideRightMenu();
38
- openSearch();
39
- let t=document.getElementsByClassName('ais-SearchBox-input')[0];
40
- let evt = document.createEvent('HTMLEvents');
41
- evt.initEvent('input', true,true)
42
- t.value = selectTextNow
43
- t.dispatchEvent(evt)
44
- })
45
35
  };
46
36
 
47
37
  const searchFnOnce = () => {
@@ -37,22 +37,12 @@ window.onload = () => {
37
37
 
38
38
  const searchClickFn = () =>{
39
39
  utils.addEventListenerPjax(document.querySelector("#search-button > .search"), "click", openSearch);
40
-
41
- GLOBAL_CONFIG.rightside.enable && document.getElementById("menu-search").addEventListener("click", function (){
42
- rm.hideRightMenu();
43
- openSearch();
44
- let t=document.getElementsByClassName('search-box-input')[0];
45
- let evt = document.createEvent('HTMLEvents');
46
- evt.initEvent('input', true,true)
47
- t.value = selectTextNow
48
- t.dispatchEvent(evt)
49
- })
50
40
  }
51
41
 
52
42
  searchClickFn();
53
43
 
54
44
  function initLunr() {
55
- fetch("/search.xml")
45
+ fetch(GLOBAL_CONFIG.localsearch.path)
56
46
  .then(response => response.text())
57
47
  .then(data => {
58
48
  let parser = new DOMParser();
@@ -138,14 +128,13 @@ window.onload = () => {
138
128
  const $link = document.createElement("a");
139
129
  $link.className = "search-result-title";
140
130
  $link.href = result.link;
141
- const title = highlightSearchKeyword(result.title, query);
142
- $link.innerHTML = title;
131
+ $link.innerHTML = highlightSearchKeyword(result.title, query);
143
132
  $result.appendChild($link);
144
133
  $search_results.appendChild($result);
145
134
  });
146
135
  const count = document.createElement("span");
147
136
  count.className = "search-result-count";
148
- count.innerHTML = `共 <b>${results.length}</b> 条结果`;
137
+ count.innerHTML = GLOBAL_CONFIG.lang.search.count.replace(/\$\{count}/, results.length)
149
138
  $tips.appendChild(count);
150
139
  }
151
140
 
@@ -1,34 +0,0 @@
1
- #page h1.page-title
2
- display inline
3
- margin .4rem 0 1rem
4
-
5
- #page
6
- background 0 0
7
- border none
8
- padding 0
9
- box-shadow none
10
- min-height calc(100vh - 464px)
11
-
12
- +maxWidth768()
13
- padding 0 1rem
14
-
15
- > div:not(.author-content-item)
16
- animation slide-in .6s .2s backwards
17
-
18
- +minWidth768()
19
- > div:nth-child(1) > a::before
20
- height: 24px
21
- width: 44px
22
- content: ""
23
- background-size: 38px 24px
24
- position: absolute
25
- top: 0
26
- left: 0
27
-
28
- > a:nth-child(0) > i
29
- padding-right: 8px
30
-
31
- +minWidth768()
32
- .needEndHide.hide
33
- bottom -200px !important
34
- opacity 0