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.
- package/.github/FUNDING.yml +2 -2
- package/_config.yml +12 -15
- package/languages/en.yml +1 -5
- package/languages/zh-CN.yml +1 -4
- package/languages/zh-TW.yml +1 -4
- package/layout/includes/head/config.pug +40 -34
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/page/says.pug +2 -2
- package/layout/includes/widgets/aside/asideTag.pug +9 -4
- package/layout/includes/widgets/home/banner.pug +1 -1
- package/layout/post.pug +2 -1
- package/package.json +3 -3
- package/scripts/event/merge_config.js +1 -1
- package/scripts/event/welcome.js +7 -9
- package/scripts/helper/related_post.js +5 -0
- package/scripts/helper/stylus.js +7 -39
- package/source/css/_layout/article-container.styl +197 -0
- package/source/css/_layout/aside.styl +483 -486
- package/source/css/_page/_about/{index.styl → about.styl} +12 -12
- package/source/css/_page/_home/home-top.styl +1 -6
- package/source/css/_page/_home/{index.styl → home.styl} +0 -3
- package/source/css/_page/_home/recent-post.styl +1 -0
- package/source/css/_page/category.styl +0 -2
- package/source/css/_page/error.styl +1 -1
- package/source/css/_page/google.styl +17 -17
- package/source/css/_page/index.styl +48 -15
- package/source/css/_page/moment.styl +73 -74
- package/source/css/_page/{share.styl → other.styl} +1 -3
- package/source/css/_post/content.styl +0 -197
- package/source/css/_post/index.styl +0 -3
- package/source/img/404.webp +0 -0
- package/source/img/pwa/favicon_512.ico +0 -0
- package/source/js/search/algolia.js +0 -10
- package/source/js/search/local.js +3 -14
- 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(
|
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
|
-
|
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 =
|
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
|