hexo-theme-shokax 0.0.4-alpha → 0.0.4-alpha3
Sign up to get free protection for your applications and to get access to all the features.
- package/layout/_partials/footer.pug +1 -1
- package/layout/_partials/sidebar/menu.pug +2 -2
- package/layout/_partials/sidebar/overview.pug +1 -1
- package/package.json +1 -1
- package/source/css/_common/components/highlight/highlight.styl +2 -2
- package/source/css/_common/components/pages/home.styl +2 -2
- package/source/css/_common/components/post/breadcrumb.styl +1 -1
- package/source/css/_common/components/post/post.styl +1 -1
- package/source/css/_common/components/tags/links.styl +1 -1
- package/source/css/_common/components/third-party/valine.styl +2 -3
- package/source/css/_common/outline/header/menu.styl +1 -1
- package/source/css/_common/outline/sidebar/menu.styl +1 -1
- package/source/css/_common/scaffolding/base.styl +9 -30
- package/source/css/_common/scaffolding/buttons.styl +1 -1
- package/source/css/app.styl +4 -4
- package/source/js/_app/global.js +5 -5
- package/source/js/_app/library.js +0 -12
- package/source/js/_app/page.js +18 -16
- package/source/js/_app/vue.js +1 -1
@@ -5,7 +5,7 @@ div(class="status")
|
|
5
5
|
span(itemprop="copyrightYear")
|
6
6
|
!= copyright_year
|
7
7
|
span(class="with-love")
|
8
|
-
i(class=`
|
8
|
+
i(class=`fa fa-solid fa-${ theme.footer.icon.name }`)
|
9
9
|
span(class="author" itemprop="copyrightHolder")
|
10
10
|
!= `${author} @ ${ alternate?alternate:title}`
|
11
11
|
if theme.footer.count
|
@@ -3,7 +3,7 @@ mixin item(name, path, parent, dropdown, sublist)
|
|
3
3
|
- var path = path.split('||')
|
4
4
|
- var itemURL = path[0].trim()
|
5
5
|
- if (!itemURL.startsWith('http')){ itemURL = itemURL.replace('//', '/') }
|
6
|
-
- var menuIcon = '<i class="
|
6
|
+
- var menuIcon = '<i class="fa fa-solid fa-' + trimn(path[1]) + '"></i>'
|
7
7
|
- var menuText = __('menu.' + name).replace('menu.', '')
|
8
8
|
if parent
|
9
9
|
li(class="item dropdown")
|
@@ -21,7 +21,7 @@ mixin item(name, path, parent, dropdown, sublist)
|
|
21
21
|
- var menuText = __('menu.' + subname).replace('menu.', '')
|
22
22
|
if subname == 'default'
|
23
23
|
- var menuText = __('menu.' + name).replace('menu.', '')
|
24
|
-
- var menuIcon = '<i class="
|
24
|
+
- var menuIcon = '<i class="fa fa-solid fa-' + trimn(path[1]) + '"></i>'
|
25
25
|
li(class="item")
|
26
26
|
!= _url(itemURL, menuIcon + menuText, {rel: 'section'})
|
27
27
|
else
|
@@ -32,7 +32,7 @@ nav(class="state")
|
|
32
32
|
div(class="social")
|
33
33
|
each link, name in theme.social
|
34
34
|
- var sidebarURL = link.split('||')[0].trim()
|
35
|
-
- var sidebarIcon = '<i class="
|
35
|
+
- var sidebarIcon = '<i class="fa fa-brands fa-' + link.split('||')[1].trim() + '"></i>'
|
36
36
|
!= _url(sidebarURL, sidebarIcon, {title: sidebarURL, class: 'item ' + name})
|
37
37
|
|
38
38
|
!= shokax_inject('sidebar')
|
package/package.json
CHANGED
@@ -243,7 +243,7 @@ code,
|
|
243
243
|
background: var(--grey-2);
|
244
244
|
}
|
245
245
|
|
246
|
-
.
|
246
|
+
.fa {
|
247
247
|
margin-top: 1rem;
|
248
248
|
@extend .up-down;
|
249
249
|
}
|
@@ -256,7 +256,7 @@ code,
|
|
256
256
|
display: none;
|
257
257
|
}
|
258
258
|
|
259
|
-
.
|
259
|
+
.fa {
|
260
260
|
@extend .down-up;
|
261
261
|
}
|
262
262
|
}
|
@@ -186,12 +186,11 @@
|
|
186
186
|
margin: .5rem;
|
187
187
|
overflow: hidden;
|
188
188
|
vertical-align: middle;
|
189
|
-
|
190
|
-
&.actived .ic {
|
189
|
+
&.actived .fa {
|
191
190
|
color: var(--primary-color);
|
192
191
|
}
|
193
192
|
|
194
|
-
.
|
193
|
+
.fa {
|
195
194
|
color: var(--grey-6);
|
196
195
|
transition: all .25s ease;
|
197
196
|
|
@@ -129,15 +129,15 @@ dd {
|
|
129
129
|
input, textarea {
|
130
130
|
color: var(--text-color);
|
131
131
|
}
|
132
|
-
|
133
|
-
font-family: 'ic';
|
134
|
-
src: url('//at.alicdn.com/t/font_' + $iconfont + '.eot');
|
135
|
-
src: url('//at.alicdn.com/t/font_' + $iconfont + '.eot?#iefix') format('embedded-opentype'),
|
136
|
-
url('//at.alicdn.com/t/font_' + $iconfont + '.woff2') format('woff2'),
|
137
|
-
url('//at.alicdn.com/t/font_' + $iconfont + '.woff') format('woff'),
|
138
|
-
url('//at.alicdn.com/t/font_' + $iconfont + '.ttf') format('truetype'),
|
139
|
-
url('//at.alicdn.com/t/font_' + $iconfont + '.svg#ic') format('svg');
|
140
|
-
}
|
132
|
+
//@font-face {
|
133
|
+
// font-family: 'ic';
|
134
|
+
// src: url('//at.alicdn.com/t/font_' + $iconfont + '.eot');
|
135
|
+
// src: url('//at.alicdn.com/t/font_' + $iconfont + '.eot?#iefix') format('embedded-opentype'),
|
136
|
+
// url('//at.alicdn.com/t/font_' + $iconfont + '.woff2') format('woff2'),
|
137
|
+
// url('//at.alicdn.com/t/font_' + $iconfont + '.woff') format('woff'),
|
138
|
+
// url('//at.alicdn.com/t/font_' + $iconfont + '.ttf') format('truetype'),
|
139
|
+
// url('//at.alicdn.com/t/font_' + $iconfont + '.svg#ic') format('svg');
|
140
|
+
//}
|
141
141
|
|
142
142
|
@font-face {
|
143
143
|
font-family: 'jetbrains-mono';
|
@@ -146,19 +146,6 @@ input, textarea {
|
|
146
146
|
}
|
147
147
|
|
148
148
|
// TODO
|
149
|
-
.ic {
|
150
|
-
font-family: "ic" !important;
|
151
|
-
-webkit-font-smoothing: antialiased;
|
152
|
-
-moz-osx-font-smoothing: grayscale;
|
153
|
-
text-align: center;
|
154
|
-
width: 1.25em;
|
155
|
-
display: inline-block;
|
156
|
-
font-style: normal;
|
157
|
-
font-variant: normal;
|
158
|
-
text-rendering: auto;
|
159
|
-
line-height: 1;
|
160
|
-
}
|
161
|
-
|
162
149
|
.fa {
|
163
150
|
-webkit-font-smoothing: antialiased;
|
164
151
|
-moz-osx-font-smoothing: grayscale;
|
@@ -172,20 +159,12 @@ input, textarea {
|
|
172
159
|
}
|
173
160
|
|
174
161
|
// TODO
|
175
|
-
.ic em {
|
176
|
-
font-size: 0;
|
177
|
-
}
|
178
162
|
|
179
163
|
.fa em {
|
180
164
|
font-size: 0;
|
181
165
|
}
|
182
166
|
|
183
167
|
// TODO
|
184
|
-
.ic-lg {
|
185
|
-
font-size: 1.33333em;
|
186
|
-
line-height: .75em;
|
187
|
-
vertical-align: -.0667em;
|
188
|
-
}
|
189
168
|
|
190
169
|
.fa-lg {
|
191
170
|
font-size: 1.33333em;
|
package/source/css/app.styl
CHANGED
@@ -13,10 +13,10 @@ if $colors = hexo-config('style.colors')
|
|
13
13
|
else
|
14
14
|
@import "_colors";
|
15
15
|
|
16
|
-
if $_iconfont = hexo-config('style.iconfont')
|
17
|
-
@import $_iconfont;
|
18
|
-
else
|
19
|
-
@import "_iconfont";
|
16
|
+
//if $_iconfont = hexo-config('style.iconfont')
|
17
|
+
// @import $_iconfont;
|
18
|
+
//else
|
19
|
+
// @import "_iconfont";
|
20
20
|
|
21
21
|
// Scaffolding
|
22
22
|
@import "_common/scaffolding";
|
package/source/js/_app/global.js
CHANGED
@@ -25,16 +25,16 @@ let LOCAL_HASH = 0;
|
|
25
25
|
let LOCAL_URL = window.location.href;
|
26
26
|
let pjax;
|
27
27
|
const changeTheme = function (type) {
|
28
|
-
const btn = $dom('.theme .
|
28
|
+
const btn = $dom('.theme .fa');
|
29
29
|
if (type === 'dark') {
|
30
30
|
HTML.attr('data-theme', type);
|
31
|
-
btn.removeClass('
|
32
|
-
btn.addClass('
|
31
|
+
btn.removeClass('fa-sunrise');
|
32
|
+
btn.addClass('fa-moon-stars');
|
33
33
|
}
|
34
34
|
else {
|
35
35
|
HTML.attr('data-theme', null);
|
36
|
-
btn.removeClass('
|
37
|
-
btn.addClass('
|
36
|
+
btn.removeClass('fa-moon-stars');
|
37
|
+
btn.addClass('fa-sunrise');
|
38
38
|
}
|
39
39
|
};
|
40
40
|
const autoDarkmode = function () {
|
@@ -288,18 +288,6 @@ const pjaxScript = function (element) {
|
|
288
288
|
}
|
289
289
|
parent.appendChild(script);
|
290
290
|
};
|
291
|
-
const pageScrollOld = function (target, offset, complete) {
|
292
|
-
const opt = {
|
293
|
-
targets: typeof offset === 'number' ? target.parentNode : document.scrollingElement,
|
294
|
-
duration: 500,
|
295
|
-
easing: 'easeInOutQuad',
|
296
|
-
scrollTop: offset || (typeof target === 'number' ? target : (target ? target.top() + document.documentElement.scrollTop - siteNavHeight : 0)),
|
297
|
-
complete: function () {
|
298
|
-
complete && complete();
|
299
|
-
}
|
300
|
-
};
|
301
|
-
anime(opt);
|
302
|
-
};
|
303
291
|
const pageScroll = (target, offset, complete) => {
|
304
292
|
const opt = {
|
305
293
|
left: 0,
|
package/source/js/_app/page.js
CHANGED
@@ -175,7 +175,7 @@ const postBeauty = function () {
|
|
175
175
|
$dom.each('figure.highlight', function (element) {
|
176
176
|
const code_container = element.child('.code-container');
|
177
177
|
const caption = element.child('figcaption');
|
178
|
-
element.insertAdjacentHTML('beforeend', '<div class="operation"><span class="breakline-btn"><i class="
|
178
|
+
element.insertAdjacentHTML('beforeend', '<div class="operation"><span class="breakline-btn"><i class="fa fa-solid fa-align-left"></i></span><span class="copy-btn"><i class="fa fa-solid fa-clipboard"></i></span><span class="fullscreen-btn"><i class="fa fa-solid fa-expand"></i></span></div>');
|
179
179
|
const copyBtn = element.child('.copy-btn');
|
180
180
|
if (LOCAL.nocopy) {
|
181
181
|
copyBtn.remove();
|
@@ -190,14 +190,14 @@ const postBeauty = function () {
|
|
190
190
|
comma = '\n';
|
191
191
|
});
|
192
192
|
clipBoard(code, function (result) {
|
193
|
-
target.child('.
|
193
|
+
target.child('.fa').className = result ? 'fa fa-solid fa-check' : 'fa fa-solid fa-times';
|
194
194
|
target.blur();
|
195
195
|
showtip(LOCAL.copyright);
|
196
196
|
});
|
197
197
|
}, { passive: true });
|
198
198
|
copyBtn.addEventListener('mouseleave', function (event) {
|
199
199
|
setTimeout(function () {
|
200
|
-
event.target.child('.
|
200
|
+
event.target.child('.fa').className = 'fa fa-solid fa-clipboard';
|
201
201
|
}, 1000);
|
202
202
|
});
|
203
203
|
}
|
@@ -206,11 +206,11 @@ const postBeauty = function () {
|
|
206
206
|
const target = event.currentTarget;
|
207
207
|
if (element.hasClass('breakline')) {
|
208
208
|
element.removeClass('breakline');
|
209
|
-
target.child('.
|
209
|
+
target.child('.fa').className = 'fa fa-solid fa-align-left';
|
210
210
|
}
|
211
211
|
else {
|
212
212
|
element.addClass('breakline');
|
213
|
-
target.child('.
|
213
|
+
target.child('.fa').className = 'fa fa-solid fa-align-justify';
|
214
214
|
}
|
215
215
|
});
|
216
216
|
const fullscreenBtn = element.child('.fullscreen-btn');
|
@@ -218,7 +218,7 @@ const postBeauty = function () {
|
|
218
218
|
element.removeClass('fullscreen');
|
219
219
|
element.scrollTop = 0;
|
220
220
|
BODY.removeClass('fullscreen');
|
221
|
-
fullscreenBtn.child('.
|
221
|
+
fullscreenBtn.child('.fa').className = 'fa fa-solid fa-expand';
|
222
222
|
};
|
223
223
|
const fullscreenHandle = function (event) {
|
224
224
|
const target = event.currentTarget;
|
@@ -234,7 +234,7 @@ const postBeauty = function () {
|
|
234
234
|
else {
|
235
235
|
element.addClass('fullscreen');
|
236
236
|
BODY.addClass('fullscreen');
|
237
|
-
fullscreenBtn.child('.
|
237
|
+
fullscreenBtn.child('.fa').className = 'fa fa-solid fa-compress';
|
238
238
|
if (code_container && code_container.find('tr').length > 15) {
|
239
239
|
const showBtn = code_container.child('.show-btn');
|
240
240
|
code_container.style.maxHeight = '';
|
@@ -246,7 +246,7 @@ const postBeauty = function () {
|
|
246
246
|
caption && caption.addEventListener('click', fullscreenHandle);
|
247
247
|
if (code_container && code_container.find('tr').length > 15) {
|
248
248
|
code_container.style.maxHeight = '300px';
|
249
|
-
code_container.insertAdjacentHTML('beforeend', '<div class="show-btn"><i class="
|
249
|
+
code_container.insertAdjacentHTML('beforeend', '<div class="show-btn"><i class="fa fa-solid fa-angle-down"></i></div>');
|
250
250
|
const showBtn = code_container.child('.show-btn');
|
251
251
|
const hideCode = function () {
|
252
252
|
code_container.style.maxHeight = '300px';
|
@@ -414,7 +414,7 @@ const algoliaSearch = function (pjax) {
|
|
414
414
|
if (!siteSearch) {
|
415
415
|
siteSearch = BODY.createChild('div', {
|
416
416
|
id: 'search',
|
417
|
-
innerHTML: '<div class="inner"><div class="header"><span class="icon"><i class="
|
417
|
+
innerHTML: '<div class="inner"><div class="header"><span class="icon"><i class="fa fa-solid fa-magnifying-glass"></i></span><div class="search-input-container"></div><span class="close-btn"><i class="fa fa-solid fa-times-circle"></i></span></div><div class="results"><div class="inner"><div id="search-stats"></div><div id="search-hits"></div><div id="search-pagination"></div></div></div></div>'
|
418
418
|
});
|
419
419
|
}
|
420
420
|
const search = instantsearch({
|
@@ -459,7 +459,7 @@ const algoliaSearch = function (pjax) {
|
|
459
459
|
container: '#search-hits',
|
460
460
|
templates: {
|
461
461
|
item: function (data) {
|
462
|
-
const cats = data.categories ? '<span>' + data.categories.join('<i class="
|
462
|
+
const cats = data.categories ? '<span>' + data.categories.join('<i class="fa fa-solid fa-angle-right"></i>') + '</span>' : '';
|
463
463
|
return '<a href="' + CONFIG.root + data.path + '">' + cats + data._highlightResult.title.value + '</a>';
|
464
464
|
},
|
465
465
|
empty: function (data) {
|
@@ -478,10 +478,10 @@ const algoliaSearch = function (pjax) {
|
|
478
478
|
showFirst: false,
|
479
479
|
showLast: false,
|
480
480
|
templates: {
|
481
|
-
first: '<i class="
|
482
|
-
last: '<i class="
|
483
|
-
previous: '<i class="
|
484
|
-
next: '<i class="
|
481
|
+
first: '<i class="fa fa=solid fa-angle-double-left"></i>',
|
482
|
+
last: '<i class="fa fa-solid fa-angle-double-right"></i>',
|
483
|
+
previous: '<i class="fa fa-solid fa-angle-left"></i>',
|
484
|
+
next: '<i class="fa fa-solid fa-angle-right"></i>'
|
485
485
|
},
|
486
486
|
cssClasses: {
|
487
487
|
root: 'pagination',
|
@@ -530,7 +530,7 @@ const domInit = function () {
|
|
530
530
|
if (!toolBtn) {
|
531
531
|
toolBtn = siteHeader.createChild('div', {
|
532
532
|
id: 'tool',
|
533
|
-
innerHTML: '<div class="item player"></div><div class="item contents"><i class="
|
533
|
+
innerHTML: '<div class="item player"></div><div class="item contents"><i class="fa fa-solid fa-list-ol"></i></div><div class="item chat"><i class="fa fa-solid fa-comments"></i></div><div class="item back-to-top"><i class="fa fa-solid fa-arrow-up"></i><span>0%</span></div>'
|
534
534
|
});
|
535
535
|
}
|
536
536
|
toolPlayer = toolBtn.child('.player');
|
@@ -618,6 +618,8 @@ const siteInit = function () {
|
|
618
618
|
});
|
619
619
|
siteRefresh(1);
|
620
620
|
};
|
621
|
-
window.addEventListener('DOMContentLoaded', siteInit
|
621
|
+
window.addEventListener('DOMContentLoaded', siteInit, {
|
622
|
+
passive: true
|
623
|
+
});
|
622
624
|
console.log('%c Theme.ShokaX v' + CONFIG.version + ' %c https://github.com/zkz098/hexo-theme-shokaX ', 'color: white; background: #e9546b; padding:5px 0;', 'padding:4px;border:1px solid #e9546b;');
|
623
625
|
console.log('%c by kaitaku ' + '%c https://www.kaitaku.xyz', 'color: white; background: #00bfff; padding: 5px 3px;', 'padding: 4px;border:1px solid #00bfff');
|
package/source/js/_app/vue.js
CHANGED
@@ -5,7 +5,7 @@ Vue.createApp({
|
|
5
5
|
methods: {
|
6
6
|
changeThemeByBtn() {
|
7
7
|
let c;
|
8
|
-
const btn = $dom('.theme').child('.
|
8
|
+
const btn = $dom('.theme').child('.fa');
|
9
9
|
const neko = BODY.createChild('div', {
|
10
10
|
id: 'neko',
|
11
11
|
innerHTML: '<div class="planet"><div class="sun"></div><div class="moon"></div></div><div class="body"><div class="face"><section class="eyes left"><span class="pupil"></span></section><section class="eyes right"><span class="pupil"></span></section><span class="nose"></span></div></div>'
|