hexo-theme-solitude 2.0.3 → 2.0.5
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 +3 -3
- package/.github/ISSUE_TEMPLATE/config.yml +1 -5
- package/README.md +35 -31
- package/README_zh-Hans.md +25 -21
- package/README_zh-Hant.md +28 -24
- package/SECURITY.md +1 -1
- package/_config.yml +453 -306
- package/languages/default.yml +13 -13
- package/languages/en.yml +14 -13
- package/layout/archive.pug +11 -4
- package/layout/includes/footer.pug +6 -5
- package/layout/includes/inject/body.pug +4 -4
- package/layout/includes/loading.pug +14 -2
- package/layout/includes/widgets/home/categoryBar.pug +2 -1
- package/package.json +8 -5
- package/scripts/event/merge_config.js +1 -0
- package/scripts/filter/post_image.js +0 -1
- package/scripts/helper/stylus.js +1 -1
- package/scripts/tags/mermaid.js +1 -1
- package/scripts/tags/tabs.js +11 -15
- package/source/css/_layout/aside.styl +1 -1
- package/source/css/_layout/header.styl +22 -15
- package/source/css/_tags/mermaid.styl +1 -1
- package/source/css/_tags/tabs.styl +1 -1
- package/source/css/var.styl +1 -1
- package/source/js/main.js +3 -2
- package/.github/persona.avif +0 -0
- package/scripts/tags/btns.js +0 -35
- package/scripts/tags/button.js +0 -21
- package/scripts/tags/bvideo.js +0 -7
- package/scripts/tags/checkbox.js +0 -51
- package/scripts/tags/fold.js +0 -13
- package/scripts/tags/image.js +0 -75
- package/scripts/tags/inline-image.js +0 -12
- package/scripts/tags/label.js +0 -10
- package/scripts/tags/link.js +0 -50
- package/scripts/tags/media.js +0 -29
- package/scripts/tags/note.js +0 -13
- package/scripts/tags/span.js +0 -17
- package/scripts/tags/timeline.js +0 -22
- package/source/css/_tags/btns.styl +0 -212
- package/source/css/_tags/button.styl +0 -40
- package/source/css/_tags/checkbox.styl +0 -204
- package/source/css/_tags/fold.styl +0 -65
- package/source/css/_tags/image.styl +0 -4
- package/source/css/_tags/index.styl +0 -63
- package/source/css/_tags/label.styl +0 -4
- package/source/css/_tags/link.styl +0 -59
- package/source/css/_tags/media.styl +0 -57
- package/source/css/_tags/note.styl +0 -104
- package/source/css/_tags/span.styl +0 -34
- package/source/css/_tags/timeline.styl +0 -82
package/languages/default.yml
CHANGED
@@ -94,19 +94,19 @@ award:
|
|
94
94
|
search:
|
95
95
|
empty: No results found
|
96
96
|
hit: Found ${query} results for you
|
97
|
-
placeholder: Enter keywords to
|
97
|
+
placeholder: Enter keywords to search
|
98
98
|
count: Total <b>${count}</b> results.
|
99
99
|
|
100
100
|
head:
|
101
101
|
noscript: Please enable JavaScript to view the site
|
102
102
|
|
103
103
|
aside:
|
104
|
-
postcount: 'Posts
|
105
|
-
pv: 'PV
|
106
|
-
uv: 'UV
|
107
|
-
runtime: 'Runtime
|
108
|
-
updatetime: 'Last update
|
109
|
-
wordcount: 'Word count
|
104
|
+
postcount: 'Posts:'
|
105
|
+
pv: 'PV:'
|
106
|
+
uv: 'UV:'
|
107
|
+
runtime: 'Runtime:'
|
108
|
+
updatetime: 'Last update:'
|
109
|
+
wordcount: 'Word count:'
|
110
110
|
toc: Table of contents
|
111
111
|
tagmore: View all
|
112
112
|
avatar: Avatar
|
@@ -125,7 +125,7 @@ console:
|
|
125
125
|
comment_title: Latest comments
|
126
126
|
tag_tip: Tags
|
127
127
|
tag_title: Find interesting areas
|
128
|
-
switch_darkmode: Day and night
|
128
|
+
switch_darkmode: Day and night mode
|
129
129
|
switch_hideAside: Sidebar display control
|
130
130
|
switch_keyboard: Keyboard operation
|
131
131
|
switch_music: Music switch
|
@@ -170,7 +170,7 @@ keyboard:
|
|
170
170
|
title: Blog shortcuts
|
171
171
|
|
172
172
|
newest_comment:
|
173
|
-
error: Unable to get
|
173
|
+
error: Unable to get comments, please check the configuration.
|
174
174
|
zero: No comments.
|
175
175
|
|
176
176
|
comment:
|
@@ -196,19 +196,19 @@ right_menu:
|
|
196
196
|
cht_to_chs: 转为简体
|
197
197
|
img_error: This image cannot be copied or downloaded.
|
198
198
|
barrage:
|
199
|
-
open:
|
200
|
-
close:
|
199
|
+
open: Open Barrage
|
200
|
+
close: Close Barrage
|
201
201
|
music:
|
202
202
|
start: Play
|
203
203
|
stop: Pause
|
204
204
|
back: Back
|
205
205
|
forward: Forward
|
206
|
-
copyMusicName:
|
206
|
+
copyMusicName: Copy Name
|
207
207
|
|
208
208
|
pagination:
|
209
209
|
prev: Prev
|
210
210
|
next: Next
|
211
|
-
to:
|
211
|
+
to: Go to page
|
212
212
|
|
213
213
|
about:
|
214
214
|
other:
|
package/languages/en.yml
CHANGED
@@ -77,6 +77,7 @@ post:
|
|
77
77
|
next: Next
|
78
78
|
prev: Previous
|
79
79
|
|
80
|
+
|
80
81
|
nav:
|
81
82
|
site_name_title: Back to home
|
82
83
|
backtop: Back to top
|
@@ -93,19 +94,19 @@ award:
|
|
93
94
|
search:
|
94
95
|
empty: No results found
|
95
96
|
hit: Found ${query} results for you
|
96
|
-
placeholder: Enter keywords to
|
97
|
+
placeholder: Enter keywords to search
|
97
98
|
count: Total <b>${count}</b> results.
|
98
99
|
|
99
100
|
head:
|
100
101
|
noscript: Please enable JavaScript to view the site
|
101
102
|
|
102
103
|
aside:
|
103
|
-
postcount: 'Posts
|
104
|
-
pv: 'PV
|
105
|
-
uv: 'UV
|
106
|
-
runtime: 'Runtime
|
107
|
-
updatetime: 'Last update
|
108
|
-
wordcount: 'Word count
|
104
|
+
postcount: 'Posts:'
|
105
|
+
pv: 'PV:'
|
106
|
+
uv: 'UV:'
|
107
|
+
runtime: 'Runtime:'
|
108
|
+
updatetime: 'Last update:'
|
109
|
+
wordcount: 'Word count:'
|
109
110
|
toc: Table of contents
|
110
111
|
tagmore: View all
|
111
112
|
avatar: Avatar
|
@@ -124,7 +125,7 @@ console:
|
|
124
125
|
comment_title: Latest comments
|
125
126
|
tag_tip: Tags
|
126
127
|
tag_title: Find interesting areas
|
127
|
-
switch_darkmode: Day and night
|
128
|
+
switch_darkmode: Day and night mode
|
128
129
|
switch_hideAside: Sidebar display control
|
129
130
|
switch_keyboard: Keyboard operation
|
130
131
|
switch_music: Music switch
|
@@ -169,7 +170,7 @@ keyboard:
|
|
169
170
|
title: Blog shortcuts
|
170
171
|
|
171
172
|
newest_comment:
|
172
|
-
error: Unable to get
|
173
|
+
error: Unable to get comments, please check the configuration.
|
173
174
|
zero: No comments.
|
174
175
|
|
175
176
|
comment:
|
@@ -195,19 +196,19 @@ right_menu:
|
|
195
196
|
cht_to_chs: 转为简体
|
196
197
|
img_error: This image cannot be copied or downloaded.
|
197
198
|
barrage:
|
198
|
-
open:
|
199
|
-
close:
|
199
|
+
open: Open Barrage
|
200
|
+
close: Close Barrage
|
200
201
|
music:
|
201
202
|
start: Play
|
202
203
|
stop: Pause
|
203
204
|
back: Back
|
204
205
|
forward: Forward
|
205
|
-
copyMusicName:
|
206
|
+
copyMusicName: Copy Name
|
206
207
|
|
207
208
|
pagination:
|
208
209
|
prev: Prev
|
209
210
|
next: Next
|
210
|
-
to:
|
211
|
+
to: Go to page
|
211
212
|
|
212
213
|
about:
|
213
214
|
other:
|
package/layout/archive.pug
CHANGED
@@ -3,8 +3,15 @@ extends includes/layout.pug
|
|
3
3
|
block content
|
4
4
|
main.layout#content-inner
|
5
5
|
#archive
|
6
|
-
.article-sort-title #{__('page.archives')}<sup>#{site.posts.find({
|
7
|
-
.
|
8
|
-
|
9
|
-
|
6
|
+
.article-sort-title #{__('page.archives')}<sup>#{site.posts.find({parent: {$exists: false}}).length}</sup>
|
7
|
+
case theme.page.archives
|
8
|
+
when 0
|
9
|
+
.article-sort
|
10
|
+
include includes/mixins/articleSort
|
11
|
+
include includes/mixins/pagination
|
12
|
+
when 1
|
13
|
+
.recent-posts#recent-posts
|
14
|
+
each post,index in page.posts.find({ parent: { $exists: false } }).data
|
15
|
+
include includes/widgets/home/postList
|
16
|
+
include includes/mixins/pagination
|
10
17
|
include includes/widgets/aside/aside
|
@@ -56,11 +56,12 @@ div#footer-bar
|
|
56
56
|
div.footer-bar-right
|
57
57
|
each item in theme.footer.links
|
58
58
|
a.footer-bar-link(href=url_for(item.url), alt=item.name)!= item.name
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
59
|
+
if theme.footer.license
|
60
|
+
a.footer-bar-link.cc(href=url_for(theme.footer.license), aria-label = 'copyright')
|
61
|
+
i.solitude.fa-solid.fa-copyright
|
62
|
+
i.solitude.fa-brands.fa-creative-commons-by
|
63
|
+
i.solitude.fa-brands.fa-creative-commons-nc
|
64
|
+
i.solitude.fa-brands.fa-creative-commons-nd
|
64
65
|
if theme.footer.privacy
|
65
66
|
div.needEndHide#cookies-window
|
66
67
|
div.cookies-window-title= __('cookies.title')
|
@@ -16,12 +16,12 @@ div
|
|
16
16
|
script(src=url_for(theme.cdn.waterfall))
|
17
17
|
script(src=url_for(theme.cdn.pjax))
|
18
18
|
|
19
|
-
if theme.mermaid
|
20
|
-
script(src=url_for(theme.cdn.mermaid_js))
|
21
|
-
|
22
19
|
if theme.post.share.enable && theme.post.share.list && theme.post.share.list.includes('qrcode')
|
23
20
|
script(src=url_for(theme.cdn.qrcode))
|
24
21
|
|
22
|
+
if theme.mermaid
|
23
|
+
script(src=url_for(theme.cdn.mermaid_js))
|
24
|
+
|
25
25
|
if theme.display_mode.universe
|
26
26
|
script(src=url_for(theme.cdn.universe_js))
|
27
27
|
script.
|
@@ -115,4 +115,4 @@ if theme.footer.randomlink
|
|
115
115
|
include ../body/mode
|
116
116
|
|
117
117
|
// google adsense
|
118
|
-
include ../body/gadsense
|
118
|
+
include ../body/gadsense
|
@@ -4,22 +4,34 @@ div(id="loading-box" onclick="preloader.endLoading();" style="zoom:1")
|
|
4
4
|
|
5
5
|
script.
|
6
6
|
const preloader = {
|
7
|
+
isLoaded: false,
|
7
8
|
endLoading: () => {
|
8
|
-
|
9
|
+
if (!preloader.isLoaded) {
|
10
|
+
document.getElementById('loading-box').classList.add('loaded');
|
11
|
+
preloader.isLoaded = true;
|
12
|
+
}
|
9
13
|
},
|
10
14
|
initLoading: () => {
|
11
15
|
document.getElementById('loading-box').classList.remove('loaded');
|
16
|
+
preloader.isLoaded = false;
|
12
17
|
},
|
13
18
|
removePaceDone: () => {
|
14
19
|
document.getElementById('body').classList = 'pace-done';
|
15
20
|
}
|
16
21
|
}
|
22
|
+
|
17
23
|
window.addEventListener('load', () => {
|
18
24
|
preloader.endLoading();
|
19
25
|
});
|
26
|
+
|
20
27
|
window.addEventListener('pjax:send', () => {
|
21
28
|
preloader.initLoading();
|
22
29
|
});
|
30
|
+
|
23
31
|
document.addEventListener('pjax:complete', () => {
|
24
32
|
preloader.endLoading();
|
25
|
-
});
|
33
|
+
});
|
34
|
+
|
35
|
+
setTimeout(() => {
|
36
|
+
preloader.endLoading();
|
37
|
+
}, 5000);
|
@@ -12,4 +12,5 @@ div.category-bar-right
|
|
12
12
|
if wordcount > 40 || categories.data.length > 10
|
13
13
|
.category-bar-next#category-bar-next(onclick="sco.scrollCategoryBarToRight()")
|
14
14
|
i.solitude.fa-solid.fa-angles-right
|
15
|
-
|
15
|
+
if theme.page.categories
|
16
|
+
a.category-bar-more(href=url_for('/categories/'))= __('more')
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.5",
|
4
4
|
"description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
|
5
5
|
"main": "package.json",
|
6
6
|
"scripts": {
|
@@ -19,8 +19,8 @@
|
|
19
19
|
"url": "https://github.com/everfu/hexo-theme-solitude"
|
20
20
|
},
|
21
21
|
"dependencies": {
|
22
|
-
"hexo-renderer-
|
23
|
-
"hexo-renderer-
|
22
|
+
"hexo-renderer-pug": "^3.0.0",
|
23
|
+
"hexo-renderer-stylus": "^3.0.0"
|
24
24
|
},
|
25
25
|
"bugs": {
|
26
26
|
"url": "https://github.com/everfu/hexo-theme-solitude/issues",
|
@@ -28,5 +28,8 @@
|
|
28
28
|
},
|
29
29
|
"homepage": "https://everfu.github.io/Solitude/",
|
30
30
|
"author": "Hexo-Theme-Solitude<o@everfu.org>",
|
31
|
-
"license": "MIT"
|
32
|
-
|
31
|
+
"license": "MIT",
|
32
|
+
"devDependencies": {
|
33
|
+
"@types/node": "^22.0.0"
|
34
|
+
}
|
35
|
+
}
|
@@ -4,7 +4,6 @@ hexo.extend.filter.register('before_post_render', data => {
|
|
4
4
|
const imgTestReg = /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/i
|
5
5
|
let { cover: coverVal } = data
|
6
6
|
|
7
|
-
// Add path to top_img and cover if post_asset_folder is enabled
|
8
7
|
if (hexo.config.post_asset_folder) {
|
9
8
|
if (coverVal && coverVal.indexOf('/') === -1 && imgTestReg.test(coverVal)) data.cover = `${data.path}${coverVal}`
|
10
9
|
}
|
package/scripts/helper/stylus.js
CHANGED
package/scripts/tags/mermaid.js
CHANGED
package/scripts/tags/tabs.js
CHANGED
@@ -5,20 +5,18 @@
|
|
5
5
|
|
6
6
|
'use strict'
|
7
7
|
|
8
|
-
function postTabs (
|
8
|
+
function postTabs ([name, active], content) {
|
9
9
|
const tabBlock = /<!--\s*tab (.*?)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g
|
10
10
|
|
11
|
-
args = args.join(' ').split(',')
|
12
|
-
const tabName = args[0]
|
13
|
-
const tabActive = Number(args[1]) || 0
|
14
|
-
|
15
11
|
const matches = []
|
16
12
|
let match
|
17
13
|
let tabId = 0
|
18
14
|
let tabNav = ''
|
19
15
|
let tabContent = ''
|
20
16
|
|
21
|
-
|
17
|
+
if (typeof active === 'undefined') {
|
18
|
+
active = 0
|
19
|
+
}
|
22
20
|
|
23
21
|
while ((match = tabBlock.exec(content)) !== null) {
|
24
22
|
matches.push(match[1])
|
@@ -33,29 +31,27 @@ function postTabs (args, content) {
|
|
33
31
|
let tabHref = ''
|
34
32
|
|
35
33
|
postContent = hexo.render.renderSync({ text: postContent, engine: 'markdown' }).trim()
|
34
|
+
tabHref = (name + ' ' + tabId).toLowerCase().split(' ').join('-');
|
36
35
|
|
37
|
-
|
38
|
-
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
|
39
|
-
|
40
|
-
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId)
|
36
|
+
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = name + ' ' + tabId)
|
41
37
|
|
42
38
|
const isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : ''
|
43
39
|
const icon = tabIcon.trim()
|
44
40
|
tabIcon.length > 0 && (tabIcon = `<i ${isOnlyicon} class="tab solitude ${icon}"></i>`)
|
45
41
|
|
46
|
-
const toTop = '<button type="button" class="tab-to-top" aria-label="scroll to top"><i class="solitude
|
47
|
-
|
48
|
-
const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : ''
|
42
|
+
const toTop = '<button type="button" class="tab-to-top" aria-label="scroll to top"><i class="solitude fas fa-arrow-up"></i></button>'
|
43
|
+
const isActive = active === tabId ? ' active' : ''
|
49
44
|
tabNav += `<li class="tab${isActive}"><button type="button" data-href="#${tabHref}">${tabIcon + tabCaption.trim()}</button></li>`
|
50
45
|
tabContent += `<div class="tab-item-content${isActive}" id="${tabHref}">${postContent + toTop}</div>`
|
46
|
+
tabId += 1
|
51
47
|
}
|
52
48
|
|
53
49
|
tabNav = `<ul class="nav-tabs">${tabNav}</ul>`
|
54
50
|
tabContent = `<div class="tab-contents">${tabContent}</div>`
|
55
51
|
|
56
|
-
return `<div class="tabs" id="${
|
52
|
+
return `<div class="tabs" id="${name.toLowerCase().split(' ').join('-')}">${tabNav + tabContent}</div>`
|
57
53
|
}
|
58
54
|
|
59
55
|
hexo.extend.tag.register('tabs', postTabs, { ends: true })
|
60
56
|
hexo.extend.tag.register('subtabs', postTabs, { ends: true })
|
61
|
-
hexo.extend.tag.register('subsubtabs', postTabs, { ends: true })
|
57
|
+
hexo.extend.tag.register('subsubtabs', postTabs, { ends: true })
|
@@ -19,13 +19,22 @@
|
|
19
19
|
&:hover
|
20
20
|
color var(--efu-card-bg)
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
&:not(.nav-fixed)
|
23
|
+
#nav
|
24
|
+
background var(--efu-none)
|
25
|
+
transition .3s
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
+maxWidth768()
|
28
|
+
transition 0s
|
29
|
+
|
30
|
+
.post &
|
31
|
+
|
32
|
+
#nav-right
|
33
|
+
.nav-button
|
34
|
+
.console_switchbutton
|
35
|
+
label
|
36
|
+
i
|
37
|
+
background var(--efu-white)
|
29
38
|
|
30
39
|
#page-header
|
31
40
|
#site-title
|
@@ -141,7 +150,8 @@
|
|
141
150
|
padding 0
|
142
151
|
|
143
152
|
.nav-button
|
144
|
-
margin-left
|
153
|
+
margin-left 12px
|
154
|
+
cursor pointer
|
145
155
|
|
146
156
|
a
|
147
157
|
height 35px
|
@@ -151,6 +161,9 @@
|
|
151
161
|
justify-content center
|
152
162
|
border-radius 40px
|
153
163
|
|
164
|
+
i
|
165
|
+
font-size 20px
|
166
|
+
|
154
167
|
&.totopbtn
|
155
168
|
width 25px
|
156
169
|
height 25px
|
@@ -163,7 +176,7 @@
|
|
163
176
|
transition .3s
|
164
177
|
|
165
178
|
&.console_switchbutton
|
166
|
-
padding 10px
|
179
|
+
padding 10px 7.5px
|
167
180
|
|
168
181
|
&:hover
|
169
182
|
label
|
@@ -195,9 +208,6 @@
|
|
195
208
|
border-radius 12px
|
196
209
|
background var(--efu-fontcolor)
|
197
210
|
|
198
|
-
.post &
|
199
|
-
background var(--efu-white)
|
200
|
-
|
201
211
|
&.left
|
202
212
|
top 0
|
203
213
|
width 100%
|
@@ -611,9 +621,6 @@
|
|
611
621
|
+maxWidth899()
|
612
622
|
display none !important
|
613
623
|
|
614
|
-
.nav-button
|
615
|
-
cursor pointer
|
616
|
-
|
617
624
|
#site-logo
|
618
625
|
width 121px
|
619
626
|
|
@@ -795,7 +802,7 @@ if hexo-config('nav.group')
|
|
795
802
|
+minWidth900()
|
796
803
|
align-items center
|
797
804
|
|
798
|
-
|
805
|
+
i.fa-solid.fa-home
|
799
806
|
color var(--efu-white)
|
800
807
|
|
801
808
|
.nav-fixed
|
package/source/css/var.styl
CHANGED
@@ -3,7 +3,7 @@ error_img = hexo-config('errorpage.img')
|
|
3
3
|
$dark_theme = convert(hexo-config('theme_color.dark'))
|
4
4
|
$dark_theme_op = convert(hexo-config('theme_color.dark_op'))
|
5
5
|
$dark_theme_op_deep = convert(hexo-config('theme_color.dark_op_deep'))
|
6
|
-
$dark_theme_none = hexo-config('theme_color.dark_none')
|
6
|
+
$dark_theme_none = convert(hexo-config('theme_color.dark_none'))
|
7
7
|
$light_theme = convert(hexo-config('theme_color.light'))
|
8
8
|
$light_theme_op = convert(hexo-config('theme_color.light_op'))
|
9
9
|
$light_theme_op_deep = convert(hexo-config('theme_color.light_op_deep'))
|
package/source/js/main.js
CHANGED
@@ -198,6 +198,7 @@ const sco = {
|
|
198
198
|
},
|
199
199
|
initConsoleState() {
|
200
200
|
const consoleHideAside = document.querySelector("#consoleHideAside");
|
201
|
+
if(!consoleHideAside) return;
|
201
202
|
consoleHideAside.classList.toggle("on", document.documentElement.classList.contains("hide-aside"));
|
202
203
|
},
|
203
204
|
changeSayHelloText() {
|
@@ -464,7 +465,7 @@ const addHighlight = () => {
|
|
464
465
|
const expandClass = !expand === true ? 'closed' : ''
|
465
466
|
const $syntaxHighlight = syntax === 'highlight.js' ? document.querySelectorAll('figure.highlight') : document.querySelectorAll('pre[class*="language-"]')
|
466
467
|
if (!(($isShowTool || limit) && $syntaxHighlight.length)) return
|
467
|
-
const copyEle = copy ? `<i class="solitude
|
468
|
+
const copyEle = copy ? `<i class="solitude fas fa-copy copy-button"></i>` : '<i></i>';
|
468
469
|
const expandEle = `<i class="solitude fas fa-angle-down expand"></i>`;
|
469
470
|
const limitEle = limit ? `<i class="solitude fas fa-angles-down"></i>` : '<i></i>';
|
470
471
|
const alertInfo = (ele, text) => utils.snackbarShow(text, false, 2000)
|
@@ -712,4 +713,4 @@ window.onkeydown = e => {
|
|
712
713
|
};
|
713
714
|
document.addEventListener('copy', () => {
|
714
715
|
utils.snackbarShow(GLOBAL_CONFIG.lang.copy.success, false, 3000);
|
715
|
-
});
|
716
|
+
});
|
package/.github/persona.avif
DELETED
Binary file
|
package/scripts/tags/btns.js
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function postBtns(args, content) {
|
4
|
-
return `<div class="btns ${args.join(" ")}">
|
5
|
-
${content}
|
6
|
-
</div>`;
|
7
|
-
}
|
8
|
-
|
9
|
-
function postCell(args, content) {
|
10
|
-
args = args.join(" ").split(",");
|
11
|
-
let text = args[0] || "";
|
12
|
-
let url = args[1] || "";
|
13
|
-
text = text.trim();
|
14
|
-
url = url.trim();
|
15
|
-
if (url.length > 0) {
|
16
|
-
url = "href='" + url + "'";
|
17
|
-
}
|
18
|
-
let icon = "";
|
19
|
-
let img = "https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus/lib/assets/default.svg";
|
20
|
-
if (args.length > 2) {
|
21
|
-
if (args[2].indexOf(" solitude") > -1) {
|
22
|
-
icon = args[2].trim();
|
23
|
-
} else {
|
24
|
-
img = args[2].trim();
|
25
|
-
}
|
26
|
-
}
|
27
|
-
if (icon.length > 0) {
|
28
|
-
return `<a class="button no-text-decoration" ${url} title='${text}'><i class='${icon}'></i>${text}</a>`;
|
29
|
-
} else {
|
30
|
-
return `<a class="button no-text-decoration" ${url} title='${text}'><img src='${img}'>${text}</a>`;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
hexo.extend.tag.register("btns", postBtns, { ends: true });
|
35
|
-
hexo.extend.tag.register("cell", postCell);
|
package/scripts/tags/button.js
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
const urlFor = require("hexo-util").url_for.bind(hexo);
|
4
|
-
|
5
|
-
function btn(args) {
|
6
|
-
args = args.join(" ").split(",");
|
7
|
-
let url = args[0] || "";
|
8
|
-
let text = args[1] || "";
|
9
|
-
let icon = args[2] || "";
|
10
|
-
let option = args[3] || "";
|
11
|
-
|
12
|
-
url = url.trim();
|
13
|
-
text = text.trim();
|
14
|
-
icon = icon.trim();
|
15
|
-
option = option.trim();
|
16
|
-
|
17
|
-
return `<button class="btn-sco ${option}" onclick="${url.startsWith("http") ? `window.open('${url}')` : `pjax.loadUrl('${urlFor(url)}')`}"
|
18
|
-
title="${text}">${icon.length ? `<i class="solitude ${icon}"></i>` : ""}${text.length ? `<span>${text}</span>` : ""}</button>`;
|
19
|
-
}
|
20
|
-
|
21
|
-
hexo.extend.tag.register("btn", btn, { ends: false });
|
package/scripts/tags/bvideo.js
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
|
3
|
-
function bilibili(args) {
|
4
|
-
return `<iframe class="bvideo" width="100%" height="600" src="//player.bilibili.com/player.html?autoplay=0&bvid=${args}" border="0" frameBorder="no" framespacing="0" allowFullScreen="true"></iframe>`
|
5
|
-
}
|
6
|
-
|
7
|
-
hexo.extend.tag.register('bvideo', bilibili, {ends: false})
|
package/scripts/tags/checkbox.js
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
function postCheckbox(args) {
|
4
|
-
args = args.join(' ').split(',')
|
5
|
-
var cls = ''
|
6
|
-
var text = ''
|
7
|
-
var checked = false
|
8
|
-
if (args.length > 1) {
|
9
|
-
cls = (args[0] || '').trim()
|
10
|
-
if (cls.length > 0) {
|
11
|
-
cls = ' ' + cls
|
12
|
-
}
|
13
|
-
if (cls.indexOf('checked') > -1) {
|
14
|
-
checked = true
|
15
|
-
}
|
16
|
-
text = (args[1] || '').trim()
|
17
|
-
} else if (args.length > 0) {
|
18
|
-
text = (args[0] || '').trim()
|
19
|
-
}
|
20
|
-
if (text.length > 0) {
|
21
|
-
return `<div class='checkbox${cls}'><input type="checkbox" ${ checked ? 'checked="checked"' : '' }/>
|
22
|
-
${hexo.render.renderSync({text: text, engine: 'markdown'}).split('\n').join('')}
|
23
|
-
</div>`
|
24
|
-
}
|
25
|
-
}
|
26
|
-
function postRadio(args) {
|
27
|
-
args = args.join(' ').split(',')
|
28
|
-
var cls = ''
|
29
|
-
var text = ''
|
30
|
-
var checked = false
|
31
|
-
if (args.length > 1) {
|
32
|
-
cls = (args[0] || '').trim()
|
33
|
-
if (cls.length > 0) {
|
34
|
-
cls = ' ' + cls
|
35
|
-
}
|
36
|
-
if (cls.indexOf('checked') > -1) {
|
37
|
-
checked = true
|
38
|
-
}
|
39
|
-
text = (args[1] || '').trim()
|
40
|
-
} else if (args.length > 0) {
|
41
|
-
text = (args[0] || '').trim()
|
42
|
-
}
|
43
|
-
if (text.length > 0) {
|
44
|
-
return `<div class='checkbox${cls}'><input type="radio" ${ checked ? 'checked="checked"' : '' }/>
|
45
|
-
${hexo.render.renderSync({text: text, engine: 'markdown'}).split('\n').join('')}
|
46
|
-
</div>`
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
hexo.extend.tag.register('checkbox', postCheckbox);
|
51
|
-
hexo.extend.tag.register('radio', postRadio);
|
package/scripts/tags/fold.js
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
|
3
|
-
function postTabs(args, content) {
|
4
|
-
const title = args[0] ? args[0] : ""
|
5
|
-
const open = args[1] ? args[1] : ""
|
6
|
-
|
7
|
-
return `<details ${open}><summary>${title}</summary><div class="content">${hexo.render.renderSync({
|
8
|
-
text: content,
|
9
|
-
engine: 'markdown'
|
10
|
-
})}</div></details>`
|
11
|
-
}
|
12
|
-
|
13
|
-
hexo.extend.tag.register('fold', postTabs, {ends: true})
|