hexo-theme-solitude 1.3.0 → 1.4.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/.github/FUNDING.yml +13 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +107 -0
- package/.github/ISSUE_TEMPLATE/config.yml +13 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +14 -0
- package/.github/workflows/npm-publish.yml +21 -0
- package/CONTRIBUTING.md +0 -0
- package/LICENSE +0 -0
- package/README.md +60 -43
- package/README_EN.md +60 -42
- package/_config.yml +606 -444
- package/languages/en-US.yml +3 -23
- package/languages/zh-CN.yml +3 -23
- package/layout/404.pug +0 -0
- package/layout/archive.pug +2 -3
- package/layout/category.pug +0 -0
- package/layout/includes/body/mode.pug +35 -0
- package/layout/includes/console.pug +3 -3
- package/layout/includes/footer.pug +16 -15
- package/layout/includes/head/config.pug +38 -30
- package/layout/includes/head/opengraph.pug +0 -0
- package/layout/includes/head/pwa.pug +5 -44
- package/layout/includes/head.pug +3 -1
- package/layout/includes/header.pug +0 -0
- package/layout/includes/inject/body.pug +115 -63
- package/layout/includes/inject/head.pug +11 -46
- package/layout/includes/layout.pug +1 -1
- package/layout/includes/loading.pug +0 -0
- package/layout/includes/mixins/articleSort.pug +0 -0
- package/layout/includes/mixins/pagination.pug +0 -0
- package/layout/includes/nav.pug +1 -1
- package/layout/includes/page/about.pug +1 -1
- package/layout/includes/page/categories.pug +0 -0
- package/layout/includes/page/default.pug +0 -0
- package/layout/includes/page/equipment.pug +0 -0
- package/layout/includes/page/links.pug +2 -2
- package/layout/includes/page/music.pug +0 -0
- package/layout/includes/page/not_configured.pug +0 -0
- package/layout/includes/page/rss.pug +3 -3
- package/layout/includes/page/says.pug +15 -15
- package/layout/includes/page/tags.pug +0 -0
- package/layout/includes/page/tlink.pug +1 -0
- package/layout/includes/recent-posts.pug +0 -0
- package/layout/includes/sidebar.pug +0 -0
- package/layout/includes/widgets/aside/aside.pug +6 -6
- package/layout/includes/widgets/aside/asideAllInfo.pug +0 -0
- package/layout/includes/widgets/aside/asideArchive.pug +0 -0
- package/layout/includes/widgets/aside/asideCustom.pug +1 -1
- package/layout/includes/widgets/aside/asideFlipCard.pug +0 -0
- package/layout/includes/widgets/aside/asideInfoCard.pug +3 -3
- package/layout/includes/widgets/aside/asideNewestPost.pug +0 -0
- package/layout/includes/widgets/aside/asideSwitch.pug +0 -4
- package/layout/includes/widgets/aside/asideTag.pug +1 -1
- package/layout/includes/widgets/aside/asideToc.pug +0 -0
- package/layout/includes/widgets/aside/asideWebInfo.pug +2 -2
- package/layout/includes/widgets/home/banner.pug +0 -0
- package/layout/includes/widgets/home/bb/json.pug +22 -0
- package/layout/includes/widgets/home/bb/local.pug +17 -0
- package/layout/includes/widgets/home/bb/memos.pug +25 -0
- package/layout/includes/widgets/home/bbTimeList.pug +11 -7
- package/layout/includes/widgets/home/categoryBar.pug +0 -0
- package/layout/includes/widgets/home/categoryGroup.pug +1 -1
- package/layout/includes/widgets/home/hometop.pug +0 -0
- package/layout/includes/widgets/home/postList.pug +0 -0
- package/layout/includes/widgets/home/topGroup.pug +0 -0
- package/layout/includes/widgets/nav/left.pug +0 -0
- package/layout/includes/widgets/nav/menu.pug +1 -1
- package/layout/includes/widgets/nav/right.pug +6 -5
- package/layout/includes/widgets/page/about/authorinfo.pug +10 -9
- package/layout/includes/widgets/page/about/award.pug +0 -0
- package/layout/includes/widgets/page/about/contentinfo.pug +35 -34
- package/layout/includes/widgets/page/about/hobbies.pug +21 -17
- package/layout/includes/widgets/page/about/motto.pug +17 -16
- package/layout/includes/widgets/page/about/other.pug +16 -16
- package/layout/includes/widgets/page/about/personalities.pug +15 -14
- package/layout/includes/widgets/page/about/skillsinfo.pug +37 -36
- package/layout/includes/widgets/page/about/tenyear.pug +0 -0
- package/layout/includes/widgets/page/banner.pug +9 -3
- package/layout/includes/widgets/page/equipment/content.pug +0 -0
- package/layout/includes/widgets/page/links/banner.pug +14 -12
- package/layout/includes/widgets/page/links/linksCard.pug +4 -6
- package/layout/includes/widgets/page/links/linksDiscn.pug +8 -0
- package/layout/includes/widgets/page/links/linksItem.pug +4 -6
- package/layout/includes/widgets/page/says/json.pug +80 -0
- package/layout/includes/widgets/page/says/local.pug +48 -0
- package/layout/includes/widgets/page/says/memos.pug +109 -0
- package/layout/includes/widgets/post/award.pug +0 -0
- package/layout/includes/widgets/post/copyright.pug +2 -2
- package/layout/includes/widgets/post/post-ai.pug +12 -0
- package/layout/includes/widgets/post/postMeta.pug +2 -2
- package/layout/includes/widgets/post/postNav.pug +0 -0
- package/layout/includes/widgets/post/wave.pug +0 -0
- package/layout/includes/widgets/randomlink.pug +1 -1
- package/layout/includes/widgets/rightside/index.pug +6 -5
- package/layout/includes/widgets/third-party/comments/comment.pug +1 -5
- package/layout/includes/widgets/third-party/comments/twikoo.pug +1 -1
- package/layout/includes/widgets/third-party/comments/waline.pug +9 -11
- package/layout/includes/widgets/third-party/music.pug +1 -1
- package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +6 -0
- package/layout/includes/widgets/third-party/news-comment/twikoo.pug +70 -0
- package/layout/includes/widgets/third-party/news-comment/waline.pug +64 -0
- package/layout/includes/widgets/third-party/pjax.pug +0 -0
- package/layout/includes/widgets/third-party/search/algolia-search.pug +0 -0
- package/layout/includes/widgets/third-party/search/index.pug +8 -7
- package/layout/includes/widgets/third-party/search/local-search.pug +0 -0
- package/layout/index.pug +3 -3
- package/layout/page.pug +0 -4
- package/layout/post.pug +2 -2
- package/layout/tag.pug +0 -0
- package/package.json +18 -9
- package/plugins.yml +109 -0
- package/scripts/event/cdn.js +129 -0
- package/scripts/event/init.js +0 -0
- package/scripts/event/page.js +1 -21
- package/scripts/event/welcome.js +1 -1
- package/scripts/filter/checkThemeConfig.js +0 -0
- package/scripts/filter/default.js +0 -0
- package/scripts/filter/lazyload.js +1 -1
- package/scripts/filter/randomPosts.js +0 -0
- package/scripts/helper/cdn.js +0 -0
- package/scripts/helper/getArchiveLength.js +0 -0
- package/scripts/helper/page.js +0 -0
- package/scripts/helper/related_post.js +0 -0
- package/scripts/helper/stylus.js +0 -0
- package/scripts/tags/button.js +0 -0
- package/scripts/tags/bvideo.js +0 -0
- package/scripts/tags/card.js +0 -0
- package/scripts/tags/checkbox.js +0 -0
- package/scripts/tags/fold.js +0 -0
- package/scripts/tags/image.js +0 -0
- package/scripts/tags/inline-image.js +0 -0
- package/scripts/tags/label.js +0 -0
- package/scripts/tags/link.js +0 -0
- package/scripts/tags/media.js +0 -0
- package/scripts/tags/note.js +0 -0
- package/scripts/tags/span.js +0 -0
- package/scripts/tags/tabs.js +0 -0
- package/scripts/tags/timeline.js +0 -0
- package/scripts/tags/u.js +0 -0
- package/source/css/_global/animation.css +0 -0
- package/source/css/_global/function.styl +42 -42
- package/source/css/_global/index.styl +1 -1
- package/source/css/_global/var.styl +0 -0
- package/source/css/_layout/basic.styl +10 -12
- package/source/css/_layout/header.styl +8 -3
- package/source/css/_layout/index.styl +59 -5
- package/source/css/_mode/index.styl +0 -0
- package/source/css/_page/_home/category-bar.styl +0 -0
- package/source/css/_page/_home/home-top.styl +10 -31
- package/source/css/_page/_home/index.styl +0 -0
- package/source/css/_page/_home/pagination.styl +3 -0
- package/source/css/_page/_home/recent-post.styl +10 -3
- package/source/css/_page/about/index.styl +0 -0
- package/source/css/_page/about/tenyear.styl +0 -0
- package/source/css/_page/about.styl +9 -0
- package/source/css/_page/category.styl +0 -0
- package/source/css/_page/douban.styl +0 -1
- package/source/css/_page/equipment.styl +0 -0
- package/source/css/_page/error.styl +0 -0
- package/source/css/_page/home.styl +0 -0
- package/source/css/_page/index.styl +2 -3
- package/source/css/_page/links.styl +85 -49
- package/source/css/_page/moment.styl +0 -0
- package/source/css/_page/music.styl +1 -1
- package/source/css/_page/rss.styl +0 -0
- package/source/css/_page/says.styl +10 -0
- package/source/css/_page/tag.styl +0 -0
- package/source/css/_widgets/_aside/allinfo.styl +34 -0
- package/source/css/_widgets/_aside/flip.styl +0 -0
- package/source/css/_widgets/_aside/index.styl +1 -7
- package/source/css/_widgets/_aside/info.styl +0 -0
- package/source/css/_widgets/_aside/newPost.styl +0 -0
- package/source/css/_widgets/_aside/toc.styl +0 -0
- package/source/css/_widgets/_aside/welcome.styl +0 -0
- package/source/css/_widgets/_comment/index.styl +0 -0
- package/source/css/_widgets/_comment/twikoo.styl +0 -2
- package/source/css/_widgets/_comment/waline.styl +0 -0
- package/source/css/_widgets/_extra/console.styl +0 -0
- package/source/css/_widgets/_extra/fullpage.styl +0 -0
- package/source/css/_widgets/_extra/music.styl +1 -1
- package/source/css/_widgets/_extra/pace.styl +0 -0
- package/source/css/_widgets/_extra/rightmenu.styl +0 -0
- package/source/css/_widgets/_mixins/article-sort.styl +0 -0
- package/source/css/_widgets/_mixins/footer.styl +1 -2
- package/source/css/_widgets/_mixins/other.styl +0 -4
- package/source/css/_widgets/_mixins/sidebar.styl +0 -0
- package/source/css/_widgets/_post/_highlight/diff.styl +0 -0
- package/source/css/_widgets/_post/_highlight/index.styl +0 -1
- package/source/css/_widgets/_post/_highlight/theme/default.styl +0 -0
- package/source/css/_widgets/_post/_highlight/theme/mac.styl +0 -0
- package/source/css/_widgets/_post/_highlight/theme.styl +0 -0
- package/source/css/_widgets/_post/commentBarrage.styl +0 -0
- package/source/css/_widgets/_post/content.styl +42 -11
- package/source/css/_widgets/_post/copyright.styl +0 -0
- package/source/css/_widgets/_post/index.styl +1 -1
- package/source/css/_widgets/_post/meta.styl +0 -3
- package/source/css/_widgets/_post/pagination.styl +1 -1
- package/source/css/_widgets/_post/postAI.styl +0 -0
- package/source/css/_widgets/_post/relatedPost.styl +0 -0
- package/source/css/_widgets/_post/tools.styl +0 -0
- package/source/css/_widgets/_search/algolia-search.styl +0 -0
- package/source/css/_widgets/_search/local-search.styl +0 -0
- package/source/css/_widgets/_tags/button.styl +0 -0
- package/source/css/_widgets/_tags/bvideo.styl +0 -0
- package/source/css/_widgets/_tags/card.styl +0 -0
- package/source/css/_widgets/_tags/checkbox.styl +0 -0
- package/source/css/_widgets/_tags/fold.styl +0 -0
- package/source/css/_widgets/_tags/image.styl +0 -0
- package/source/css/_widgets/_tags/index.styl +0 -0
- package/source/css/_widgets/_tags/inline-image.styl +0 -0
- package/source/css/_widgets/_tags/label.styl +0 -0
- package/source/css/_widgets/_tags/link.styl +4 -2
- package/source/css/_widgets/_tags/note.styl +0 -0
- package/source/css/_widgets/_tags/span.styl +0 -0
- package/source/css/_widgets/_tags/tabs.styl +0 -0
- package/source/css/_widgets/_tags/timeline.styl +0 -1
- package/source/css/_widgets/index.styl +4 -4
- package/source/css/index.styl +0 -0
- package/source/img/avatar.png +0 -0
- package/source/img/default.png +0 -0
- package/source/img/error_load.png +0 -0
- package/source/js/{extend/comment/twikoo/commentBarrage.js → comment/twikoo_commentBarrage.js} +0 -0
- package/source/js/{extend/comment/waline/commentBarrage.js → comment/waline_commentBarrage.js} +0 -0
- package/source/js/covercolor/api.js +95 -0
- package/source/js/covercolor/local.js +154 -0
- package/source/js/main.js +28 -252
- package/source/js/music.js +0 -0
- package/source/js/rightside.js +404 -0
- package/source/js/{extend/search/algolia-search.js → search/algolia.js} +10 -0
- package/source/js/{extend/search/local-search.js → search/local.js} +24 -2
- package/source/js/utils.js +75 -1
- package/layout/includes/head/fest.pug +0 -22
- package/layout/includes/page/echarts.pug +0 -7
- package/layout/includes/page/moments.pug +0 -4
- package/layout/includes/widgets/aside/asideHistory.pug +0 -8
- package/layout/includes/widgets/aside/asideWelcome.pug +0 -12
- package/layout/includes/widgets/page/moments/angle.pug +0 -19
- package/layout/includes/widgets/page/moments/index.pug +0 -23
- package/layout/includes/widgets/page/says/saysBottom.pug +0 -11
- package/layout/includes/widgets/page/says/saysContent.pug +0 -6
- package/layout/includes/widgets/page/says/saysFunction.pug +0 -10
- package/layout/includes/widgets/page/says/saysMeta.pug +0 -7
- package/layout/includes/widgets/third-party/ai/index.pug +0 -12
- package/layout/includes/widgets/third-party/comments/gitalk.pug +0 -0
- package/layout/includes/widgets/third-party/comments/valine.pug +0 -0
- package/scripts/helper/echarts.js +0 -407
- package/source/css/_widgets/_aside/history.styl +0 -42
- package/source/js/extend/comment/twikoo/twikoo.js +0 -67
- package/source/js/extend/comment/waline/waline.js +0 -60
- package/source/lib/bundle.min.js +0 -27
- package/source/lib/circle.min.js +0 -1
- package/source/lib/cover-color.min.js +0 -7
- package/source/lib/friends_post.js +0 -4
- package/source/lib/lazyload.min.js +0 -1
- package/source/lib/rightside.min.js +0 -1
- package/source/lib/snackbar.min.css +0 -1
- package/source/lib/snackbar.min.js +0 -9
- package/source/lib/txmap.min.js +0 -1
- package/source/lib/view-image.min.js +0 -6
- package/source/lib/waterfall.min.js +0 -1
- /package/source/{lib → js}/sco-ai.min.js +0 -0
@@ -1,29 +1,124 @@
|
|
1
|
-
- cdn = theme.cdn.body
|
2
1
|
- page.type = is_post() ? 'post' : page.type
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
div
|
4
|
+
script(src=url_for(theme.cdn.main))
|
5
|
+
|
6
|
+
mixin katex
|
7
|
+
link(rel="stylesheet", href=url_for(theme.cdn.katex))
|
8
|
+
if theme.katex.copytex
|
9
|
+
script(src=url_for(theme.cdn.katex_copytex))
|
10
|
+
script.
|
11
|
+
(() => {
|
12
|
+
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
|
13
|
+
utils.wrap(item, 'div', {class: 'katex-wrap'})
|
14
|
+
})
|
15
|
+
})()
|
16
|
+
|
17
|
+
if theme.katex && theme.katex.enable
|
18
|
+
if theme.katex.per_page
|
19
|
+
if is_post() || is_page()
|
20
|
+
+katex
|
21
|
+
else
|
22
|
+
if page.katex
|
23
|
+
+katex
|
24
|
+
|
25
|
+
script(src=url_for(theme.cdn.pjax))
|
26
|
+
if theme.lazyload.enable
|
27
|
+
script(src=url_for(theme.cdn.lazyload))
|
28
|
+
script(src=url_for(theme.cdn.snackbar))
|
29
|
+
if theme.lightbox
|
30
|
+
if theme.mediumZoom
|
31
|
+
script(src=url_for(theme.cdn.medium_zoom))
|
32
|
+
if theme.fancybox
|
33
|
+
script(src=url_for(theme.cdn.fancyapps_ui))
|
34
|
+
if theme.says.home_mini
|
35
|
+
script(src=url_for(theme.cdn.swiper_js))
|
36
|
+
|
37
|
+
if theme.rightside.enable
|
38
|
+
include ../widgets/rightside/index
|
39
|
+
script(src=url_for(theme.cdn.rightside_js))
|
40
|
+
|
41
|
+
// post-ai)
|
42
|
+
if theme.post_ai.enable
|
43
|
+
script(src=url_for(theme.cdn.sco_ai_js))
|
44
|
+
|
45
|
+
if theme.capsule.enable || theme.music.enable
|
46
|
+
script(src=url_for(theme.cdn.aplayer_js))
|
47
|
+
script(src=url_for(theme.cdn.meting_js))
|
48
|
+
script.
|
49
|
+
const meting_api = '!{theme.meting_api}';
|
50
|
+
|
51
|
+
if theme.post.covercolor.enable
|
52
|
+
case theme.post.covercolor.mode
|
53
|
+
when 'local'
|
54
|
+
script(src=url_for(theme.cdn.cover_local))
|
55
|
+
when 'api'
|
56
|
+
script.
|
57
|
+
const coverColorConfig = {
|
58
|
+
api: '!{theme.post.covercolor.api}',
|
59
|
+
time: !{theme.post.covercolor.time},
|
60
|
+
}
|
61
|
+
script(src=url_for(theme.cdn.cover_api))
|
62
|
+
|
63
|
+
// waterfall
|
64
|
+
if theme.says.enable
|
65
|
+
script(src=url_for(theme.cdn.waterfall))
|
66
|
+
|
67
|
+
// comment
|
68
|
+
if theme.comment.enable
|
69
|
+
case theme.comment.type
|
70
|
+
when 'twikoo'
|
71
|
+
script(src=url_for(theme.cdn.twikoo))
|
72
|
+
when 'waline'
|
73
|
+
script(src=url_for(theme.cdn.waline_js))
|
74
|
+
link(rel="stylesheet", href=url_for(theme.cdn.waline_css))
|
75
|
+
|
76
|
+
if theme.comment.commentBarrage
|
77
|
+
case theme.comment.type
|
78
|
+
when 'twikoo'
|
79
|
+
script(src=url_for(theme.cdn.twikoo_commentBarrage))
|
80
|
+
when 'waline'
|
81
|
+
script(src=url_for(theme.cdn.waline_commentBarrage))
|
82
|
+
|
83
|
+
// music
|
84
|
+
if theme.music.enable
|
85
|
+
script(src=url_for(theme.cdn.music_js))
|
86
|
+
|
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
|
+
// pace 胶囊加载条(Capsule loading bar)
|
93
|
+
if theme.loading.pace
|
94
|
+
script(src=url_for(theme.cdn.pace_js))
|
95
|
+
|
96
|
+
// search
|
97
|
+
if theme.search.enable
|
98
|
+
case theme.search.type
|
99
|
+
when 'algolia'
|
100
|
+
script(src=url_for(theme.cdn.instantsearch))
|
101
|
+
script(src=url_for(theme.cdn.algolia_search))
|
102
|
+
when 'local'
|
103
|
+
script(src=url_for(theme.cdn.lunr_js))
|
104
|
+
|
105
|
+
// inject custom body
|
106
|
+
if theme.extends.body
|
107
|
+
each item in theme.extends.body
|
108
|
+
!= item
|
16
109
|
|
17
110
|
div#js-pjax
|
18
|
-
if page.type === 'says'
|
111
|
+
if page.type === 'says' && theme.says.enable
|
19
112
|
script.
|
20
113
|
window.addEventListener('resize', utils.throttle(function () {
|
21
114
|
if (document.getElementById('waterfall')) {
|
22
115
|
sco.reflashEssayWaterFall();
|
23
116
|
}
|
24
117
|
}), 500);
|
25
|
-
|
26
|
-
|
118
|
+
sco.reflashEssayWaterFall();
|
119
|
+
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
120
|
+
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
121
|
+
script(async src=url_for(theme.cdn.busuanzi_js))
|
27
122
|
|
28
123
|
script#config-diff.
|
29
124
|
var PAGE_CONFIG = {
|
@@ -35,57 +130,14 @@ div#js-pjax
|
|
35
130
|
comment: !{!!page.comment},
|
36
131
|
}
|
37
132
|
|
38
|
-
// post-ai)
|
39
|
-
if theme.thirdparty.ai.enable
|
40
|
-
script(src=cdn_url_for("/lib/sco-ai.min.js"))
|
41
|
-
|
42
|
-
if theme.thirdparty.aplayer.enable || theme.music.enable
|
43
|
-
script(src=url_for(cdn.aplayerjs))
|
44
|
-
script(src=url_for(cdn.metingjs))
|
45
|
-
script.
|
46
|
-
const meting_api = '!{theme.thirdparty.aplayer.api}';
|
47
|
-
|
48
|
-
if theme.post.covercolor.enable
|
49
|
-
script.
|
50
|
-
const coverColorConfig = {
|
51
|
-
mode: '!{theme.post.covercolor.mode}',
|
52
|
-
api: '!{theme.post.covercolor.api}',
|
53
|
-
time: !{theme.post.covercolor.time},
|
54
|
-
}
|
55
|
-
script(src=cdn_url_for("/lib/cover-color.min.js"))
|
56
|
-
|
57
133
|
if theme.footer.randomlink
|
58
134
|
include ../widgets/randomlink.pug
|
59
135
|
|
60
|
-
|
61
|
-
|
62
|
-
script(src=url_for(cdn.katexjs))
|
63
|
-
|
64
|
-
if theme.aside.welcome.enable
|
65
|
-
script(src=cdn_url_for("/lib/txmap.min.js"))
|
66
|
-
|
67
|
-
// waterfall
|
68
|
-
if theme.says.enable
|
69
|
-
script(src=cdn_url_for("/lib/waterfall.min.js"))
|
70
|
-
|
71
|
-
if theme.comment.enable
|
72
|
-
case theme.comment.type
|
73
|
-
when 'twikoo'
|
74
|
-
script(src=cdn_url_for("/js/extend/comment/twikoo/twikoo.js"))
|
75
|
-
script(src=cdn_url_for("/js/extend/comment/twikoo/commentBarrage.js"))
|
76
|
-
when 'waline'
|
77
|
-
script(src=cdn_url_for("/js/extend/comment/waline/waline.js"))
|
78
|
-
script(src=cdn_url_for("/js/extend/comment/waline/commentBarrage.js"))
|
79
|
-
|
136
|
+
// newest comment
|
137
|
+
include ../widgets/third-party/news-comment/newest-comment.pug
|
80
138
|
|
81
139
|
// pjax
|
82
140
|
include ../widgets/third-party/pjax.pug
|
83
141
|
|
84
|
-
//
|
85
|
-
|
86
|
-
script(src=cdn_url_for("/js/music.js"))
|
87
|
-
|
88
|
-
// inject custom body
|
89
|
-
if theme.extends.body
|
90
|
-
each item in theme.extends.body
|
91
|
-
!= item
|
142
|
+
// theme
|
143
|
+
include ../body/mode
|
@@ -1,53 +1,19 @@
|
|
1
|
-
|
1
|
+
each item in theme.verify_site || []
|
2
|
+
meta(name=item.name, content=item.content)
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
if theme.verify.google
|
7
|
-
meta(name="google-site-verification", content=theme.verify.google)
|
8
|
-
|
9
|
-
if theme.verify.sougou
|
10
|
-
meta(name="sogou_site_verification", content=theme.verify.sougou)
|
11
|
-
|
12
|
-
link(rel="stylesheet", href=cdn.scoicon)
|
13
|
-
link(rel="stylesheet", href=cdn_url_for("/lib/snackbar.min.css"))
|
14
|
-
|
15
|
-
// comment
|
16
|
-
if theme.comment.enable
|
17
|
-
case theme.comment.type
|
18
|
-
when 'twikoo'
|
19
|
-
script(src=cdn.twikoojs)
|
20
|
-
when 'waline'
|
21
|
-
script(src=cdn.walinejs)
|
22
|
-
link(rel="stylesheet", href=cdn.walinecss)
|
23
|
-
|
24
|
-
// pace 胶囊加载条(Capsule loading bar)
|
25
|
-
if theme.loading.pace
|
26
|
-
script(src=cdn.pacejs)
|
27
|
-
|
28
|
-
// search
|
29
|
-
if theme.thirdparty.search.enable
|
30
|
-
if theme.thirdparty.search.type === 'algolia'
|
31
|
-
script(src=url_for(cdn.instantsearch))
|
32
|
-
script(src=url_for(cdn.algoliajs))
|
33
|
-
else if theme.thirdparty.search.type === 'local'
|
34
|
-
script(src=url_for(cdn.lunrjs))
|
4
|
+
link(rel="stylesheet", href=url_for(theme.cdn.scoicon_css))
|
5
|
+
link(rel="stylesheet", href=url_for(theme.cdn.snackbar_css))
|
35
6
|
|
36
7
|
// aplayer
|
37
|
-
if theme.
|
38
|
-
link(rel="stylesheet", href=cdn.
|
8
|
+
if theme.capsule.enable || theme.music.enable
|
9
|
+
link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
|
39
10
|
|
40
11
|
// swiper
|
41
|
-
if theme.says.home_mini
|
42
|
-
link(rel="stylesheet", href=cdn.
|
43
|
-
|
44
|
-
// echarts
|
45
|
-
if theme.about.echarts.enable && theme.about.enable
|
46
|
-
script(src=url_for(cdn.echartsjs))
|
12
|
+
if theme.says.home_mini
|
13
|
+
link(rel="stylesheet", href=url_for(theme.cdn.swiper_css))
|
47
14
|
|
48
|
-
|
49
|
-
|
50
|
-
include ../head/fest.pug
|
15
|
+
if theme.fancybox
|
16
|
+
link(rel="stylesheet", href=url_for(theme.cdn.fancyapps_css))
|
51
17
|
|
52
18
|
// Open Graph
|
53
19
|
include ../head/opengraph.pug
|
@@ -114,8 +80,7 @@ script.
|
|
114
80
|
);
|
115
81
|
|
116
82
|
div
|
117
|
-
script(src=
|
118
|
-
script(src=cdn_url_for("/js/main.js"))
|
83
|
+
script(src=url_for(theme.cdn.utils))
|
119
84
|
|
120
85
|
// custom inject
|
121
86
|
if theme.extends.head
|
File without changes
|
File without changes
|
File without changes
|
package/layout/includes/nav.pug
CHANGED
@@ -11,7 +11,7 @@ nav#nav.show
|
|
11
11
|
else if theme.site.name.class === 'img'
|
12
12
|
img(src=theme.site.name.custom, alt=config.title)
|
13
13
|
else if theme.site.name.class === 'text'
|
14
|
-
span.
|
14
|
+
span.title= theme.site.name.custom
|
15
15
|
#page-name-mask
|
16
16
|
#page-name
|
17
17
|
a#page-name-text(onclick="sco.toTop()")= title || config.title
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,7 +1,5 @@
|
|
1
1
|
.flink#banners
|
2
2
|
include ../widgets/page/links/banner
|
3
|
-
if theme.thirdparty.circle.angle.enable
|
4
|
-
include ../widgets/page/moments/angle
|
5
3
|
.flink#article-container
|
6
4
|
each data in site.data.links.links
|
7
5
|
h2= data.class_name + " (" + data.link_list.length + ")"
|
@@ -11,4 +9,6 @@ if theme.thirdparty.circle.angle.enable
|
|
11
9
|
include ../widgets/page/links/linksCard
|
12
10
|
when 'item'
|
13
11
|
include ../widgets/page/links/linksItem
|
12
|
+
when 'discn'
|
13
|
+
include ../widgets/page/links/linksDiscn
|
14
14
|
!= page.content
|
File without changes
|
File without changes
|
@@ -1,17 +1,17 @@
|
|
1
1
|
.rss-plan-list
|
2
|
-
a.rss-plan-item.rss-plan-wechat(href=
|
2
|
+
a.rss-plan-item.rss-plan-wechat(href=page.wechatOA, title="公众号")
|
3
3
|
.rss-plan-description 推送精选文章<br>推送全文
|
4
4
|
.rss-plan-info-group
|
5
5
|
.rss-plan-title 公众号订阅
|
6
6
|
.rss-plan-info 推荐的订阅方式
|
7
7
|
img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d14a4de78.png", alt="wechat")
|
8
|
-
a.rss-plan-item.rss-plan-mail(href=
|
8
|
+
a.rss-plan-item.rss-plan-mail(href=page.emailOA, title="email")
|
9
9
|
.rss-plan-description 推送全部文章<br>推送封面与简介
|
10
10
|
.rss-plan-info-group
|
11
11
|
.rss-plan-title 邮件订阅
|
12
12
|
.rss-plan-info 推荐的订阅方式
|
13
13
|
img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d16c3ea22.png", alt="email")
|
14
|
-
a.rss-plan-item.rss-plan-rss(href=
|
14
|
+
a.rss-plan-item.rss-plan-rss(href=page.rssOA, title="rss")
|
15
15
|
.rss-plan-description 推送全部文章<br>推送简介
|
16
16
|
.rss-plan-info-group
|
17
17
|
.rss-plan-title RSS
|
@@ -1,19 +1,19 @@
|
|
1
|
+
include ../widgets/page/banner
|
1
2
|
if theme.says.enable
|
2
|
-
include ../widgets/page/banner
|
3
3
|
#bber
|
4
4
|
section.timeline.page-1
|
5
5
|
ul.list#waterfall
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
include ../widgets/page/says/
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
6
|
+
case theme.says.mode
|
7
|
+
when 'local'
|
8
|
+
include ../widgets/page/says/local
|
9
|
+
when 'json'
|
10
|
+
include ../widgets/page/says/json
|
11
|
+
when 'memos'
|
12
|
+
include ../widgets/page/says/memos
|
13
|
+
#bber-tips
|
14
|
+
if theme.says.strip === -1
|
15
|
+
| - 已展开所有短文 -
|
16
|
+
else
|
17
|
+
| - 只展示最近 #{theme.says.strip} 条短文 -
|
18
|
+
else
|
19
|
+
include ./not_configured.pug
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,19 +2,19 @@
|
|
2
2
|
- var noSticky, Sticky, customNoSticky, customSticky;
|
3
3
|
if(is_home())
|
4
4
|
- noSticky = theme.aside.home.noSticky.split(',')
|
5
|
-
- Sticky = theme.aside.home.Sticky.split(',')
|
6
5
|
- customNoSticky = site.data.aside?.home?.noSticky
|
7
6
|
- customSticky = site.data.aside?.home?.Sticky
|
7
|
+
- Sticky = theme.aside.home.Sticky.split(',')
|
8
8
|
else if(is_post())
|
9
9
|
- noSticky = theme.aside.post.noSticky.split(',')
|
10
|
-
- Sticky = theme.aside.post.Sticky.split(',')
|
11
10
|
- customNoSticky = site.data.aside?.post?.noSticky
|
12
11
|
- customSticky = site.data.aside?.post?.Sticky
|
12
|
+
- Sticky = theme.aside.post.Sticky.split(',')
|
13
13
|
else if(is_page() || is_archive() || is_tag() || is_category())
|
14
14
|
- noSticky = theme.aside.page.noSticky.split(',')
|
15
|
-
- Sticky = theme.aside.page.Sticky.split(',')
|
16
15
|
- customNoSticky = site.data.aside?.page?.noSticky
|
17
16
|
- customSticky = site.data.aside?.page?.Sticky
|
17
|
+
- Sticky = theme.aside.page.Sticky.split(',')
|
18
18
|
each item in noSticky
|
19
19
|
include ./asideSwitch.pug
|
20
20
|
if customNoSticky
|
@@ -23,8 +23,8 @@
|
|
23
23
|
.sticky_layout
|
24
24
|
if page.toc
|
25
25
|
include ./asideToc.pug
|
26
|
-
each item in Sticky
|
27
|
-
include ./asideSwitch.pug
|
28
26
|
if customSticky
|
29
27
|
each item in customSticky
|
30
|
-
include ./asideCustom.pug
|
28
|
+
include ./asideCustom.pug
|
29
|
+
each item in Sticky
|
30
|
+
include ./asideSwitch.pug
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,10 +11,10 @@
|
|
11
11
|
.author-info__description!= theme.aside.card.content
|
12
12
|
.author-info__description2!= theme.aside.card.content2
|
13
13
|
.author-info__bottom-group
|
14
|
-
a.author-info__bottom-group-left(href=theme.about ? "/about" : "/")
|
14
|
+
a.author-info__bottom-group-left(href=theme.about ? "/about/" : "/")
|
15
15
|
.author-info__name= config.author
|
16
16
|
.author-info__desc!= config.subtitle
|
17
17
|
.card-info-social-icons.is-center
|
18
|
-
each value, key in theme.aside.card.information
|
18
|
+
each value, key in theme.aside.card.information || []
|
19
19
|
a.social-icon(href=url_for(value.url), title=key)
|
20
|
-
i(class=value.icon)
|
20
|
+
i.scoicon(class=value.icon)
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
each tag in site.tags.find({ parent: { $exists: false } }).data
|
3
3
|
a(href=url_for(tag.path))= tag.name
|
4
4
|
sup= tag.length
|
5
|
-
if site.tags.length >
|
5
|
+
if site.tags.length > theme.aside.tags.limit
|
6
6
|
a#more-tags-btn(href="javascript:void(0);", onclick="sco.openAllTags();")= __('aside.tagmore')
|
7
7
|
else
|
8
8
|
style.
|
File without changes
|
@@ -5,7 +5,7 @@
|
|
5
5
|
i.item-icon.scoicon.sco-folder-fill
|
6
6
|
.item-name= __('aside.postcount')
|
7
7
|
.item-count= site.posts.length
|
8
|
-
if theme.
|
8
|
+
if theme.busuanzi
|
9
9
|
if theme.aside.siteinfo.pv
|
10
10
|
.webinfo-item
|
11
11
|
.webinfo-item-title
|
@@ -32,7 +32,7 @@
|
|
32
32
|
i.item-icon.scoicon.sco-loop-left-fill
|
33
33
|
.item-name= __('aside.updatetime')
|
34
34
|
time.item-count(datetime=new Date())
|
35
|
-
if theme.
|
35
|
+
if theme.wordcount && theme.aside.siteinfo.wordcount
|
36
36
|
.webinfo-item
|
37
37
|
.webinfo-item-title
|
38
38
|
i.item-icon.scoicon.sco-word-fill
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
script.
|
2
|
+
!async function () {
|
3
|
+
const htmlTagRegex = /<[^>]+>/g;
|
4
|
+
|
5
|
+
await fetch('!{theme.says.mode_link}')
|
6
|
+
.then(res => res.json())
|
7
|
+
.then(res => {
|
8
|
+
let list = res.filter(item => item.content).slice(0, 10);
|
9
|
+
|
10
|
+
document.querySelector('#bber-talk').innerHTML = list.map(item => {
|
11
|
+
let content = item.content ? item.content.replace(htmlTagRegex, '') : '';
|
12
|
+
content += item.image ? '<i class="scoicon scp-image-fill"></i>' : '';
|
13
|
+
content += item.aplayer ? '<i class="scoicon sco-disc-fill"></i>' : '';
|
14
|
+
content += item.video ? '<i class="scoicon sco-video-fill"></i>' : '';
|
15
|
+
content += item.bilibili ? '<i class="scoicon sco-bilibili-line"></i>' : '';
|
16
|
+
content += item.link ? `<i class="scoicon sco-link"></i>` : '';
|
17
|
+
return `<div class="li-style swiper-slide">${content}</div>`;
|
18
|
+
}).join('');
|
19
|
+
|
20
|
+
sco.initbbtalk();
|
21
|
+
}).catch(err => console.log('bbtime |', err));
|
22
|
+
}();
|
@@ -0,0 +1,17 @@
|
|
1
|
+
each item, i in site.data.essay.essay_list.slice(0, 10)
|
2
|
+
.li-style.swiper-slide
|
3
|
+
| #{item.content}
|
4
|
+
if item.image
|
5
|
+
i.scoicon.sco-image-fill
|
6
|
+
if item.aplayer
|
7
|
+
i.scoicon.sco-disc-fill
|
8
|
+
if item.video
|
9
|
+
i.scoicon.sco-video-fill
|
10
|
+
if item.bilibili
|
11
|
+
i.scoicon.sco-bilibili-line
|
12
|
+
if item.link
|
13
|
+
i.scoicon.sco-links
|
14
|
+
script.
|
15
|
+
document.addEventListener('DOMContentLoaded', function () {
|
16
|
+
sco.initbbtalk()
|
17
|
+
})
|
@@ -0,0 +1,25 @@
|
|
1
|
+
script.
|
2
|
+
!async function () {
|
3
|
+
await fetch('!{theme.says.mode_link}')
|
4
|
+
.then(response => response.json())
|
5
|
+
.then(data => {
|
6
|
+
let aplayerRegex = /{aplayer,(.*?),(.*?)}/g;
|
7
|
+
let bilibiliRegex = /{bilibili,(.*?)}/g;
|
8
|
+
let playerRegex = /{player,(.*?)}/g;
|
9
|
+
let linkRegex = /(?<!\!)\[([^\]]*)\]\(([^\)]*)\)/g;
|
10
|
+
let imageRegex = /!\[\]\((.*?)\)/g;
|
11
|
+
let contentRegex = /#.*?\s([^{\n]*)/g
|
12
|
+
const list = data.slice(0, 10)
|
13
|
+
document.querySelector('#bber-talk').innerHTML = list.map(item => {
|
14
|
+
let content = item.content.match(contentRegex, '$1').map(item => item.replace(contentRegex, '$1'));
|
15
|
+
let imageBox = item.content.match(imageRegex) ? '<i class="scoicon sco-image-fill"></i>' : '';
|
16
|
+
let aplayer = item.content.match(aplayerRegex) ? '<i class="scoicon sco-disc-fill"></i>' : '';
|
17
|
+
let video = item.content.match(playerRegex) ? '<i class="scoicon sco-video-fill"></i>' : item.content.match(bilibiliRegex) ? '<i class="scoicon sco-bilibili-line"></i>' : '';
|
18
|
+
let link = item.content.match(linkRegex) ? `<i class="scoicon sco-link"></i>` : '';
|
19
|
+
|
20
|
+
return `<div class="li-style swiper-slide">${content+aplayer+video+imageBox+link}</div>`
|
21
|
+
}).join(' ')
|
22
|
+
sco.initbbtalk()
|
23
|
+
})
|
24
|
+
.catch(error => console.error('bbtime | ', error));
|
25
|
+
}()
|
@@ -1,8 +1,12 @@
|
|
1
|
-
.bbTimeList.container#bbTimeList
|
2
|
-
i.bber-logo.scoicon.sco-bblogo(onclick
|
3
|
-
.swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1"
|
1
|
+
.bbTimeList.container#bbTimeList(class=is_home_first_page() ? '' : 'more-page')
|
2
|
+
i.bber-logo.scoicon.sco-bblogo(onclick=`pjax.loadUrl('/essay/')`)
|
3
|
+
.swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1" onclick=`pjax.loadUrl('/essay/')`)
|
4
4
|
.swiper-wrapper#bber-talk
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
case theme.says.mode
|
6
|
+
when 'local'
|
7
|
+
include bb/local
|
8
|
+
when 'json'
|
9
|
+
include bb/json
|
10
|
+
when 'memos'
|
11
|
+
include bb/memos
|
12
|
+
i.bber-gotobb.scoicon.sco-right-btn-fill(title=_p('home.bbtime.text') onclick=`pjax.loadUrl('/essay/')`)
|
File without changes
|
@@ -6,4 +6,4 @@ each groupName, index in groupNames
|
|
6
6
|
.categoryItem(style=`box-shadow: var(${styles[index]});`)
|
7
7
|
a.categoryButton(class=classes[index], href=url_for(theme.hometop.categoryGroup[groupName].url))
|
8
8
|
span.categoryButtonText= theme.hometop.categoryGroup[groupName].name
|
9
|
-
i(class=theme.hometop.categoryGroup[groupName].icon)
|
9
|
+
i.scoicon(class=theme.hometop.categoryGroup[groupName].icon)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|