hexo-theme-solitude 1.4.0 → 1.4.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/_config.yml +66 -15
- package/languages/en-US.yml +3 -2
- package/languages/zh-CN.yml +3 -2
- package/layout/404.pug +1 -1
- package/layout/includes/console.pug +4 -0
- package/layout/includes/head/config.pug +1 -1
- package/layout/includes/head.pug +1 -1
- package/layout/includes/inject/body.pug +6 -5
- package/layout/includes/keyboard.pug +65 -0
- package/layout/includes/layout.pug +4 -0
- package/layout/includes/page/about.pug +1 -1
- package/layout/includes/page/album.pug +56 -0
- package/layout/includes/page/gallery.pug +11 -0
- package/layout/includes/page/links.pug +2 -0
- package/layout/includes/page/moment.pug +28 -0
- package/layout/includes/widgets/page/moments/angle.pug +19 -0
- package/layout/includes/widgets/page/says/json.pug +2 -4
- package/layout/includes/widgets/page/says/local.pug +3 -7
- package/layout/includes/widgets/page/says/memos.pug +2 -4
- package/layout/includes/widgets/third-party/search/algolia-search.pug +20 -15
- package/layout/includes/widgets/third-party/search/local-search.pug +3 -0
- package/layout/page.pug +6 -0
- package/package.json +1 -1
- package/plugins.yml +6 -2
- package/source/css/_global/index.styl +1 -5
- package/source/css/_layout/basic.styl +6 -2
- package/source/css/_mode/index.styl +6 -1
- package/source/css/_page/about/author.styl +94 -0
- package/source/css/_page/about/buff.styl +34 -0
- package/source/css/_page/about/careers.styl +27 -0
- package/source/css/_page/about/contentinfo.styl +78 -0
- package/source/css/_page/about/game.styl +41 -0
- package/source/css/_page/about/index.styl +39 -1
- package/source/css/_page/about/like.styl +29 -0
- package/source/css/_page/about/maxim.styl +23 -0
- package/source/css/_page/about/myphoto.styl +34 -0
- package/source/css/_page/about/oneself.styl +91 -0
- package/source/css/_page/about/personalities.styl +25 -0
- package/source/css/_page/about/reward.styl +113 -0
- package/source/css/_page/about/skills.styl +75 -0
- package/source/css/_page/about/statistic.styl +55 -0
- package/source/css/_page/gallery/index.styl +96 -0
- package/source/css/_page/index.styl +24 -4
- package/source/css/_page/moment.styl +4 -2
- package/source/css/_widgets/_comment/twikoo.styl +20 -17
- package/source/css/_widgets/_mixins/keyboard.styl +59 -0
- package/source/css/_widgets/_search/algolia-search.styl +37 -16
- package/source/css/_widgets/_search/local-search.styl +18 -2
- package/source/css/_widgets/_tags/link.styl +1 -1
- package/source/css/_widgets/index.styl +4 -0
- package/source/css/index.styl +0 -1
- package/source/js/covercolor/api.js +22 -21
- package/source/js/covercolor/local.js +21 -15
- package/source/js/main.js +15 -1
- package/source/js/search/algolia.js +4 -2
- package/source/js/search/local.js +3 -1
- package/source/js/utils.js +1 -1
- package/source/css/_page/about.styl +0 -773
- package/source/img/avatar.png +0 -0
package/_config.yml
CHANGED
@@ -404,7 +404,7 @@ aside:
|
|
404
404
|
errorpage:
|
405
405
|
# 图片
|
406
406
|
# image
|
407
|
-
img: https://
|
407
|
+
img: https://bu.dusays.com/2023/03/03/6401a7906aa4a.gif
|
408
408
|
# 文字
|
409
409
|
# text
|
410
410
|
text: =awa= 页面走丢了
|
@@ -412,10 +412,6 @@ errorpage:
|
|
412
412
|
# Recommended article list
|
413
413
|
recommendList: true
|
414
414
|
|
415
|
-
# 关于页
|
416
|
-
# about page
|
417
|
-
about: false
|
418
|
-
|
419
415
|
# 即刻说说页
|
420
416
|
# jike says page
|
421
417
|
# 前置要求:需配置即刻说说页面
|
@@ -430,8 +426,8 @@ says:
|
|
430
426
|
# 1:张洪heo样式 / 2:Leonus样式
|
431
427
|
# 1: Zhang Hong heo style / 2: Leonus style
|
432
428
|
style: 1
|
433
|
-
#
|
434
|
-
#
|
429
|
+
# 即刻短文仅展示前n条
|
430
|
+
# Jike short text only shows the first n
|
435
431
|
strip: 30
|
436
432
|
# 模式选择。local:本地静态 / json:动态json / memos:动态Memos
|
437
433
|
# Mode selection. Local: local static/JSON: dynamic JSON/memory: dynamic Memos
|
@@ -472,6 +468,27 @@ capsule:
|
|
472
468
|
server: netease # 播放列表的服务商。netease:网易云 / tencent:腾讯 / kugou:酷狗 / xiami:小米 / baidu:百度 : Music service provider. netease: Netease Cloud / tencent: Tencent / kugou: Kugou / xiaomi: Xiaomi / baidu: Baidu
|
473
469
|
type: playlist # 播放列表的类型。song:单曲 / playlist:歌单 / album:专辑 / artist:歌手 : Type of playlist. song: Single / playlist: Playlist / album: Album / artist: Singer
|
474
470
|
|
471
|
+
# 友链鱼塘
|
472
|
+
# Links fish pond
|
473
|
+
moments:
|
474
|
+
enable: false # 是否开启鱼塘 / Whether to enable fish pond
|
475
|
+
api: # https://blog.wzsco.top/circle/ # api地址 / api address
|
476
|
+
error_img: https://bu.dusays.com/2023/11/08/654af68b25bb8.jpg # 加载失败显示图片 / Loading failed display image
|
477
|
+
sort_rule: created # 排序规则:created:按创建时间排序 / updated:按更新时间排序 : Sort rule: created: Sort by creation time / updated: Sort by update time
|
478
|
+
expire_days: 1 # 缓存过期时间(天),默认为1天 / Cache expiration time (days), default is 1 day
|
479
|
+
page_init_number: 10 # 页面初始化加载数量,默认为10条 / Page initialization loading quantity, default is 10
|
480
|
+
page_turning_number: 5 # 页面翻页加载数量,默认为5条 / Page turning loading quantity, default is 5
|
481
|
+
angle: true # 鱼塘随机文章 / Fish pond random article
|
482
|
+
appjs: https://cdn.cbd.int/solitude-source@1.0.3/js/fcircle.min.js # 鱼塘js / Fish pond js
|
483
|
+
bundlejs: https://cdn.cbd.int/solitude-source/js/moment/bundle.min.js # 鱼塘js / Fish pond js
|
484
|
+
randompostjs: https://cdn.cbd.int/solitude-source/js/moment/random_post.min.js # 鱼塘js / Fish pond js
|
485
|
+
|
486
|
+
# 相册
|
487
|
+
# album
|
488
|
+
album:
|
489
|
+
enable: false # 是否开启相册 / Whether to enable album
|
490
|
+
limit: 6 # 单行显示图片数量 / Number of pictures displayed in a single line
|
491
|
+
|
475
492
|
# -------------------------
|
476
493
|
# 文章页、页面配置
|
477
494
|
# post、page settings
|
@@ -546,6 +563,35 @@ post:
|
|
546
563
|
api: https://img2color.wzsco.top/api?img= # api地址 / api address
|
547
564
|
time: 43200000 # api取色间隔(毫秒),默认为12小时 / api color interval (milliseconds), default is 12 hours
|
548
565
|
|
566
|
+
keyboard:
|
567
|
+
enable: false # 是否开启键盘控制 / Whether to enable keyboard control
|
568
|
+
# 键盘控制配置
|
569
|
+
# Keyboard control configuration
|
570
|
+
list:
|
571
|
+
# name: 按键名称
|
572
|
+
# name: Key name
|
573
|
+
# key: 按键
|
574
|
+
# key: Key
|
575
|
+
# func: 方法
|
576
|
+
# func: Function
|
577
|
+
# sco: sco内置方法
|
578
|
+
# sco: sco built-in method
|
579
|
+
# url: 跳转链接
|
580
|
+
# url: Jump link
|
581
|
+
# - name: 关闭快捷键功能
|
582
|
+
# key: K
|
583
|
+
# func: keyboard
|
584
|
+
# - name: 打开中控台
|
585
|
+
# key: A
|
586
|
+
# sco: showConsole
|
587
|
+
# - name: 播放/暂停音乐
|
588
|
+
# key: M
|
589
|
+
# sco: musicToggle
|
590
|
+
# - name: 打开友情链接
|
591
|
+
# key: L
|
592
|
+
# url: '/links/'
|
593
|
+
|
594
|
+
|
549
595
|
# -------------------------
|
550
596
|
# 自定义主题
|
551
597
|
|
@@ -726,6 +772,11 @@ search:
|
|
726
772
|
enable: false
|
727
773
|
# algolia, local
|
728
774
|
type: algolia
|
775
|
+
# 推荐标签
|
776
|
+
# Recommended tags
|
777
|
+
tags:
|
778
|
+
# - Solitude
|
779
|
+
# - Hexo
|
729
780
|
algolia:
|
730
781
|
# hits:
|
731
782
|
# per_page: 6
|
@@ -832,11 +883,11 @@ pwa:
|
|
832
883
|
enable: false
|
833
884
|
manifest: /manifest.json # manifest.json 文件路径
|
834
885
|
theme_color: '#ffffff' # 主题颜色
|
835
|
-
mask_icon: https://cdn.cbd.int/solitude-source
|
836
|
-
apple_touch_icon: https://cdn.cbd.int/solitude-source
|
837
|
-
bookmark_icon: https://cdn.cbd.int/solitude-source
|
838
|
-
favicon_32_32: https://cdn.cbd.int/solitude-source
|
839
|
-
favicon_16_16: https://cdn.cbd.int/solitude-source
|
886
|
+
mask_icon: https://cdn.cbd.int/solitude-source/img/pwa/180.png # 遮罩图标
|
887
|
+
apple_touch_icon: https://cdn.cbd.int/solitude-source/img/pwa/180.png # 苹果触摸图标
|
888
|
+
bookmark_icon: https://cdn.cbd.int/solitude-source/img/pwa/180.png # 书签图标
|
889
|
+
favicon_32_32: https://cdn.cbd.int/solitude-source/img/pwa/32.png # 32x32图标
|
890
|
+
favicon_16_16: https://cdn.cbd.int/solitude-source/img/pwa/16.png # 16x16图标
|
840
891
|
|
841
892
|
# CDN
|
842
893
|
# Don't modify the following settings unless you know how they work
|
@@ -858,9 +909,9 @@ CDN:
|
|
858
909
|
custom_format: https://cdn.staticfile.org/${cdnjs_name}/${version}/${min_cdnjs_file}
|
859
910
|
|
860
911
|
option:
|
861
|
-
scoicon_css: https://cdn.cbd.int/solitude-source
|
862
|
-
waterfall: https://cdn.cbd.int/solitude-source
|
863
|
-
view_image: https://cdn.cbd.int/solitude-source
|
912
|
+
scoicon_css: https://cdn.cbd.int/solitude-source/icon/scoicon.min.css
|
913
|
+
waterfall: https://cdn.cbd.int/solitude-source/js/waterfall.min.js
|
914
|
+
view_image: https://cdn.cbd.int/solitude-source/js/view-image.min.js
|
864
915
|
# algolia_search:
|
865
916
|
# instantsearch:
|
866
917
|
# pjax:
|
package/languages/en-US.yml
CHANGED
@@ -19,7 +19,7 @@ page:
|
|
19
19
|
tags: All tags
|
20
20
|
categories: All categories
|
21
21
|
archives: Archives
|
22
|
-
|
22
|
+
404: Page not found
|
23
23
|
|
24
24
|
home:
|
25
25
|
bannertext: Just browsing
|
@@ -71,7 +71,7 @@ search:
|
|
71
71
|
|
72
72
|
head:
|
73
73
|
noscript: Please enable JavaScript to view the site
|
74
|
-
console: 'Program: Hexo | Theme: Hexo-Theme-Solitude | Author: WangZhuoSco、YiFeng | Github: https://github.com/DuoSco/Hexo-theme-solitude | Version: v1.4.
|
74
|
+
console: 'Program: Hexo | Theme: Hexo-Theme-Solitude | Author: WangZhuoSco、YiFeng | Github: https://github.com/DuoSco/Hexo-theme-solitude | Version: v1.4.2 😄'
|
75
75
|
|
76
76
|
aside:
|
77
77
|
postcount: 'Posts :'
|
@@ -93,6 +93,7 @@ console:
|
|
93
93
|
tag_title: Find interesting areas
|
94
94
|
switch_darkmode: Day and night switching
|
95
95
|
switch_hideAside: Sidebar display control
|
96
|
+
switch_keyboard: Keyboard operation
|
96
97
|
switch_music: Music switch
|
97
98
|
archive_unit: Posts
|
98
99
|
|
package/languages/zh-CN.yml
CHANGED
@@ -19,7 +19,7 @@ page:
|
|
19
19
|
tags: 全部标签
|
20
20
|
categories: 全部分类
|
21
21
|
archives: 文章
|
22
|
-
|
22
|
+
404: 页面没有找到
|
23
23
|
|
24
24
|
nav:
|
25
25
|
site_name_title: 返回博客主页
|
@@ -70,7 +70,7 @@ search:
|
|
70
70
|
|
71
71
|
head:
|
72
72
|
noscript: 开启JavaScript才能访问本站哦~
|
73
|
-
console: '程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:王卓Sco、亦封 | Github: https://github.com/DuoSco/Hexo-theme-solitude | 版本:v1.4.
|
73
|
+
console: '程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:王卓Sco、亦封 | Github: https://github.com/DuoSco/Hexo-theme-solitude | 版本:v1.4.2 😄'
|
74
74
|
|
75
75
|
aside:
|
76
76
|
postcount: '文章总数 :'
|
@@ -92,6 +92,7 @@ console:
|
|
92
92
|
tag_title: 寻找感兴趣的领域
|
93
93
|
switch_darkmode: 昼夜切换
|
94
94
|
switch_hideAside: 边栏显示控制
|
95
|
+
switch_keyboard: 键盘快捷键
|
95
96
|
switch_music: 音乐开关
|
96
97
|
archive_unit: 篇
|
97
98
|
|
package/layout/404.pug
CHANGED
@@ -30,6 +30,10 @@ div#console
|
|
30
30
|
div.console-btn-item#consoleHideAside
|
31
31
|
a.asideSwitch(onclick="sco.switchHideAside()", title=_p('console.switch_hideAside'), href="javascript:void(0);")
|
32
32
|
i.scoicon.sco-side-bar-fill
|
33
|
+
if theme.keyboard.enable
|
34
|
+
div.console-btn-item#consoleKeyboard(onclick="sco.switchKeyboard()")
|
35
|
+
a.keyboardSwitch(title=_p('console.switch_keyboard'), href="javascript:void(0);")
|
36
|
+
i.scoicon.sco-keyboard-box-fill
|
33
37
|
if theme.capsule.enable
|
34
38
|
div.console-btn-item#consoleMusic(onclick="sco.musicToggle()")
|
35
39
|
a.music-switch(title=_p('console.switch_music'), href="javascript:void(0);")
|
package/layout/includes/head.pug
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
- else if (is_archive()) title = _p('page.archives') + (page.year || "")
|
4
4
|
- else if (is_tag()) title = _p('page.tag')+': ' + page.tag
|
5
5
|
- else if (is_category()) title = _p('page.category') +': ' + page.category
|
6
|
-
- else if (page.type === '404') title = '404'
|
6
|
+
- else if (page.type === '404') title = _p('page.404')
|
7
7
|
- else if (page.type === 'tags') title = _p('page.tags')
|
8
8
|
- else if (page.type === 'categories') title = _p('page.categories')
|
9
9
|
- else if (is_post() || is_page()) title = page.title
|
@@ -3,6 +3,9 @@
|
|
3
3
|
div
|
4
4
|
script(src=url_for(theme.cdn.main))
|
5
5
|
|
6
|
+
if theme.album.enable
|
7
|
+
script(src=url_for(theme.cdn.macy_js))
|
8
|
+
|
6
9
|
mixin katex
|
7
10
|
link(rel="stylesheet", href=url_for(theme.cdn.katex))
|
8
11
|
if theme.katex.copytex
|
@@ -84,11 +87,6 @@ div
|
|
84
87
|
if theme.music.enable
|
85
88
|
script(src=url_for(theme.cdn.music_js))
|
86
89
|
|
87
|
-
// gallery
|
88
|
-
if theme.gallery
|
89
|
-
script(src=url_for(theme.cdn.fj_gallery))
|
90
|
-
link(rel="stylesheet", href=url_for(theme.cdn.fj_gallery_css))
|
91
|
-
|
92
90
|
// pace 胶囊加载条(Capsule loading bar)
|
93
91
|
if theme.loading.pace
|
94
92
|
script(src=url_for(theme.cdn.pace_js))
|
@@ -108,6 +106,9 @@ div
|
|
108
106
|
!= item
|
109
107
|
|
110
108
|
div#js-pjax
|
109
|
+
if page.type === 'album' && theme.album.enable
|
110
|
+
script.
|
111
|
+
initGallery()
|
111
112
|
if page.type === 'says' && theme.says.enable
|
112
113
|
script.
|
113
114
|
window.addEventListener('resize', utils.throttle(function () {
|
@@ -0,0 +1,65 @@
|
|
1
|
+
- const list = theme.keyboard.list || []
|
2
|
+
#keyboard-tips
|
3
|
+
.keyboardTitle= '博客快捷键'
|
4
|
+
.keyboardList
|
5
|
+
each item in list
|
6
|
+
.keyboardItem
|
7
|
+
.keyGroup
|
8
|
+
.key= 'Shift'
|
9
|
+
.key= item.key
|
10
|
+
.keyContent
|
11
|
+
.content= item.name
|
12
|
+
script.
|
13
|
+
const keyboard_addKeyup = (e) => {
|
14
|
+
if (e.key === 'Shift') {
|
15
|
+
document.getElementById('keyboard-tips').classList.remove('show');
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
const keyboard_addKeydown = (e) => {
|
20
|
+
const keyboards = !{JSON.stringify(list)};
|
21
|
+
if (e.keyCode === 16) {
|
22
|
+
document.getElementById('keyboard-tips').classList.add('show');
|
23
|
+
}
|
24
|
+
|
25
|
+
for (let i = 0; i < keyboards.length; i++) {
|
26
|
+
if (keyboards[i].url) {
|
27
|
+
if (keyboards[i].url.startsWith('http')) {
|
28
|
+
if (e.key === keyboards[i].key) {
|
29
|
+
window.open(keyboards[i].url);
|
30
|
+
}
|
31
|
+
} else {
|
32
|
+
if (e.key === keyboards[i].key) {
|
33
|
+
pjax.loadUrl(keyboards[i].url);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
} else if (keyboards[i].sco) {
|
37
|
+
if (e.key === keyboards[i].key) {
|
38
|
+
sco[keyboards[i].sco]();
|
39
|
+
}
|
40
|
+
} else if (keyboards[i].func) {
|
41
|
+
if (e.key === keyboards[i].key) {
|
42
|
+
window[keyboards[i].func]();
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
function openKeyboard() {
|
49
|
+
|
50
|
+
window.addEventListener('keyup', keyboard_addKeyup);
|
51
|
+
|
52
|
+
window.addEventListener('keydown', keyboard_addKeydown);
|
53
|
+
}
|
54
|
+
function closeKeyboard() {
|
55
|
+
|
56
|
+
window.removeEventListener('keyup', keyboard_addKeyup);
|
57
|
+
|
58
|
+
window.removeEventListener('keydown', keyboard_addKeydown);
|
59
|
+
}
|
60
|
+
|
61
|
+
var sco_keyboards = localStorage.getItem('keyboard') === 'true'
|
62
|
+
if (sco_keyboards) {
|
63
|
+
openKeyboard();
|
64
|
+
document.getElementById('consoleKeyboard').classList.add('on');
|
65
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
include ../widgets/page/banner
|
2
|
+
|
3
|
+
- var gallery = site.data.gallery.gallery
|
4
|
+
- var album = gallery.find(item => item.album = page.album)
|
5
|
+
- var {limit} = theme.album
|
6
|
+
|
7
|
+
if album
|
8
|
+
#album
|
9
|
+
#sco-container
|
10
|
+
if album.json
|
11
|
+
script.
|
12
|
+
function initGallery() {
|
13
|
+
let macy = Macy({ container: '#sco-container', trueOrder: false, waitForImages: true, margin: 5, columns: !{limit}, breakAt: { 1200: 5, 940: 3, 520: 2, 400: 1 }})
|
14
|
+
macy.runOnImageLoad(function () {
|
15
|
+
setTimeout(function () {
|
16
|
+
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".sco-gallery-item img"));
|
17
|
+
macy.recalculate(true)
|
18
|
+
}, 500);
|
19
|
+
}, true)
|
20
|
+
}
|
21
|
+
(async function () {
|
22
|
+
await fetch('!{url_for(album.json)}')
|
23
|
+
.then(res => res.json())
|
24
|
+
.then(data => {
|
25
|
+
let html = ''
|
26
|
+
data = data.sort((a, b) => b.date - a.date)
|
27
|
+
data.forEach(item => {
|
28
|
+
html += `
|
29
|
+
<div class="sco-gallery-item">
|
30
|
+
<span class="locate">${item.locate}</span>
|
31
|
+
<img class="sco-gallery-image" src="${item.image}" alt="${item.content}">
|
32
|
+
</div>
|
33
|
+
`
|
34
|
+
})
|
35
|
+
document.querySelector('#sco-container').innerHTML = html
|
36
|
+
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
|
37
|
+
initGallery()
|
38
|
+
})
|
39
|
+
})()
|
40
|
+
|
41
|
+
else
|
42
|
+
each item in album.items.sort((a, b) => b.date - a.date)
|
43
|
+
.sco-gallery-item
|
44
|
+
span.locate= item.locate
|
45
|
+
img.sco-gallery-image(src=item.image, alt=item.content)
|
46
|
+
script.
|
47
|
+
function initGallery(){
|
48
|
+
let macy = Macy({ container: '#sco-container', trueOrder: false, waitForImages: true, margin: 5, columns: !{limit}, breakAt: { 1200: 5, 940: 3, 520: 2, 400: 1 }})
|
49
|
+
macy.runOnImageLoad(function () {
|
50
|
+
setTimeout(function () {
|
51
|
+
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".sco-gallery-item img"));
|
52
|
+
macy.recalculate(true)
|
53
|
+
}, 500);
|
54
|
+
}, true)
|
55
|
+
}
|
56
|
+
document.addEventListener('DOMContentLoaded', initGallery);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
include ../widgets/page/banner
|
2
|
+
|
3
|
+
- var gallery = site.data.gallery.gallery
|
4
|
+
|
5
|
+
if theme.album.enable && gallery
|
6
|
+
#gallery
|
7
|
+
each item in gallery
|
8
|
+
.gallery-item(onclick="pjax.loadUrl('/" + item.album + "/')")
|
9
|
+
img.cover(src=item.cover)
|
10
|
+
span.title= item.class_name
|
11
|
+
span.desc= item.descr
|
@@ -0,0 +1,28 @@
|
|
1
|
+
include ../widgets/page/banner
|
2
|
+
if theme.moments.angle
|
3
|
+
include ../widgets/page/moments/angle
|
4
|
+
|
5
|
+
.title-h2-a
|
6
|
+
.title-h2-a-left
|
7
|
+
h2(style="padding-top: 0;margin:0.6rem 0 0.6rem;") 🐟 鱼塘
|
8
|
+
.title-h2-a-right
|
9
|
+
span 以下内容自动生成,未经过审核
|
10
|
+
|
11
|
+
div#hexo-circle-of-friends-root
|
12
|
+
script.
|
13
|
+
let UserConfig = {
|
14
|
+
// 填写你的api地址
|
15
|
+
private_api_url: '!{theme.moments.api}',
|
16
|
+
// 默认加载文章数
|
17
|
+
page_init_number: !{theme.moments.page_init_number},
|
18
|
+
// 点击加载更多时,一次最多加载几篇文章,默认10
|
19
|
+
page_turning_number: !{theme.moments.page_turning_number},
|
20
|
+
// 头像加载失败时,默认头像地址
|
21
|
+
error_img: '!{theme.moments.error_img}',
|
22
|
+
// 进入页面时第一次的排序规则
|
23
|
+
sort_rule: '!{theme.moments.sort_rule}',
|
24
|
+
// 本地文章缓存数据过期时间(天)
|
25
|
+
expire_days: !{theme.moments.expire_days},
|
26
|
+
}
|
27
|
+
script(src=url_for(theme.moments.appjs))
|
28
|
+
script(src=url_for(theme.moments.bundlejs))
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.title-h2-a
|
2
|
+
.title-h2-a-left
|
3
|
+
h2(style="padding-top: 0;margin:0.6rem 0 0.6rem;") 🎣 钓鱼
|
4
|
+
a#random-post-start(href="javascript:fetchRandomPost();", style="transition-duration: 0.3s; transform: rotate(63000deg); opacity: 1;", data-pjax-state="")
|
5
|
+
i.scoicon.sco-restart-line
|
6
|
+
.title-h2-a-right
|
7
|
+
if page.type !== 'links'
|
8
|
+
a.random-post-all(href="/links/", data-pjax-state="") 全部友链
|
9
|
+
|
10
|
+
#random-post
|
11
|
+
|
12
|
+
script.
|
13
|
+
var fdata = {
|
14
|
+
apiurl: "#{theme.moments.api}",
|
15
|
+
defaultFish: 100,
|
16
|
+
hungryFish: 100,
|
17
|
+
}
|
18
|
+
|
19
|
+
script(src=url_for(theme.moments.randompostjs))
|
@@ -2,11 +2,10 @@ case theme.says.style
|
|
2
2
|
when 1
|
3
3
|
script.
|
4
4
|
!async function () {
|
5
|
-
let say_strip = !{theme.says.strip}
|
6
5
|
await fetch('!{url_for(theme.says.mode_link)}')
|
7
6
|
.then(res => res.json())
|
8
7
|
.then(res => {
|
9
|
-
let list =
|
8
|
+
let list = res.slice(0, !{theme.says.strip})
|
10
9
|
let aplayer = null
|
11
10
|
let video = null
|
12
11
|
let imageBox = null
|
@@ -43,11 +42,10 @@ case theme.says.style
|
|
43
42
|
when 2
|
44
43
|
script.
|
45
44
|
!async function () {
|
46
|
-
let say_strip = !{theme.says.strip}
|
47
45
|
await fetch('!{url_for(theme.says.mode_link)}')
|
48
46
|
.then(res => res.json())
|
49
47
|
.then(res => {
|
50
|
-
let list =
|
48
|
+
let list = res.slice(0, !{theme.says.strip})
|
51
49
|
let aplayer = null
|
52
50
|
let video = null
|
53
51
|
let imageBox = null
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
- var limitedList = site.data.essay.essay_list
|
3
|
-
else
|
4
|
-
- var limitedList = site.data.essay.essay_list.slice(0, theme.says.strip)
|
5
|
-
each item in limitedList
|
1
|
+
each item in site.data.essay.essay_list.slice(0, theme.says.strip)
|
6
2
|
li.item
|
7
3
|
if theme.says.style === 2
|
8
4
|
.meta
|
@@ -30,7 +26,7 @@ each item in limitedList
|
|
30
26
|
if item.video.player
|
31
27
|
video(src=item.video.player controls="controls" style="object-fit: cover;")
|
32
28
|
if item.video.bilibili
|
33
|
-
iframe(src='//player.bilibili.com/player.html?
|
29
|
+
iframe(src='//player.bilibili.com/player.html?auto-play=0&bvid=' + item.video.bilibili scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true")
|
34
30
|
|
35
31
|
if theme.says.style === 1
|
36
32
|
hr
|
@@ -45,4 +41,4 @@ each item in limitedList
|
|
45
41
|
| 链接
|
46
42
|
if item.content
|
47
43
|
a.bber-reply(onclick=`sco.toTalk('${item.content}')`)
|
48
|
-
i.scoicon.sco-chat-fill
|
44
|
+
i.scoicon.sco-chat-fill
|
@@ -2,7 +2,6 @@ case theme.says.style
|
|
2
2
|
when 1
|
3
3
|
script.
|
4
4
|
!async function () {
|
5
|
-
let say_strip = !{theme.says.strip};
|
6
5
|
let aplayerRegex = /{aplayer,(.*?),(.*?)}/g;
|
7
6
|
let linkRegex = /(?<!\!)\[([^\]]*)\]\(([^\)]*)\)/g;
|
8
7
|
let bilibiliRegex = /{bilibili,(.*?)}/g;
|
@@ -13,7 +12,7 @@ case theme.says.style
|
|
13
12
|
await fetch("!{url_for(theme.says.mode_link)}")
|
14
13
|
.then(res => res.json())
|
15
14
|
.then(data => {
|
16
|
-
let list =
|
15
|
+
let list = data.slice(0, !{theme.says.strip});
|
17
16
|
let aplayer = null;
|
18
17
|
let video = null;
|
19
18
|
let imageBox = null;
|
@@ -59,7 +58,6 @@ case theme.says.style
|
|
59
58
|
when 2
|
60
59
|
script.
|
61
60
|
!async function () {
|
62
|
-
let say_strip = !{theme.says.strip};
|
63
61
|
let aplayerRegex = /{aplayer,(.*?),(.*?)}/g;
|
64
62
|
let bilibiliRegex = /{bilibili,(.*?)}/g;
|
65
63
|
let playerRegex = /{player,(.*?)}/g;
|
@@ -69,7 +67,7 @@ case theme.says.style
|
|
69
67
|
await fetch("!{url_for(theme.says.mode_link)}")
|
70
68
|
.then(res => res.json())
|
71
69
|
.then(data => {
|
72
|
-
let list =
|
70
|
+
let list = data.slice(0, !{theme.says.strip})
|
73
71
|
let aplayer = null;
|
74
72
|
let video = null;
|
75
73
|
let imageBox = null;
|
@@ -1,15 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
1
|
+
#algolia-search
|
2
|
+
.search-dialog
|
3
|
+
.algolia-navbar
|
4
|
+
.search-dialog__title#algolia-search-title=__('nav.search')
|
5
|
+
.algolia-tips
|
6
|
+
i.scoicon.sco-algolia-fill
|
7
|
+
span.algolia-tips-text='Algolia'
|
8
|
+
span.search-close-button
|
9
|
+
i.scoicon.sco-close-fill
|
10
|
+
#algolia-input-panel
|
11
|
+
#algolia-search-input
|
12
|
+
#search-results
|
13
|
+
#algolia-hits
|
14
|
+
each tag in theme.search.tags || []
|
15
|
+
a.tag-list(href='/tags/' + tag + '/')=tag
|
16
|
+
|
17
|
+
#algolia-tips
|
18
|
+
#algolia-pagination
|
19
|
+
#algolia-stats
|
20
|
+
#search-mask
|
@@ -8,6 +8,9 @@
|
|
8
8
|
div.search-box
|
9
9
|
input.search-box-input#search-input(type="text", autocomplete="off", spellcheck="false", autocorrect="off", autocapitalize="off", placeholder=__('search.placeholder'))
|
10
10
|
div#search-results
|
11
|
+
#search-hits
|
12
|
+
each tag in theme.search.tags || []
|
13
|
+
a.tag-list(href='/tags/' + tag + '/')=tag
|
11
14
|
div#search-pagination
|
12
15
|
div#search-tips
|
13
16
|
div#search-mask
|
package/layout/page.pug
CHANGED
@@ -20,11 +20,17 @@ block content
|
|
20
20
|
include includes/page/equipment
|
21
21
|
when 'rss'
|
22
22
|
include includes/page/rss
|
23
|
+
when 'moment'
|
24
|
+
include includes/page/moment
|
23
25
|
when 'douban'
|
24
26
|
include includes/widgets/page/banner
|
25
27
|
include includes/page/default
|
26
28
|
when 'music'
|
27
29
|
include includes/page/music
|
30
|
+
when 'gallery'
|
31
|
+
include includes/page/gallery
|
32
|
+
when 'album'
|
33
|
+
include includes/page/album
|
28
34
|
default
|
29
35
|
include includes/page/default
|
30
36
|
if page.comment
|
package/package.json
CHANGED
package/plugins.yml
CHANGED
@@ -13,7 +13,7 @@ pjax:
|
|
13
13
|
twikoo:
|
14
14
|
name: twikoo
|
15
15
|
file: dist/twikoo.all.min.js
|
16
|
-
version: 1.6.
|
16
|
+
version: 1.6.31
|
17
17
|
waline_js:
|
18
18
|
name: '@waline/client'
|
19
19
|
file: dist/waline.js
|
@@ -106,4 +106,8 @@ fancyapps_ui:
|
|
106
106
|
fancyapps_css:
|
107
107
|
name: fancyapps-ui
|
108
108
|
file: dist/fancybox/fancybox.min.css
|
109
|
-
version: 5.0.33
|
109
|
+
version: 5.0.33
|
110
|
+
macy_js:
|
111
|
+
name: macy
|
112
|
+
file: dist/macy.min.js
|
113
|
+
version: 2.5.1
|