hexo-theme-solitude 1.13.4 → 2.0.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/README.md +26 -29
- package/README_zh-Hant.md +1 -1
- package/{README_en-US.md → README_zh_CN.md} +29 -26
- package/_config.yml +150 -597
- package/languages/default.yml +1 -0
- package/languages/en.yml +1 -0
- package/layout/404.pug +1 -1
- package/layout/includes/console.pug +7 -7
- package/layout/includes/footer.pug +6 -6
- package/layout/includes/head/config.pug +5 -5
- package/layout/includes/inject/body.pug +1 -0
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/mixins/articleSort.pug +3 -1
- package/layout/includes/mixins/pagination.pug +2 -2
- package/layout/includes/nav.pug +2 -1
- package/layout/includes/page/categories.pug +3 -2
- package/layout/includes/page/says.pug +5 -5
- package/layout/includes/page/tags.pug +3 -2
- package/layout/includes/rightmenu.pug +19 -20
- package/layout/includes/sidebar.pug +1 -1
- package/layout/includes/widgets/aside/asideInfoCard.pug +1 -1
- package/layout/includes/widgets/aside/asideNewestPost.pug +1 -1
- package/layout/includes/widgets/aside/asideNewstComments.pug +2 -2
- package/layout/includes/widgets/aside/asideToc.pug +1 -1
- package/layout/includes/widgets/aside/asideWebInfo.pug +10 -10
- package/layout/includes/widgets/home/bbTimeList.pug +7 -9
- package/layout/includes/widgets/home/carousel.pug +3 -1
- package/layout/includes/widgets/home/categoryBar.pug +1 -1
- package/layout/includes/widgets/home/hot/artalk.pug +1 -1
- package/layout/includes/widgets/home/hot/twikoo.pug +1 -1
- package/layout/includes/widgets/home/postList.pug +4 -2
- package/layout/includes/widgets/home/topGroup.pug +1 -1
- package/layout/includes/widgets/nav/right.pug +9 -5
- package/layout/includes/widgets/page/about/award.pug +1 -1
- package/layout/includes/widgets/page/about/hobbies.pug +1 -1
- package/layout/includes/widgets/page/about/other.pug +1 -1
- package/layout/includes/widgets/page/banner.pug +1 -1
- package/layout/includes/widgets/page/equipment/content.pug +1 -1
- package/layout/includes/widgets/page/links/banner.pug +2 -2
- package/layout/includes/widgets/page/recentcomment/artalk.pug +1 -1
- package/layout/includes/widgets/page/recentcomment/twikoo.pug +1 -1
- package/layout/includes/widgets/page/recentcomment/valine.pug +1 -1
- package/layout/includes/widgets/page/recentcomment/waline.pug +1 -1
- package/layout/includes/widgets/post/award.pug +1 -1
- package/layout/includes/widgets/post/copyright.pug +10 -10
- package/layout/includes/widgets/post/post-ai.pug +1 -1
- package/layout/includes/widgets/post/postInfo.pug +20 -18
- package/layout/includes/widgets/third-party/comments/comment.pug +4 -4
- package/layout/includes/widgets/third-party/search/algolia-search.pug +1 -4
- package/layout/includes/widgets/third-party/search/local-search.pug +1 -1
- package/layout/includes/widgets/third-party/tianli-talk.pug +1 -1
- package/layout/post.pug +3 -2
- package/layout/tag.pug +3 -2
- package/package.json +1 -1
- package/plugins.yml +6 -6
- package/scripts/helper/related_post.js +1 -1
- package/scripts/helper/stylus.js +1 -0
- package/source/css/_global/index.styl +13 -13
- package/source/css/_highlight/index.styl +2 -2
- package/source/css/_highlight/theme/default.styl +1 -1
- package/source/css/_highlight/theme/mac.styl +1 -1
- package/source/css/_layout/console.styl +2 -1
- package/source/css/_layout/footer.styl +1 -1
- package/source/css/_layout/header.styl +66 -21
- package/source/css/_page/_home/category-bar.styl +4 -4
- package/source/css/_page/_home/home-top.styl +2 -0
- package/source/css/_page/_home/hot-tip.styl +2 -1
- package/source/css/_post/copyright.styl +104 -105
- package/source/css/_search/algolia-search.styl +0 -6
- package/source/js/covercolor/local.js +10 -4
- package/source/js/main.js +5 -5
- package/source/js/tw_cn.js +0 -3
@@ -85,130 +85,129 @@
|
|
85
85
|
color var(--efu-white)
|
86
86
|
cursor pointer
|
87
87
|
border-radius 4px
|
88
|
+
.social-share
|
89
|
+
display flex
|
90
|
+
justify-content center
|
91
|
+
height 40px
|
92
|
+
margin .5rem auto
|
93
|
+
gap .5rem
|
94
|
+
flex-wrap wrap
|
95
|
+
|
96
|
+
.social-share-ico
|
97
|
+
display flex
|
98
|
+
justify-content center
|
99
|
+
align-items center
|
100
|
+
width 40px
|
101
|
+
height 40px
|
102
|
+
border-radius 12px
|
103
|
+
border var(--style-border)
|
104
|
+
cursor pointer
|
105
|
+
transition .3s
|
88
106
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
height 40px
|
93
|
-
margin .5rem auto
|
94
|
-
gap .5rem
|
95
|
-
flex-wrap wrap
|
96
|
-
|
97
|
-
.social-share-ico
|
98
|
-
display flex
|
99
|
-
justify-content center
|
100
|
-
align-items center
|
101
|
-
width 40px
|
102
|
-
height 40px
|
103
|
-
border-radius 12px
|
104
|
-
border var(--style-border)
|
105
|
-
cursor pointer
|
106
|
-
transition .3s
|
107
|
+
+maxWidth768()
|
108
|
+
&:nth-child(n+6)
|
109
|
+
display none
|
107
110
|
|
108
|
-
|
109
|
-
|
110
|
-
display none
|
111
|
+
&:hover
|
112
|
+
color white
|
111
113
|
|
112
|
-
|
113
|
-
|
114
|
+
.icon-qq
|
115
|
+
color #56b6e7
|
116
|
+
border-color #56b6e7
|
117
|
+
&:hover
|
118
|
+
background-color #56b6e7
|
114
119
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
&:hover
|
119
|
-
background-color #56b6e7
|
120
|
+
.icon-weibo
|
121
|
+
color #d44040
|
122
|
+
border-color #d44040
|
120
123
|
|
121
|
-
|
122
|
-
|
123
|
-
border-color #d44040
|
124
|
+
&:hover
|
125
|
+
background-color #d44040
|
124
126
|
|
125
|
-
|
126
|
-
|
127
|
+
.icon-facebook
|
128
|
+
color #415dc9
|
129
|
+
border-color #415dc9
|
127
130
|
|
128
|
-
|
129
|
-
|
130
|
-
border-color #415dc9
|
131
|
+
&:hover
|
132
|
+
background-color #415dc9
|
131
133
|
|
132
|
-
|
133
|
-
|
134
|
+
.icon-twitter
|
135
|
+
color #56b6e7
|
136
|
+
border-color #56b6e7
|
134
137
|
|
135
|
-
|
136
|
-
|
137
|
-
border-color #56b6e7
|
138
|
+
&:hover
|
139
|
+
background-color #56b6e7
|
138
140
|
|
139
|
-
|
140
|
-
|
141
|
+
.icon-telegram
|
142
|
+
color #56b6e7
|
143
|
+
border-color #56b6e7
|
141
144
|
|
142
|
-
|
143
|
-
|
144
|
-
border-color #56b6e7
|
145
|
+
&:hover
|
146
|
+
background-color #56b6e7
|
145
147
|
|
146
|
-
|
147
|
-
|
148
|
+
.icon-linkedin
|
149
|
+
color #0077b5
|
150
|
+
border-color #0077b5
|
148
151
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
+
&:hover
|
153
|
+
background-color #0077b5
|
154
|
+
.icon-whatsapp
|
155
|
+
color #25d366
|
156
|
+
border-color #25d366
|
152
157
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
+
&:hover
|
159
|
+
background-color #25d366
|
160
|
+
.icon-link
|
161
|
+
color #425AEF
|
162
|
+
border-color #425AEF
|
158
163
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
+
&:hover
|
165
|
+
background-color #425AEF
|
166
|
+
.icon-qrcode
|
167
|
+
position relative
|
168
|
+
color #000
|
169
|
+
border-color #000
|
164
170
|
|
165
|
-
|
166
|
-
|
167
|
-
.icon-qrcode
|
168
|
-
position relative
|
169
|
-
color #000
|
170
|
-
border-color #000
|
171
|
+
+maxWidth900()
|
172
|
+
display none
|
171
173
|
|
172
|
-
|
173
|
-
|
174
|
+
&:hover
|
175
|
+
background-color #000
|
174
176
|
|
175
|
-
|
176
|
-
|
177
|
+
.share-main
|
178
|
+
display flex
|
177
179
|
|
178
|
-
|
179
|
-
|
180
|
+
.share-main
|
181
|
+
display none
|
182
|
+
position absolute
|
183
|
+
bottom 1.7rem
|
184
|
+
z-index 100
|
185
|
+
padding-bottom 15px
|
180
186
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
&-all
|
189
|
-
padding 12px
|
190
|
-
border-radius 12px
|
191
|
-
background var(--efu-background)
|
192
|
-
animation donate_effcet 0.3s 0.1s ease both
|
193
|
-
flex-direction column
|
194
|
-
border var(--style-border-always)
|
195
|
-
|
196
|
-
.reward-dec
|
197
|
-
font-size 0.6rem
|
198
|
-
color var(--efu-fontcolor)!important
|
199
|
-
text-align center
|
200
|
-
|
201
|
-
#qrcode
|
202
|
-
width 150px
|
203
|
-
height 150px
|
204
|
-
min-width 150px
|
205
|
-
min-height 150px
|
206
|
-
background var(--efu-white)
|
207
|
-
padding 8px
|
208
|
-
border-radius 8px
|
209
|
-
margin-bottom 8px
|
187
|
+
&-all
|
188
|
+
padding 12px
|
189
|
+
border-radius 12px
|
190
|
+
background var(--efu-background)
|
191
|
+
animation donate_effcet 0.3s 0.1s ease both
|
192
|
+
flex-direction column
|
210
193
|
border var(--style-border-always)
|
211
194
|
|
212
|
-
|
213
|
-
|
214
|
-
|
195
|
+
.reward-dec
|
196
|
+
font-size 0.6rem
|
197
|
+
color var(--efu-fontcolor)!important
|
198
|
+
text-align center
|
199
|
+
|
200
|
+
#qrcode
|
201
|
+
width 150px
|
202
|
+
height 150px
|
203
|
+
min-width 150px
|
204
|
+
min-height 150px
|
205
|
+
background var(--efu-white)
|
206
|
+
padding 8px
|
207
|
+
border-radius 8px
|
208
|
+
margin-bottom 8px
|
209
|
+
border var(--style-border-always)
|
210
|
+
|
211
|
+
img
|
212
|
+
width 132px
|
213
|
+
height 132px
|
@@ -26,7 +26,7 @@ const calculateColor = img => {
|
|
26
26
|
const data = ctx.getImageData(0, 0, img.width, img.height).data;
|
27
27
|
const {r, g, b} = calculateRGB(data);
|
28
28
|
let value = rgbToHex(r, g, b);
|
29
|
-
return getContrastYIQ(value) === "light" ? LightenDarkenColor(value, -50) : value;
|
29
|
+
return getContrastYIQ(value) === "light" ? LightenDarkenColor(value, -50) : LightenDarkenColor(value, 20);
|
30
30
|
}
|
31
31
|
|
32
32
|
function calculateRGB(data) {
|
@@ -56,9 +56,9 @@ function LightenDarkenColor(col, amt) {
|
|
56
56
|
}
|
57
57
|
|
58
58
|
const num = parseInt(col, 16);
|
59
|
-
const r = Math.min(255, Math.max(0, (num >> 16) + amt));
|
60
|
-
const b = Math.min(255, Math.max(0, ((num >> 8) & 0xff) + amt));
|
61
|
-
const g = Math.min(255, Math.max(0, (num & 0xff) + amt));
|
59
|
+
const r = Math.min(255, Math.max(0, (num >> 16) + amt * 2));
|
60
|
+
const b = Math.min(255, Math.max(0, ((num >> 8) & 0xff) + amt * 2));
|
61
|
+
const g = Math.min(255, Math.max(0, (num & 0xff) + amt * 2));
|
62
62
|
|
63
63
|
return `${usePound ? "#" : ""}${(g | (b << 8) | (r << 16)).toString(16).padStart(6, "0")}`;
|
64
64
|
}
|
@@ -121,6 +121,12 @@ function setThemeColors(value, r = null, g = null, b = null) {
|
|
121
121
|
authorInfo[i].style.setProperty('background', 'var(--efu-white-op)');
|
122
122
|
authorInfo[i].style.setProperty('color', 'var(--efu-white)');
|
123
123
|
}
|
124
|
+
|
125
|
+
value = LightenDarkenColor(value, 50);
|
126
|
+
document.documentElement.style.setProperty('--efu-main', value);
|
127
|
+
document.documentElement.style.setProperty('--efu-main-op', value + '23');
|
128
|
+
document.documentElement.style.setProperty('--efu-main-op-deep', value + 'dd');
|
129
|
+
document.documentElement.style.setProperty('--efu-main-none', value + '00');
|
124
130
|
}
|
125
131
|
}
|
126
132
|
|
package/source/js/main.js
CHANGED
@@ -198,7 +198,7 @@ const sco = {
|
|
198
198
|
},
|
199
199
|
initConsoleState() {
|
200
200
|
const consoleHideAside = document.querySelector("#consoleHideAside");
|
201
|
-
consoleHideAside.classList.toggle("on",
|
201
|
+
consoleHideAside.classList.toggle("on", document.documentElement.classList.contains("hide-aside"));
|
202
202
|
},
|
203
203
|
changeSayHelloText() {
|
204
204
|
const greetings = GLOBAL_CONFIG.aside.sayhello2;
|
@@ -464,9 +464,9 @@ const addHighlight = () => {
|
|
464
464
|
const expandClass = !expand === true ? 'closed' : ''
|
465
465
|
const $syntaxHighlight = syntax === 'highlight.js' ? document.querySelectorAll('figure.highlight') : document.querySelectorAll('pre[class*="language-"]')
|
466
466
|
if (!(($isShowTool || limit) && $syntaxHighlight.length)) return
|
467
|
-
const copyEle = copy ? `<i class="solitude
|
468
|
-
const expandEle = `<i class="solitude
|
469
|
-
const limitEle = limit ? `<i class="solitude
|
467
|
+
const copyEle = copy ? `<i class="solitude far fa-copy copy-button"></i>` : '<i></i>';
|
468
|
+
const expandEle = `<i class="solitude fas fa-angle-down expand"></i>`;
|
469
|
+
const limitEle = limit ? `<i class="solitude fas fa-angles-down"></i>` : '<i></i>';
|
470
470
|
const alertInfo = (ele, text) => utils.snackbarShow(text, false, 2000)
|
471
471
|
const copyFn = (e) => {
|
472
472
|
const $buttonParent = e.parentNode
|
@@ -694,7 +694,7 @@ window.refreshFn = () => {
|
|
694
694
|
if (lure) tabs.lureAddListener();
|
695
695
|
}
|
696
696
|
document.addEventListener('DOMContentLoaded', () => {
|
697
|
-
[addCopyright,
|
697
|
+
[addCopyright, window.refreshFn, asideStatus, () => window.onscroll = percent, sco.initConsoleState].forEach(fn => fn());
|
698
698
|
});
|
699
699
|
document.addEventListener('visibilitychange', () => {
|
700
700
|
if (document.hidden) {
|
package/source/js/tw_cn.js
CHANGED
@@ -59,13 +59,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
59
59
|
currentEncoding = 1
|
60
60
|
targetEncoding = 2
|
61
61
|
translateButtonObject.lastChild.textContent = msgToTraditionalChinese
|
62
|
-
translateButtonObject.firstChild.className = 'solitude st-panben-line'
|
63
62
|
utils.snackbarShow('你已切换为简体')
|
64
63
|
} else if (targetEncoding === 2) {
|
65
64
|
currentEncoding = 2
|
66
65
|
targetEncoding = 1
|
67
66
|
translateButtonObject.lastChild.textContent = msgToSimplifiedChinese
|
68
|
-
translateButtonObject.firstChild.className = 'solitude st-jianben-line'
|
69
67
|
utils.snackbarShow('你已切換為繁體')
|
70
68
|
}
|
71
69
|
utils.saveToLocal.set(targetEncodingCookie, targetEncoding, 2)
|
@@ -111,7 +109,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
111
109
|
if (translateButtonObject) {
|
112
110
|
if (currentEncoding !== targetEncoding) {
|
113
111
|
translateButtonObject.lastChild.textContent = targetEncoding === 1 ? msgToSimplifiedChinese : msgToTraditionalChinese
|
114
|
-
translateButtonObject.firstChild.className = targetEncoding === 1 ? 'solitude st-jianben-line' : 'solitude st-panben-line'
|
115
112
|
setLang()
|
116
113
|
setTimeout(translateBody, translateDelay)
|
117
114
|
}
|