hexo-theme-solitude 2.0.12 → 2.1.0
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 +2 -2
- package/README_zh-Hans.md +2 -3
- package/README_zh-Hant.md +2 -2
- package/_config.yml +24 -6
- package/languages/default.yml +12 -0
- package/languages/en.yml +12 -0
- package/languages/zh-CN.yml +12 -0
- package/languages/zh-TW.yml +34 -22
- package/layout/includes/head/config.pug +5 -3
- package/layout/includes/inject/body.pug +1 -4
- package/layout/includes/inject/head.pug +6 -0
- package/layout/includes/layout.pug +4 -0
- package/layout/includes/page/says.pug +1 -1
- package/layout/includes/rightmenu.pug +3 -3
- package/layout/includes/rightside.pug +3 -0
- package/layout/includes/sidebar.pug +10 -1
- package/layout/includes/widgets/aside/asideNewestPost.pug +8 -11
- package/layout/includes/widgets/aside/asideWebInfo.pug +6 -6
- package/layout/includes/widgets/page/links/banner.pug +0 -1
- package/layout/includes/widgets/post/postInfo.pug +12 -12
- package/layout/includes/widgets/rightside/hide.pug +6 -0
- package/layout/includes/widgets/rightside/show.pug +12 -0
- package/layout/includes/widgets/third-party/comments/comment.pug +3 -3
- package/layout/includes/widgets/third-party/pjax.pug +1 -1
- package/layout/page.pug +1 -1
- package/package.json +4 -4
- package/scripts/event/merge_config.js +15 -5
- package/scripts/event/page.js +1 -1
- package/scripts/filter/checkThemeConfig.js +3 -3
- package/scripts/helper/related_post.js +1 -1
- package/scripts/tags/article.js +6 -27
- package/scripts/tags/tabs.js +1 -3
- package/source/css/_comments/comment.styl +4 -4
- package/source/css/_comments/twikoo.styl +3 -4
- package/source/css/_global/index.styl +3 -3
- package/source/css/_layout/aside.styl +44 -28
- package/source/css/_layout/capsule.styl +1 -1
- package/source/css/_layout/header.styl +1 -0
- package/source/css/_layout/recent-post.styl +0 -2
- package/source/css/_layout/rightside.styl +34 -0
- package/source/css/_page/_about/buff.styl +0 -1
- package/source/css/_page/_about/contentinfo.styl +2 -2
- package/source/css/_page/_about/game.styl +0 -2
- package/source/css/_page/_about/maxim.styl +0 -1
- package/source/css/_page/_about/myphoto.styl +0 -1
- package/source/css/_page/_about/oneself.styl +1 -1
- package/source/css/_page/_about/personalities.styl +1 -1
- package/source/css/_page/_about/skills.styl +0 -1
- package/source/css/_page/_about/statistic.styl +0 -1
- package/source/css/_page/_home/home-top.styl +5 -0
- package/source/css/_page/other.styl +2 -1
- package/source/js/main.js +36 -0
- package/source/js/right_menu.js +10 -0
- package/source/js/tw_cn.js +18 -11
- /package/layout/includes/{body → head}/mode.pug +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "2.0
|
3
|
+
"version": "2.1.0",
|
4
4
|
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
|
5
5
|
"main": "package.json",
|
6
6
|
"scripts": {
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"solitude",
|
13
13
|
"Card UI Design",
|
14
14
|
"everfu",
|
15
|
-
"
|
15
|
+
"伍十七",
|
16
16
|
"hexo-theme-solitude"
|
17
17
|
],
|
18
18
|
"repository": {
|
@@ -25,9 +25,9 @@
|
|
25
25
|
},
|
26
26
|
"bugs": {
|
27
27
|
"url": "https://github.com/everfu/hexo-theme-solitude/issues",
|
28
|
-
"email": "o@everfu.
|
28
|
+
"email": "o@everfu.cn"
|
29
29
|
},
|
30
30
|
"homepage": "https://solitude.js.org",
|
31
|
-
"author": "Hexo-Theme-Solitude<o@everfu.
|
31
|
+
"author": "Hexo-Theme-Solitude<o@everfu.cn>",
|
32
32
|
"license": "MIT"
|
33
33
|
}
|
@@ -383,11 +383,8 @@ hexo.extend.filter.register('before_generate', () => {
|
|
383
383
|
right_menu: {
|
384
384
|
enable: false,
|
385
385
|
commentBarrage: false,
|
386
|
-
|
387
|
-
|
388
|
-
defaultEncoding: 2,
|
389
|
-
translateDelay: 0,
|
390
|
-
},
|
386
|
+
ctrlOriginalMenu: false,
|
387
|
+
translate: false,
|
391
388
|
custom_list: []
|
392
389
|
},
|
393
390
|
lure: {
|
@@ -408,6 +405,19 @@ hexo.extend.filter.register('before_generate', () => {
|
|
408
405
|
light: 'https://bu.dusays.com/2023/09/29/651685cc18d39.jpg',
|
409
406
|
opacity: .2,
|
410
407
|
},
|
408
|
+
translate: {
|
409
|
+
enable: false,
|
410
|
+
defaultEncoding: 2,
|
411
|
+
translateDelay: 0,
|
412
|
+
},
|
413
|
+
rightside: {
|
414
|
+
enable: false,
|
415
|
+
hide: {
|
416
|
+
enable: false,
|
417
|
+
translate: false,
|
418
|
+
mode: false
|
419
|
+
}
|
420
|
+
},
|
411
421
|
CDN: {
|
412
422
|
internal: 'local',
|
413
423
|
third_party: 'cdnjs',
|
package/scripts/event/page.js
CHANGED
@@ -5,12 +5,12 @@ hexo.extend.filter.register('before_post_render', () => {
|
|
5
5
|
const logger = hexo.log;
|
6
6
|
const theme = hexo.theme.config;
|
7
7
|
if (theme.says.enable && !data.essay) {
|
8
|
-
logger.error('\n
|
8
|
+
logger.error('\n 启用即刻短文的情况下,请新建 essay.yaml。');
|
9
9
|
logger.error('\n If says is enabled, essay data must be supplied! \n Please create essay.yaml.');
|
10
10
|
process.exit(-1);
|
11
11
|
}
|
12
12
|
if (theme.footer.randomlink && !data.links){
|
13
|
-
logger.error('\n
|
13
|
+
logger.error('\n 启用随机链接的情况下,请新建 links.yaml。');
|
14
14
|
logger.error('\n If randomlink is enabled, links data must be supplied! \n Please create links.yaml.');
|
15
15
|
process.exit(-1);
|
16
16
|
}
|
@@ -20,4 +20,4 @@ hexo.extend.filter.register('before_post_render', () => {
|
|
20
20
|
process.exit(-1);
|
21
21
|
}
|
22
22
|
}
|
23
|
-
);
|
23
|
+
);
|
package/scripts/tags/article.js
CHANGED
@@ -7,33 +7,12 @@ const article = ([path]) => {
|
|
7
7
|
}
|
8
8
|
const tags = post.tags.map(tag => `<a class="article-meta__tags fancybox" href="${tag.path}" onclick="event.stopPropagation();"><span class="tags-punctuation"><i class="solitude fa-solid fa-hashtag"></i>${tag.name}</span></a>`).join('');
|
9
9
|
const category = post.categories.data.length > 0 ? `<span class="article-meta sticky-warp"><span class="original">${post.categories.data[0].name}</span></span>` : '';
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</div>
|
17
|
-
<div class="recent-post-info">
|
18
|
-
<div class="recent-post-info-top">
|
19
|
-
<div class="recent-post-info-top-tips">
|
20
|
-
${category}
|
21
|
-
</div>
|
22
|
-
<a class="article-title fancybox" href="${post.path}" title="${post.title}">${post.title}</a>
|
23
|
-
</div>
|
24
|
-
<div class="content">
|
25
|
-
${post.description ? post.description : ''}
|
26
|
-
</div>
|
27
|
-
<div class="article-meta-wrap">
|
28
|
-
<span class="article-meta tags">
|
29
|
-
${tags}
|
30
|
-
</span>
|
31
|
-
<span class="post-meta-date">
|
32
|
-
<time datetime="${post.date}" style="display: inline;"></time>
|
33
|
-
</span>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
</div>`;
|
10
|
+
const postCover = `<div class="post_cover"><a href="${'/' + post.path}" class="fancybox" title="${post.title}"><img class="post_bg" src="${post.cover}" alt="${post.title}"></a></div>`;
|
11
|
+
const recentPostInfoTop = `<div class="recent-post-info-top"><div class="recent-post-info-top-tips">${category}</div><a class="article-title fancybox" href="${'/' + post.path}" title="${post.title}">${post.title}</a></div>`;
|
12
|
+
const content = `<div class="content">${post.description ? post.description : ''}</div>`;
|
13
|
+
const articleMetaWrap = `<div class="article-meta-wrap"><span class="article-meta tags">${tags}</span><span class="post-meta-date"><time datetime="${post.date}" style="display: inline;"></time></span></div>`;
|
14
|
+
const recentPostInfo = `<div class="recent-post-info">${recentPostInfoTop + content + articleMetaWrap}</div>`
|
15
|
+
return `<div class="recent-post-item" onclick="pjax.loadUrl('${'/' + post.path}')">${postCover + recentPostInfo}</div>`;
|
37
16
|
}
|
38
17
|
|
39
18
|
hexo.extend.tag.register('article', article)
|
package/scripts/tags/tabs.js
CHANGED
@@ -14,9 +14,7 @@ function postTabs ([name, active], content) {
|
|
14
14
|
let tabNav = ''
|
15
15
|
let tabContent = ''
|
16
16
|
|
17
|
-
|
18
|
-
active = 0
|
19
|
-
}
|
17
|
+
active = Number(active) || 0
|
20
18
|
|
21
19
|
while ((match = tabBlock.exec(content)) !== null) {
|
22
20
|
matches.push(match[1])
|
@@ -77,7 +77,7 @@
|
|
77
77
|
font-size .6rem
|
78
78
|
color var(--efu-secondtext)
|
79
79
|
border-radius 8px
|
80
|
-
if
|
80
|
+
if hexo-config('comment.use')[1] || ',' in hexo-config('comment.use')
|
81
81
|
&.move
|
82
82
|
if hexo-config('comment.count')
|
83
83
|
.comment-head
|
@@ -103,7 +103,7 @@
|
|
103
103
|
margin .5rem 0
|
104
104
|
position relative
|
105
105
|
|
106
|
-
if
|
106
|
+
if hexo-config('comment.use')[1] || ',' in hexo-config('comment.use')
|
107
107
|
.count span:last-child
|
108
108
|
display none
|
109
109
|
|
@@ -139,7 +139,7 @@
|
|
139
139
|
content ''
|
140
140
|
transition .4s
|
141
141
|
|
142
|
-
if
|
142
|
+
if hexo-config('comment.use')[1] || index(hexo-config('comment.use'), ',')
|
143
143
|
.comment-wrap
|
144
144
|
> div:last-child
|
145
145
|
display none
|
@@ -167,4 +167,4 @@ if hexo-config('twikoo.style') && 'Twikoo' in hexo-config('comment.use')
|
|
167
167
|
@import 'twikoo.styl'
|
168
168
|
|
169
169
|
if hexo-config('valine.style') && 'Valine' in hexo-config('comment.use')
|
170
|
-
@import 'valine.styl'
|
170
|
+
@import 'valine.styl'
|
@@ -301,6 +301,9 @@
|
|
301
301
|
font-size .5rem
|
302
302
|
color var(--efu-secondtext)
|
303
303
|
|
304
|
+
.tk-content
|
305
|
+
margin-top 0!important
|
306
|
+
|
304
307
|
.tk-meta-input
|
305
308
|
.el-input
|
306
309
|
.el-input-group__prepend
|
@@ -408,10 +411,6 @@ button.el-button.tk-cancel.el-button--default.el-button--small
|
|
408
411
|
border-radius 8px !important
|
409
412
|
color var(--efu-fontcolor) !important
|
410
413
|
|
411
|
-
.tk-replies .tk-content span:first-child
|
412
|
-
font-size inherit
|
413
|
-
color black
|
414
|
-
|
415
414
|
.OwO
|
416
415
|
&.OwO-open
|
417
416
|
.OwO-body
|
@@ -43,8 +43,8 @@
|
|
43
43
|
--sidebar-bg #f6f8fa
|
44
44
|
--btn-hover-color #ff7242
|
45
45
|
--btn-color #fff
|
46
|
-
--btn-bg
|
47
|
-
--text-bg-hover #
|
46
|
+
--btn-bg var(--efu-main)
|
47
|
+
--text-bg-hover #f6f8fa
|
48
48
|
--light-grey #eee
|
49
49
|
--text-highlight-color #1f2d3d
|
50
50
|
--blockquote-color #6a737d
|
@@ -411,7 +411,7 @@ i.solitude
|
|
411
411
|
span.tags-punctuation
|
412
412
|
i
|
413
413
|
font-weight bold
|
414
|
-
font-size:
|
414
|
+
font-size: 12px
|
415
415
|
transition none
|
416
416
|
margin-right: 2px
|
417
417
|
opacity: .4
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#aside-content
|
2
|
-
|
2
|
+
+minWidth1200()
|
3
|
+
width 300px
|
3
4
|
if hexo-config('aside.position') == 0
|
4
5
|
order 1
|
5
6
|
else
|
@@ -12,7 +13,8 @@
|
|
12
13
|
padding-left 15px
|
13
14
|
|
14
15
|
+maxWidth1200()
|
15
|
-
|
16
|
+
.card-widget:not(#card-toc)
|
17
|
+
display: none
|
16
18
|
|
17
19
|
+minWidth1300()
|
18
20
|
animation slide-in .6s .3s backwards
|
@@ -62,6 +64,7 @@
|
|
62
64
|
.sticky_layout
|
63
65
|
top calc(60px + .5rem)
|
64
66
|
position sticky
|
67
|
+
z-index 10
|
65
68
|
transition: top .3s ease 0s
|
66
69
|
|
67
70
|
#author-info__sayhi
|
@@ -187,6 +190,21 @@
|
|
187
190
|
right 0
|
188
191
|
padding .5rem
|
189
192
|
|
193
|
+
+maxWidth1200()
|
194
|
+
position: fixed
|
195
|
+
right: 3rem
|
196
|
+
bottom: 2rem
|
197
|
+
z-index: 100
|
198
|
+
max-width: 380px
|
199
|
+
max-height: calc(100% - 60px)
|
200
|
+
width: calc(100% - 80px)
|
201
|
+
transition: transform .3s
|
202
|
+
transform: scale(0)
|
203
|
+
transform-origin: right bottom
|
204
|
+
|
205
|
+
&.open
|
206
|
+
transform: scale(1)
|
207
|
+
|
190
208
|
.toc-content
|
191
209
|
overflow-y: auto
|
192
210
|
max-height: calc(100vh - 300px)
|
@@ -744,32 +762,6 @@ if hexo-config('aside.card.style') == 2
|
|
744
762
|
border var(--style-border-always)
|
745
763
|
|
746
764
|
#aside-content
|
747
|
-
.card-webinfo
|
748
|
-
.webinfo
|
749
|
-
.webinfo-item-title
|
750
|
-
display flex
|
751
|
-
|
752
|
-
i
|
753
|
-
line-height: 2 !important
|
754
|
-
margin-right: 6px
|
755
|
-
width: 16px
|
756
|
-
text-align: center
|
757
|
-
font-size: 16px !important
|
758
|
-
|
759
|
-
.webinfo-item
|
760
|
-
display flex
|
761
|
-
justify-content space-between
|
762
|
-
white-space nowrap
|
763
|
-
-webkit-box-align center
|
764
|
-
align-items center
|
765
|
-
padding .1rem .5rem 0
|
766
|
-
|
767
|
-
div:first-child
|
768
|
-
-webkit-box-flex 1
|
769
|
-
flex 1 1 0
|
770
|
-
padding-right 1rem
|
771
|
-
|
772
|
-
|
773
765
|
.card-allinfo
|
774
766
|
|
775
767
|
hr
|
@@ -1098,3 +1090,27 @@ if hexo-config('aside.newest_comment.enable')
|
|
1098
1090
|
font-size 12px
|
1099
1091
|
color var(--efu-secondtext)
|
1100
1092
|
margin-top auto
|
1093
|
+
|
1094
|
+
.webinfo-item
|
1095
|
+
display flex
|
1096
|
+
justify-content space-between
|
1097
|
+
white-space nowrap
|
1098
|
+
-webkit-box-align center
|
1099
|
+
align-items center
|
1100
|
+
padding .1rem .5rem 0
|
1101
|
+
|
1102
|
+
div:first-child
|
1103
|
+
-webkit-box-flex 1
|
1104
|
+
flex 1 1 0
|
1105
|
+
padding-right 1rem
|
1106
|
+
|
1107
|
+
.webinfo
|
1108
|
+
.webinfo-item-title
|
1109
|
+
display flex
|
1110
|
+
|
1111
|
+
i
|
1112
|
+
line-height: 2
|
1113
|
+
margin-right: 6px
|
1114
|
+
width: 16px
|
1115
|
+
text-align: center
|
1116
|
+
font-size: 16px
|
@@ -0,0 +1,34 @@
|
|
1
|
+
if hexo-config('rightside.enable')
|
2
|
+
#rightside
|
3
|
+
position: fixed
|
4
|
+
right: -2.5rem
|
5
|
+
bottom: 2.5rem
|
6
|
+
z-index: 1000
|
7
|
+
opacity: 0
|
8
|
+
transition: all .5s
|
9
|
+
|
10
|
+
button
|
11
|
+
display: block
|
12
|
+
margin-bottom: 5px
|
13
|
+
width: 1.8rem
|
14
|
+
height: 1.8rem
|
15
|
+
border-radius: 50%
|
16
|
+
background-color: var(--btn-bg)
|
17
|
+
color: var(--btn-color)
|
18
|
+
text-align: center
|
19
|
+
font-size: 16px
|
20
|
+
|
21
|
+
&.mobile
|
22
|
+
display: none
|
23
|
+
|
24
|
+
+maxWidth900()
|
25
|
+
display: block
|
26
|
+
|
27
|
+
.rs_hide
|
28
|
+
transform: translate(45px, 0)
|
29
|
+
transition: all .4s
|
30
|
+
opacity 0
|
31
|
+
|
32
|
+
&.show
|
33
|
+
opacity .8
|
34
|
+
transform: translate(0, 0)
|
@@ -7,7 +7,7 @@
|
|
7
7
|
background linear-gradient(120deg, #5b27ff 0, #00d4ff 100%)
|
8
8
|
background-size 200%
|
9
9
|
animation gradient 15s ease infinite
|
10
|
-
|
10
|
+
flex 4
|
11
11
|
|
12
12
|
.title1
|
13
13
|
opacity .8
|
@@ -28,7 +28,7 @@
|
|
28
28
|
justify-content center
|
29
29
|
align-items flex-start
|
30
30
|
flex-direction column
|
31
|
-
|
31
|
+
flex 3
|
32
32
|
|
33
33
|
h2
|
34
34
|
margin-right auto
|
@@ -3,7 +3,6 @@
|
|
3
3
|
min-height 300px
|
4
4
|
overflow hidden
|
5
5
|
color var(--efu-white)
|
6
|
-
width 59%
|
7
6
|
|
8
7
|
&::after
|
9
8
|
box-shadow 0 -69px 203px 11px #04120f inset
|
@@ -26,7 +25,6 @@
|
|
26
25
|
padding 1rem 2rem
|
27
26
|
|
28
27
|
.author-content-item.game-jl
|
29
|
-
width 39%
|
30
28
|
min-height 300px
|
31
29
|
overflow hidden
|
32
30
|
color var(--efu-white)
|
@@ -156,6 +156,7 @@ div#banners
|
|
156
156
|
|
157
157
|
+maxWidth768()
|
158
158
|
margin-top 0
|
159
|
+
flex-direction column
|
159
160
|
|
160
161
|
.author-content-item
|
161
162
|
+maxWidth1300()
|
@@ -172,7 +173,7 @@ div#banners
|
|
172
173
|
margin-top 0
|
173
174
|
|
174
175
|
.author-content-item
|
175
|
-
|
176
|
+
flex 4
|
176
177
|
border-radius 12px
|
177
178
|
background var(--efu-card-bg)
|
178
179
|
border var(--style-border-always)
|
package/source/js/main.js
CHANGED
@@ -26,9 +26,11 @@ const sidebarFn = () => {
|
|
26
26
|
sco.refreshWaterFall();
|
27
27
|
});
|
28
28
|
}
|
29
|
+
|
29
30
|
const scrollFn = () => {
|
30
31
|
let initTop = 0;
|
31
32
|
const $header = document.getElementById('page-header');
|
33
|
+
const $rightside = document.getElementById('rightside') || null;
|
32
34
|
const throttledScroll = utils.throttle(() => {
|
33
35
|
initThemeColor();
|
34
36
|
const currentTop = window.scrollY || document.documentElement.scrollTop;
|
@@ -40,14 +42,17 @@ const scrollFn = () => {
|
|
40
42
|
if (!$header.classList.contains('nav-visible')) $header.classList.add('nav-visible');
|
41
43
|
}
|
42
44
|
$header.classList.add('nav-fixed');
|
45
|
+
$rightside && ($rightside.style.cssText = 'opacity: 0.8; transform: translateX(-58px);');
|
43
46
|
} else {
|
44
47
|
$header.classList.remove('nav-fixed', 'nav-visible');
|
48
|
+
$rightside && ($rightside.style.cssText = "opacity: ''; transform: ''");
|
45
49
|
}
|
46
50
|
}, 200);
|
47
51
|
window.addEventListener('scroll', (e) => {
|
48
52
|
throttledScroll(e);
|
49
53
|
if (window.scrollY === 0) {
|
50
54
|
$header.classList.remove('nav-fixed', 'nav-visible');
|
55
|
+
$rightside && ($rightside.style.cssText = "opacity: ''; transform: ''");
|
51
56
|
}
|
52
57
|
});
|
53
58
|
|
@@ -656,6 +661,35 @@ class tabs {
|
|
656
661
|
}
|
657
662
|
}
|
658
663
|
|
664
|
+
const scrollFnToDo = () => {
|
665
|
+
const { toc } = PAGE_CONFIG;
|
666
|
+
|
667
|
+
if (toc) {
|
668
|
+
const $cardTocLayout = document.getElementById('card-toc')
|
669
|
+
$cardToc = $cardTocLayout.querySelector('.toc-content')
|
670
|
+
$tocLink = $cardToc.querySelectorAll('.toc-link')
|
671
|
+
$tocPercentage = $cardTocLayout.querySelector('.toc-percentage')
|
672
|
+
isExpand = $cardToc.classList.contains('is-expand')
|
673
|
+
|
674
|
+
// toc percentage
|
675
|
+
const tocItemClickFn = e => {
|
676
|
+
const target = e.target.closest('.toc-link')
|
677
|
+
if (!target) return
|
678
|
+
|
679
|
+
e.preventDefault()
|
680
|
+
utils.scrollToDest(utils.getEleTop(document.getElementById(decodeURI(target.getAttribute('href')).replace('#', ''))), 300)
|
681
|
+
if (window.innerWidth < 900) {
|
682
|
+
$cardTocLayout.classList.remove('open')
|
683
|
+
}
|
684
|
+
}
|
685
|
+
utils.addEventListenerPjax($cardToc, 'click', tocItemClickFn)
|
686
|
+
}
|
687
|
+
}
|
688
|
+
|
689
|
+
const forPostFn = () => {
|
690
|
+
scrollFnToDo()
|
691
|
+
}
|
692
|
+
|
659
693
|
window.refreshFn = () => {
|
660
694
|
const {is_home, is_page, page, is_post} = PAGE_CONFIG;
|
661
695
|
const {runtime, lazyload, lightbox, randomlink, covercolor, post_ai, lure, expire} = GLOBAL_CONFIG;
|
@@ -684,6 +718,8 @@ window.refreshFn = () => {
|
|
684
718
|
if (covercolor.enable) coverColor();
|
685
719
|
if (PAGE_CONFIG.toc) toc.init();
|
686
720
|
if (lure) tabs.lureAddListener();
|
721
|
+
|
722
|
+
forPostFn();
|
687
723
|
}
|
688
724
|
document.addEventListener('DOMContentLoaded', () => {
|
689
725
|
[addCopyright, window.refreshFn, asideStatus, () => window.onscroll = percent, sco.initConsoleState].forEach(fn => fn());
|
package/source/js/right_menu.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
let selectTextNow = "";
|
2
|
+
let firstShowRightMenu = true;
|
2
3
|
const selectText = () => {
|
3
4
|
selectTextNow = document.selection
|
4
5
|
? document.selection.createRange().text
|
@@ -106,6 +107,15 @@ function stopMaskScroll() {
|
|
106
107
|
|
107
108
|
window.oncontextmenu = (ele) => {
|
108
109
|
if (document.body.clientWidth <= 768) return;
|
110
|
+
if (GLOBAL_CONFIG.right_menu.ctrlOriginalMenu) {
|
111
|
+
if (firstShowRightMenu) {
|
112
|
+
firstShowRightMenu = false;
|
113
|
+
utils.snackbarShow(GLOBAL_CONFIG.right_menu.ctrlOriginalMenu, false, 2000);
|
114
|
+
}
|
115
|
+
if (ele.ctrlKey) {
|
116
|
+
return true;
|
117
|
+
}
|
118
|
+
}
|
109
119
|
let x = ele.clientX + 10;
|
110
120
|
let y = ele.clientY;
|
111
121
|
Array.from(rm.menuItems.other).forEach((item) => (item.style.display = "flex"));
|