hexo-theme-volantis 4.3.1 → 5.0.0-alpha.112
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 +6 -4
- package/_config.yml +599 -246
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +13 -2
- package/languages/zh-TW.yml +7 -0
- package/layout/404.ejs +1 -1
- package/layout/_meta/author.ejs +4 -4
- package/layout/_meta/category.ejs +11 -8
- package/layout/_meta/counter.ejs +29 -7
- package/layout/_meta/date.ejs +1 -1
- package/layout/_meta/music.ejs +1 -1
- package/layout/_meta/share.ejs +1 -1
- package/layout/_meta/tags.ejs +3 -0
- package/layout/_meta/thumbnail.ejs +3 -1
- package/layout/_meta/updated.ejs +1 -1
- package/layout/_meta/walinecount.ejs +2 -1
- package/layout/{_cover → _partial/_cover}/blank.ejs +0 -0
- package/layout/{_cover → _partial/_cover}/dock.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/featured.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/focus.ejs +1 -1
- package/layout/_partial/_cover/layout.ejs +8 -0
- package/layout/{_cover → _partial/_cover}/search.ejs +2 -2
- package/layout/_partial/archive.ejs +2 -2
- package/layout/_partial/article.ejs +21 -16
- package/layout/_partial/categories.ejs +1 -1
- package/layout/_partial/cover.ejs +8 -28
- package/layout/_partial/footer.ejs +19 -11
- package/layout/_partial/head.ejs +70 -116
- package/layout/_partial/header.ejs +17 -11
- package/layout/_partial/meta.ejs +18 -4
- package/layout/_partial/post.ejs +35 -9
- package/layout/_partial/scripts/_ctrl/cdnCtrl.ejs +126 -0
- package/layout/_partial/scripts/{coverCtrl.ejs → _ctrl/coverCtrl.ejs} +17 -25
- package/layout/_partial/scripts/_ctrl.ejs +2 -0
- package/layout/_partial/scripts/content-visibility-scroll-fix.ejs +88 -0
- package/layout/_partial/scripts/global.ejs +422 -109
- package/layout/_partial/scripts/index.ejs +91 -46
- package/layout/_partial/scripts/toc.ejs +98 -68
- package/layout/_partial/side.ejs +4 -1
- package/layout/_plugins/_page_plugins/artitalk/index.ejs +15 -0
- package/layout/_plugins/_page_plugins/bbtalk/index.ejs +10 -0
- package/layout/_plugins/_page_plugins/fcircle/index.ejs +12 -0
- package/layout/_plugins/_page_plugins/gitter/index.ejs +14 -0
- package/layout/_plugins/_page_plugins/indent/index.ejs +16 -0
- package/layout/_plugins/_page_plugins/index.ejs +27 -0
- package/layout/_plugins/_page_plugins/katex/index.ejs +13 -0
- package/layout/{_third-party/math/mathjax/script.ejs → _plugins/_page_plugins/mathjax/index.ejs} +2 -2
- package/layout/_plugins/_page_plugins/snackbar/index.ejs +55 -0
- package/layout/{_partial/scripts/counter.ejs → _plugins/analytics/LCCounter.ejs} +0 -0
- package/layout/{_third-party → _plugins}/analytics/script.ejs +43 -5
- package/layout/{_third-party → _plugins}/aplayer/layout.ejs +0 -0
- package/layout/_plugins/aplayer/script.ejs +74 -0
- package/layout/_plugins/chat/gitter/script.ejs +17 -0
- package/layout/_plugins/chat/index.ejs +1 -0
- package/layout/_plugins/chat/tidio/script.ejs +1 -0
- package/layout/_plugins/comments/artalk/script.ejs +59 -0
- package/layout/_plugins/comments/beaudar/script.ejs +61 -0
- package/layout/_plugins/comments/discuss/script.ejs +30 -0
- package/layout/_plugins/comments/disqus/script.ejs +98 -0
- package/layout/_plugins/comments/disqusjs/script.ejs +35 -0
- package/layout/_plugins/comments/giscus/script.ejs +47 -0
- package/layout/_plugins/comments/gitalk/script.ejs +24 -0
- package/layout/_plugins/comments/hashover/script.ejs +5 -0
- package/layout/{_third-party → _plugins}/comments/index.ejs +10 -3
- package/layout/_plugins/comments/isso/script.ejs +27 -0
- package/layout/_plugins/comments/livere/script.ejs +15 -0
- package/layout/_plugins/comments/twikoo/script.ejs +40 -0
- package/layout/_plugins/comments/utterances/script.ejs +43 -0
- package/layout/_plugins/comments/vssue/script.ejs +37 -0
- package/layout/_plugins/comments/waline/script.ejs +62 -0
- package/layout/_plugins/comments/z-custom/script.ejs +1 -0
- package/layout/_plugins/darkmode/script.ejs +114 -0
- package/layout/{_third-party → _plugins}/end-of-support/script.ejs +25 -8
- package/layout/_plugins/github-api/script.ejs +27 -0
- package/layout/_plugins/highlight/highlightjs/script.ejs +26 -0
- package/layout/_plugins/highlight/prismjs/script.ejs +25 -0
- package/layout/_plugins/highlight/script.ejs +1 -0
- package/layout/{_third-party → _plugins}/lazyload/script.ejs +1 -1
- package/layout/{_third-party → _plugins}/nodewaves/script.ejs +1 -1
- package/layout/_plugins/parallax/script.ejs +74 -0
- package/layout/{_third-party → _plugins}/pjax/animate.ejs +31 -31
- package/layout/_plugins/pjax/index.ejs +73 -0
- package/layout/_plugins/pjax/pdata.ejs +56 -0
- package/layout/{_third-party → _plugins}/preload/script.ejs +3 -3
- package/layout/_plugins/rightmenu/layout.ejs +119 -0
- package/layout/_plugins/rightmenus/layout.ejs +137 -0
- package/layout/_plugins/scrollreveal/script.ejs +25 -0
- package/layout/_plugins/search/script.ejs +50 -0
- package/layout/{_third-party → _plugins}/share/layout.ejs +0 -0
- package/layout/_plugins/swiper/script.ejs +37 -0
- package/layout/_pre.ejs +2 -2
- package/layout/_widget/_pre.ejs +5 -0
- package/layout/_widget/blogger.ejs +1 -1
- package/layout/_widget/category.ejs +2 -2
- package/layout/_widget/copyright.ejs +1 -1
- package/layout/_widget/grid.ejs +3 -3
- package/layout/_widget/lastupdate.ejs +27 -0
- package/layout/_widget/list.ejs +2 -2
- package/layout/_widget/load.ejs +18 -0
- package/layout/_widget/music.ejs +3 -2
- package/layout/_widget/page.ejs +1 -1
- package/layout/_widget/qrcode.ejs +1 -1
- package/layout/_widget/related_posts.ejs +1 -1
- package/layout/_widget/tagcloud.ejs +1 -1
- package/layout/_widget/text.ejs +1 -1
- package/layout/_widget/toc.ejs +6 -2
- package/layout/_widget/webinfo.ejs +13 -76
- package/layout/archive.ejs +4 -4
- package/layout/category.ejs +9 -4
- package/layout/docs.ejs +1 -1
- package/layout/friends.ejs +6 -25
- package/layout/index.ejs +1 -1
- package/layout/layout.ejs +30 -12
- package/layout/list.ejs +1 -1
- package/layout/page.ejs +1 -1
- package/layout/post.ejs +1 -1
- package/layout/tag.ejs +8 -3
- package/package.json +5 -3
- package/scripts/events/index.js +13 -0
- package/scripts/events/lib/check-configuration.js +43 -0
- package/scripts/events/lib/check-environment.js +74 -0
- package/scripts/events/lib/config.js +34 -9
- package/scripts/events/lib/render-stylus.js +78 -0
- package/scripts/events/lib/stellar-tag-utils.js +76 -0
- package/scripts/filters/content-visibility.js +25 -0
- package/scripts/{render → filters}/img.js +0 -0
- package/scripts/filters/replace.js +15 -0
- package/scripts/{z-lazyload/lib/process.js → filters/z-lazyload.js} +6 -3
- package/scripts/helpers/custom-files.js +165 -0
- package/scripts/helpers/first-style.js +19 -0
- package/scripts/helpers/head/autoCanonical.js +15 -0
- package/scripts/helpers/head/generate_preload_fontfamily.js +22 -0
- package/scripts/helpers/head/generate_seo.js +24 -0
- package/scripts/helpers/head/generate_title__keywords__description.js +101 -0
- package/scripts/{related_posts/index.js → helpers/related-posts.js} +1 -1
- package/scripts/helpers/revisioned.js +158 -0
- package/scripts/helpers/structured-data/index.js +2 -0
- package/scripts/helpers/structured-data/lib/blogposting.js +77 -0
- package/scripts/helpers/structured-data/lib/breadcrumblist.js +152 -0
- package/scripts/helpers/structured-data/lib/config.js +31 -0
- package/scripts/helpers/structured-data/lib/index.js +30 -0
- package/scripts/helpers/structured-data/lib/organization.js +15 -0
- package/scripts/helpers/structured-data/lib/person.js +16 -0
- package/scripts/helpers/structured-data/lib/website.js +42 -0
- package/scripts/tags/btn.js +6 -1
- package/scripts/tags/btns.js +7 -2
- package/scripts/tags/checkbox.js +12 -2
- package/scripts/tags/contributors.js +100 -0
- package/scripts/tags/dropmenu.js +18 -3
- package/scripts/tags/fancybox.js +44 -10
- package/scripts/tags/folding.js +6 -1
- package/scripts/tags/frame.js +6 -1
- package/scripts/tags/friends.js +99 -0
- package/scripts/tags/ghcard.js +6 -1
- package/scripts/tags/image.js +14 -2
- package/scripts/tags/link.js +6 -1
- package/scripts/tags/md.js +59 -0
- package/scripts/tags/media.js +25 -1
- package/scripts/tags/note.js +36 -3
- package/scripts/tags/site.js +87 -51
- package/scripts/tags/span.js +12 -2
- package/scripts/tags/swiper.js +38 -0
- package/scripts/tags/tabs.js +33 -3
- package/scripts/tags/timeline.js +6 -1
- package/source/css/Readme.md +28 -0
- package/source/css/_defines/AutoPrefixCSS.styl +347 -0
- package/source/css/_defines/Readme.md +3 -0
- package/source/css/_defines/color.styl +41 -1
- package/source/css/_defines/effect.styl +0 -13
- package/source/css/_defines/fonts.styl +17 -18
- package/source/css/_defines/func.styl +12 -30
- package/source/css/_first/base_first.styl +118 -0
- package/source/css/_first/{cover.styl → cover_first.styl} +113 -87
- package/source/css/_first/dark_first.styl +76 -0
- package/source/css/_first/fontfamily_first.styl +17 -0
- package/source/css/_first/{navbar.styl → navbar_first.styl} +4 -10
- package/source/css/_first/search_first.styl +12 -0
- package/source/css/{_base/index.styl → _style/_base/base.styl} +9 -93
- package/source/css/_style/_base/fontfamily_async.styl +8 -0
- package/source/css/{_layout → _style/_layout}/archive.styl +0 -0
- package/source/css/{_layout → _style/_layout}/article.styl +3 -30
- package/source/css/{_layout → _style/_layout}/footer.styl +0 -0
- package/source/css/_style/_layout/friends-simpleuser.styl +23 -0
- package/source/css/_style/_layout/friends-traditional.styl +81 -0
- package/source/css/{_layout → _style/_layout}/img.styl +0 -0
- package/source/css/_style/_layout/loading.styl +14 -0
- package/source/css/{_layout → _style/_layout}/main.styl +19 -7
- package/source/css/{_layout → _style/_layout}/md.styl +0 -0
- package/source/css/{_layout → _style/_layout}/pagination.styl +1 -1
- package/source/css/{_layout → _style/_layout}/posts.styl +2 -0
- package/source/css/{_first → _style/_layout}/search.styl +0 -103
- package/source/css/{_layout → _style/_layout}/sidebar.styl +23 -3
- package/source/css/{_layout → _style/_layout}/snackbar.styl +0 -0
- package/source/css/{_layout → _style/_layout}/toc.styl +3 -3
- package/source/css/{_layout → _style/_layout}/video.styl +0 -0
- package/source/css/_style/_plugins/_dark/dark_async.styl +41 -0
- package/source/css/_style/_plugins/_dark/dark_plugins.styl +136 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/clipboard.styl +36 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/color.styl +96 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/index.styl +102 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/language.styl +63 -0
- package/source/css/_style/_plugins/_highlight/index.styl +1 -0
- package/source/css/_style/_plugins/_highlight/prismjs/clipboard.styl +33 -0
- package/source/css/_style/_plugins/_highlight/prismjs/index.styl +8 -0
- package/source/css/_style/_plugins/_highlight/prismjs/language.styl +63 -0
- package/source/css/_style/_plugins/_rightmenu/reading.styl +56 -0
- package/source/css/{_plugins → _style/_plugins/_rightmenu}/rightmenu.styl +22 -2
- package/source/css/{_plugins → _style/_plugins}/aplayer.styl +8 -1
- package/source/css/{_plugins → _style/_plugins}/cursor.styl +49 -19
- package/source/css/_style/_plugins/fontcolor.styl +84 -0
- package/source/css/{_plugins → _style/_plugins}/gitalk.styl +0 -0
- package/source/css/_style/_plugins/index.styl +24 -0
- package/source/css/{_plugins → _style/_plugins}/mathjax.styl +0 -0
- package/source/css/_style/_plugins/message.styl +14 -0
- package/source/css/{_plugins → _style/_plugins}/pjaxanimate.styl +0 -0
- package/source/css/_style/_tag-plugins/Readme.md +6 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/btns.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/checkbox.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/dropmenu.styl +0 -0
- package/source/css/{_plugins → _style/_tag-plugins}/fancybox.styl +8 -9
- package/source/css/{_tag-plugins → _style/_tag-plugins}/folding.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/frame.styl +0 -0
- package/source/css/_style/_tag-plugins/friends.styl +72 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/ghcard.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/image.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/link.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/media.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/note.styl +0 -0
- package/source/css/_style/_tag-plugins/sites.styl +87 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/span.styl +0 -0
- package/source/css/_style/_tag-plugins/swiper.styl +44 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/table.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/tabs.styl +0 -0
- package/source/css/_style/_tag-plugins/tag.json +35 -0
- package/source/css/_style/_tag-plugins/text.styl +31 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/timeline.styl +0 -0
- package/source/css/_style/index.styl +8 -0
- package/source/css/first.styl +17 -6
- package/source/css/style.styl +9 -7
- package/source/js/app.js +1051 -278
- package/source/js/plugins/aplayer.js +186 -0
- package/source/js/plugins/parallax.js +191 -0
- package/source/js/plugins/rightMenu.js +577 -0
- package/source/js/plugins/rightMenus.js +616 -0
- package/source/js/plugins/tags/contributors.js +92 -0
- package/source/js/plugins/tags/friends.js +93 -0
- package/source/js/plugins/tags/sites.js +96 -0
- package/source/js/search/hexo.js +180 -373
- package/.eslintrc.json +0 -111
- package/layout/_meta/valinecount.ejs +0 -15
- package/layout/_partial/rightmenu.ejs +0 -199
- package/layout/_partial/scripts/cover.ejs +0 -45
- package/layout/_partial/scripts/darkmode.ejs +0 -85
- package/layout/_partial/scripts/import.ejs +0 -3
- package/layout/_partial/scripts/issues.ejs +0 -18
- package/layout/_partial/scripts/search.ejs +0 -62
- package/layout/_partial/snackbar.ejs +0 -22
- package/layout/_third-party/aplayer/script.ejs +0 -26
- package/layout/_third-party/clipboard/script.ejs +0 -54
- package/layout/_third-party/comments/disqus/layout.ejs +0 -5
- package/layout/_third-party/comments/disqus/script.ejs +0 -90
- package/layout/_third-party/comments/disqusjs/layout.ejs +0 -1
- package/layout/_third-party/comments/disqusjs/script.ejs +0 -34
- package/layout/_third-party/comments/gitalk/layout.ejs +0 -1
- package/layout/_third-party/comments/gitalk/script.ejs +0 -22
- package/layout/_third-party/comments/hashover/layout.ejs +0 -2
- package/layout/_third-party/comments/hashover/script.ejs +0 -1
- package/layout/_third-party/comments/isso/layout.ejs +0 -1
- package/layout/_third-party/comments/isso/script.ejs +0 -1
- package/layout/_third-party/comments/livere/layout.ejs +0 -3
- package/layout/_third-party/comments/livere/script.ejs +0 -10
- package/layout/_third-party/comments/minivaline/layout.ejs +0 -3
- package/layout/_third-party/comments/minivaline/script.ejs +0 -34
- package/layout/_third-party/comments/twikoo/layout.ejs +0 -3
- package/layout/_third-party/comments/twikoo/script.ejs +0 -32
- package/layout/_third-party/comments/valine/layout.ejs +0 -3
- package/layout/_third-party/comments/valine/script.ejs +0 -49
- package/layout/_third-party/comments/vssue/layout.ejs +0 -1
- package/layout/_third-party/comments/vssue/script.ejs +0 -21
- package/layout/_third-party/comments/waline/layout.ejs +0 -3
- package/layout/_third-party/comments/waline/script.ejs +0 -33
- package/layout/_third-party/fancybox/script.ejs +0 -61
- package/layout/_third-party/highlightjs/script.ejs +0 -11
- package/layout/_third-party/pjax/index.ejs +0 -78
- package/layout/_third-party/pjax/pdata.ejs +0 -53
- package/layout/_third-party/scrollreveal/script.ejs +0 -21
- package/layout/_third-party/tidio/script.ejs +0 -3
- package/layout/artitalk.ejs +0 -13
- package/layout/bb.ejs +0 -10
- package/package-lock.json +0 -916
- package/scripts/tags/issues.js +0 -41
- package/scripts/z-lazyload/index.js +0 -4
- package/source/css/_highlight/index.styl +0 -316
- package/source/css/_layout/friends.styl +0 -79
- package/source/css/_plugins/clipboard.styl +0 -37
- package/source/css/_plugins/dark.styl +0 -149
- package/source/css/_plugins/darkmode.styl +0 -9
- package/source/css/_plugins/index.styl +0 -18
- package/source/css/_plugins/twikoo.styl +0 -21
- package/source/css/_plugins/valine.styl +0 -183
- package/source/css/_tag-plugins/simpleuser.styl +0 -21
- package/source/css/_tag-plugins/site-card.styl +0 -70
- package/source/js/aplayer.js +0 -167
- package/source/js/issues.js +0 -186
- package/source/js/search/algolia.js +0 -344
- package/source/js/search/azure.js +0 -355
- package/source/js/search/baidu.js +0 -340
- package/source/js/search/google.js +0 -339
- package/source/js/valine.js +0 -5137
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<% if (theme.rightmenu.enable == true && theme.rightmenu.layout.length > 0) { %>
|
|
2
|
+
<% let faIcon = theme.rightmenu.faicon %>
|
|
3
|
+
<% function loadmenu(obj) { %>
|
|
4
|
+
<li class="menuLoad-Content">
|
|
5
|
+
<a class='vlts-menu fix-cursor-default' <%= obj.url ? 'href='+ url_for(obj.url)+'' : ''%>
|
|
6
|
+
<% if (obj.rel) { %>
|
|
7
|
+
rel="<%- obj.rel %>"
|
|
8
|
+
<% } %>
|
|
9
|
+
<% if (obj.target) { %>
|
|
10
|
+
target="<%- obj.target %>"
|
|
11
|
+
<% } %>
|
|
12
|
+
<% if (obj.onclick) { %>
|
|
13
|
+
onclick="<%- obj.onclick %>"
|
|
14
|
+
<% } %>
|
|
15
|
+
<% if (obj.id) { %>
|
|
16
|
+
id="<%- obj.id %>"
|
|
17
|
+
<% } else if (obj.url) { %>
|
|
18
|
+
id="<%= url_for(obj.url).replace(/\/|%|\./g, "")?url_for(obj.url).replace(/\/|%|\./g, ""):"home" %>"
|
|
19
|
+
<% } %>
|
|
20
|
+
>
|
|
21
|
+
<% if (obj.icon) { %><i class='<%= obj.icon %> fa-fw'></i><% } %> <%- obj.name %>
|
|
22
|
+
</a>
|
|
23
|
+
</li>
|
|
24
|
+
<% } %>
|
|
25
|
+
<div id="rightmenu-wrapper">
|
|
26
|
+
<ul class="list-v rightmenu" id="rightmenu-content">
|
|
27
|
+
<li class='navigation menuNavigation-Content'>
|
|
28
|
+
<a class='nav icon-only fix-cursor-default' onclick='history.back()'><i class='<%= faIcon %> fa-arrow-left fa-fw'></i></a>
|
|
29
|
+
<a class='nav icon-only fix-cursor-default' onclick='history.forward()'><i class='<%= faIcon %> fa-arrow-right fa-fw'></i></a>
|
|
30
|
+
<a class='nav icon-only fix-cursor-default' onclick='window.location.reload()'><i class='<%= faIcon %> fa-redo fa-fw'></i></a>
|
|
31
|
+
<a class='nav icon-only fix-cursor-default' href='/'><i class='<%= faIcon %> fa-home fa-fw'></i></a>
|
|
32
|
+
</li>
|
|
33
|
+
<li class='option menuOption-Content'>
|
|
34
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='copyText'>
|
|
35
|
+
<% let copy_text = __('rightmenu.copy_text') %>
|
|
36
|
+
<i class='<%= faIcon %> fa-copy fa-fw'></i> <%- trim(copy_text) %>
|
|
37
|
+
</span>
|
|
38
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='copyPaste'>
|
|
39
|
+
<% let copy_paste = __('rightmenu.copy_paste') %>
|
|
40
|
+
<i class='<%= faIcon %> fa-paste fa-fw mR12'></i> <%- trim(copy_paste) %>
|
|
41
|
+
</span>
|
|
42
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='copySelect'>
|
|
43
|
+
<% let copy_select = __('rightmenu.copy_select') %>
|
|
44
|
+
<i class='<%= faIcon %> fa-object-ungroup fa-fw mR12'></i> <%- trim(copy_select) %>
|
|
45
|
+
</span>
|
|
46
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='copyCut'>
|
|
47
|
+
<% let copy_cut = __('rightmenu.copy_cut') %>
|
|
48
|
+
<i class='<%= faIcon %> fa-cut fa-fw mR12'></i> <%- trim(copy_cut) %>
|
|
49
|
+
</span>
|
|
50
|
+
<% if (theme.search.enable) { %>
|
|
51
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='searchWord'>
|
|
52
|
+
<% let search_word = __('rightmenu.search_word') %>
|
|
53
|
+
<i class='<%= faIcon %> fa-search fa-fw'></i> <%- trim(search_word) %>
|
|
54
|
+
</span>
|
|
55
|
+
<% } %>
|
|
56
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='openTab'>
|
|
57
|
+
<% let open_in_new_tab = __('rightmenu.open_in_new_tab') %>
|
|
58
|
+
<i class='<%= faIcon %> fa-external-link-square-alt fa-fw mR12'></i> <%- trim(open_in_new_tab) %>
|
|
59
|
+
</span>
|
|
60
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='copySrc'>
|
|
61
|
+
<% let copy_image_src = __('rightmenu.copy_image_src') %>
|
|
62
|
+
<i class='<%= faIcon %> fa-image fa-fw mR12'></i> <%- trim(copy_image_src) %>
|
|
63
|
+
</span>
|
|
64
|
+
<span class='vlts-menu opt fix-cursor-default menu-Option' data-fn-type='copyImg'>
|
|
65
|
+
<% let copy_image_file = __('rightmenu.copy_image_file') %>
|
|
66
|
+
<i class='<%= faIcon %> fa-images fa-fw mR12'></i> <%- trim(copy_image_file) %>
|
|
67
|
+
</span>
|
|
68
|
+
</li>
|
|
69
|
+
<% theme.rightmenu.layout.forEach(function(item){ %>
|
|
70
|
+
<% if (item == 'hr') { %>
|
|
71
|
+
<hr class="menuLoad-Content">
|
|
72
|
+
<% } else if (item == 'darkmode') { %>
|
|
73
|
+
<li class='option menuOption-Content'>
|
|
74
|
+
<span class='vlts-menu opt fix-cursor-default toggle-mode-btn' id='menuDarkBtn'>
|
|
75
|
+
<i class='<%= theme.rightmenu.darkmode.icon %> fa-fw '></i> <%- trim(theme.rightmenu.darkmode.name) %>
|
|
76
|
+
</span>
|
|
77
|
+
</li>
|
|
78
|
+
<% } else if (item == 'print') { %>
|
|
79
|
+
<li class='option menuOption-Content'>
|
|
80
|
+
<span class='vlts-menu opt fix-cursor-default' id='printHtml'>
|
|
81
|
+
<i class='<%= theme.rightmenu.print.icon %> fa-fw '></i> <%- trim(theme.rightmenu.print.name) %>
|
|
82
|
+
</span>
|
|
83
|
+
</li>
|
|
84
|
+
<% } else if (item == 'reading') { %>
|
|
85
|
+
<li class='option menuOption-Content'>
|
|
86
|
+
<span class='vlts-menu opt fix-cursor-default' id='readingModel'>
|
|
87
|
+
<i class='<%= theme.rightmenu.reading.icon %> fa-fw '></i> <%- trim(theme.rightmenu.reading.name) %>
|
|
88
|
+
</span>
|
|
89
|
+
</li>
|
|
90
|
+
<% } else if (item == 'music' && theme.plugins.aplayer.enable == true) { %>
|
|
91
|
+
<div id="menuMusic">
|
|
92
|
+
<li class='music name menuOption-Content'>
|
|
93
|
+
<p class='nav music-title fix-cursor-default'></p>
|
|
94
|
+
</li>
|
|
95
|
+
<li class='music ctrl'>
|
|
96
|
+
<a class='nav icon-only backward fix-cursor-default' href="/" onclick="return false;" title="backward"><i class='<%= faIcon %> fa-step-backward fa-fw'></i></a>
|
|
97
|
+
<a class='nav icon-only toggle fix-cursor-default' href="/" onclick="return false;" title="toggle"><i class='<%= faIcon %> fa-play fa-fw'></i></a>
|
|
98
|
+
<a class='nav icon-only forward fix-cursor-default' href="/" onclick="return false;" title="forward"><i class='<%= faIcon %> fa-step-forward fa-fw'></i></a>
|
|
99
|
+
</li>
|
|
100
|
+
<li class='music volume'>
|
|
101
|
+
<div class='nav volume'>
|
|
102
|
+
<div class="aplayer-volume-bar-wrap">
|
|
103
|
+
<div class="aplayer-volume-bar fix-cursor-pointer">
|
|
104
|
+
<div class="aplayer-volume"></div>
|
|
105
|
+
<i class='left <%= faIcon %> fa-volume-off fa-fw'></i>
|
|
106
|
+
<i class='right <%= faIcon %> fa-volume-up fa-fw'></i>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</li>
|
|
111
|
+
</div>
|
|
112
|
+
<% } else if (item in theme.rightmenu) { %>
|
|
113
|
+
<% loadmenu(theme.rightmenu[item]) %>
|
|
114
|
+
<% } %>
|
|
115
|
+
<% }) %>
|
|
116
|
+
</ul>
|
|
117
|
+
</div>
|
|
118
|
+
<script>volantis.js('<%- theme.cdn.map.js.rightMenu %>')</script>
|
|
119
|
+
<% } %>
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<%
|
|
2
|
+
const rightMenu = {
|
|
3
|
+
defaultEvent: ['copyText', 'copyLink', 'copyPaste', 'copyAll', 'copyCut', 'copyImg', 'printMode', 'readMode'],
|
|
4
|
+
defaultGroup: ['navigation', 'inputBox', 'seletctText', 'elementCheck', 'elementImage', 'articlePage'],
|
|
5
|
+
dataGet: (data, keyStr) => {
|
|
6
|
+
const keys = keyStr.split('.');
|
|
7
|
+
let currentData = data;
|
|
8
|
+
for (const key of keys) {
|
|
9
|
+
currentData = currentData?.[key];
|
|
10
|
+
}
|
|
11
|
+
return currentData;
|
|
12
|
+
},
|
|
13
|
+
initMenu: () => {
|
|
14
|
+
theme.rightmenus.order.forEach(item => {
|
|
15
|
+
let data = rightMenu.dataGet(theme.rightmenus, item);
|
|
16
|
+
if(item.includes('navigation')) {
|
|
17
|
+
rightMenu.loadNavigation(data)
|
|
18
|
+
} else if (item === 'music') {
|
|
19
|
+
rightMenu.loadMusic()
|
|
20
|
+
} else {
|
|
21
|
+
if(Array.isArray(data)) {
|
|
22
|
+
data.forEach(item => {
|
|
23
|
+
rightMenu.loadMenu(item)
|
|
24
|
+
})
|
|
25
|
+
} else {
|
|
26
|
+
rightMenu.loadMenu(data)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
},
|
|
31
|
+
initFunction: () => {
|
|
32
|
+
theme.rightmenus.order.forEach(item => {
|
|
33
|
+
let data = rightMenu.dataGet(theme.rightmenus, item);
|
|
34
|
+
if(Array.isArray(data)) {
|
|
35
|
+
data.forEach(item => {
|
|
36
|
+
rightMenu.rederFunction(item)
|
|
37
|
+
})
|
|
38
|
+
} else {
|
|
39
|
+
rightMenu.rederFunction(data)
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
%>
|
|
45
|
+
|
|
46
|
+
<% rightMenu.loadMenu = item => { %>
|
|
47
|
+
<% if(item === undefined) { %>
|
|
48
|
+
<hr class="menuLoad-Content" >
|
|
49
|
+
<% } else if(item['id'] === undefined) { %>
|
|
50
|
+
<hr class="menuLoad-Content" >
|
|
51
|
+
<% } else if(item['link'] === undefined) { %>
|
|
52
|
+
<li class="menuLoad-Content">
|
|
53
|
+
<span class="vlts-menu fix-cursor-default event" id="<%- item.id %>" data-event="<%- item.event %>" data-group="<%- item.group %>">
|
|
54
|
+
<i class="<%- item.icon %> fa-fw"></i>
|
|
55
|
+
<%- item.name %>
|
|
56
|
+
</span>
|
|
57
|
+
</li>
|
|
58
|
+
<% } else { %>
|
|
59
|
+
<li class="menuLoad-Content">
|
|
60
|
+
<a class="vlts-menu fix-cursor-default" id="<%- item.id %>" href="<%- item.link %>" data-group="<%- item.group %>">
|
|
61
|
+
<i class="<%- item.icon %> fa-fw"></i>
|
|
62
|
+
<%- item.name %>
|
|
63
|
+
</a>
|
|
64
|
+
</li>
|
|
65
|
+
<% } %>
|
|
66
|
+
<% } %>
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<% rightMenu.loadNavigation = objs => { %>
|
|
70
|
+
<li class='navigation menuNavigation-Content'>
|
|
71
|
+
<% objs.forEach(item => { %>
|
|
72
|
+
<% if(item.link === undefined) { %>
|
|
73
|
+
<a class="nav icon-only fix-cursor-default" onclick="<%- item.event %>"><i class="<%- item.icon %> fa-fw"></i></a>
|
|
74
|
+
<% } else { %>
|
|
75
|
+
<a class="nav icon-only fix-cursor-default" href="<%- item.link %>"><i class="<%- item.icon %> fa-fw"></i></a>
|
|
76
|
+
<% } %>
|
|
77
|
+
<% }) %>
|
|
78
|
+
</li>
|
|
79
|
+
<% } %>
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<% rightMenu.rederFunction = item => { %>
|
|
83
|
+
<% if (!!item && !!item['event'] && item['group'] !== 'navigation') { %>
|
|
84
|
+
<% if (rightMenu.defaultEvent.some(value => { return value === item['event'] })) { %>
|
|
85
|
+
<!-- RightMenusFunction['<%- item.id %>'] = (fun) => {fun()} -->
|
|
86
|
+
<% } else if (item['group'] === 'seletctText') { %>
|
|
87
|
+
RightMenusFunction['<%- item.id %>'] = (__text__) => {<%- item.event %>}
|
|
88
|
+
<% } else if (item['group'] === 'elementCheck' || item['group'] === 'elementImage') { %>
|
|
89
|
+
RightMenusFunction['<%- item.id %>'] = (__link__) => {<%- item.event %>}
|
|
90
|
+
<% } else { %>
|
|
91
|
+
RightMenusFunction['<%- item.id %>'] = () => {<%- item.event %>}
|
|
92
|
+
<% } %>
|
|
93
|
+
<% } %>
|
|
94
|
+
<% } %>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<% rightMenu.loadMusic = () => { %>
|
|
98
|
+
<div id="menuMusic">
|
|
99
|
+
<li class='music name menuOption-Content'>
|
|
100
|
+
<p class='nav music-title fix-cursor-default'></p>
|
|
101
|
+
</li>
|
|
102
|
+
<li class='music ctrl'>
|
|
103
|
+
<a class='nav icon-only backward fix-cursor-default' href="/" onclick="return false;" title="backward">
|
|
104
|
+
<i class='<%= theme.rightmenus.options.iconPrefix %> fa-step-backward fa-fw'></i>
|
|
105
|
+
</a>
|
|
106
|
+
<a class='nav icon-only toggle fix-cursor-default' href="/" onclick="return false;" title="toggle">
|
|
107
|
+
<i class='<%= theme.rightmenus.options.iconPrefix %> fa-play fa-fw'></i>
|
|
108
|
+
</a>
|
|
109
|
+
<a class='nav icon-only forward fix-cursor-default' href="/" onclick="return false;" title="forward">
|
|
110
|
+
<i class='<%= theme.rightmenus.options.iconPrefix %> fa-step-forward fa-fw'></i>
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
<li class='music volume'>
|
|
114
|
+
<div class='nav volume'>
|
|
115
|
+
<div class="aplayer-volume-bar-wrap">
|
|
116
|
+
<div class="aplayer-volume-bar fix-cursor-pointer">
|
|
117
|
+
<div class="aplayer-volume"></div>
|
|
118
|
+
<i class='left <%= theme.rightmenus.options.iconPrefix %> fa-volume-off fa-fw'></i>
|
|
119
|
+
<i class='right <%= theme.rightmenus.options.iconPrefix %> fa-volume-up fa-fw'></i>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</li>
|
|
124
|
+
</div>
|
|
125
|
+
<% } %>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<div id="rightmenu-wrapper">
|
|
129
|
+
<ul class="list-v rightmenu" id="rightmenu-content">
|
|
130
|
+
<% rightMenu.initMenu() %>
|
|
131
|
+
</ul>
|
|
132
|
+
</div>
|
|
133
|
+
<script src="<%- theme.cdn.map.js.rightMenus %>"></script>
|
|
134
|
+
<script>
|
|
135
|
+
const RightMenusFunction = {};
|
|
136
|
+
<% rightMenu.initFunction() %>
|
|
137
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script type="text/javascript">
|
|
2
|
+
function pjax_scrollrebeal() {
|
|
3
|
+
ScrollReveal().reveal("#l_main .reveal", {
|
|
4
|
+
distance: "<%- theme.plugins.scrollreveal.distance %>",
|
|
5
|
+
duration: "<%- theme.plugins.scrollreveal.duration %>",
|
|
6
|
+
interval: "<%- theme.plugins.scrollreveal.interval %>",
|
|
7
|
+
scale: "<%- theme.plugins.scrollreveal.scale %>",
|
|
8
|
+
easing: "ease-out",
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function init_scrollrebeal() {
|
|
12
|
+
if (typeof ScrollReveal == "undefined") {
|
|
13
|
+
volantis.requestAnimationFrame(init_scrollrebeal);
|
|
14
|
+
} else {
|
|
15
|
+
pjax_scrollrebeal();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
volantis.js("<%- theme.plugins.scrollreveal.js %>");
|
|
19
|
+
document.addEventListener("DOMContentLoaded", init_scrollrebeal);
|
|
20
|
+
volantis.pjax.push(
|
|
21
|
+
pjax_scrollrebeal,
|
|
22
|
+
"pjax_scrollrebeal",
|
|
23
|
+
(setRequestAnimationFrame = false)
|
|
24
|
+
);
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
const SearchServiceDataPathRoot = ("<%- config.root %>" || "/").endsWith("/") ?
|
|
3
|
+
"<%- config.root %>" || "/" :
|
|
4
|
+
"<%- config.root %>/" || "/";
|
|
5
|
+
const SearchServiceDataPath = SearchServiceDataPathRoot + "content.json";
|
|
6
|
+
|
|
7
|
+
function loadSearchScript() {
|
|
8
|
+
// see: layout/_partial/scripts/_ctrl/cdnCtrl.ejs
|
|
9
|
+
return volantis.js("<%- theme.cdn.map.js.search %>");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function loadSearchService() {
|
|
13
|
+
loadSearchScript();
|
|
14
|
+
document.querySelectorAll(".input.u-search-input").forEach((e) => {
|
|
15
|
+
e.removeEventListener("focus", loadSearchService, false);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
document.querySelectorAll(".u-search-form").forEach((e) => {
|
|
19
|
+
e.addEventListener("submit", (event) => {
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
}, false);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 打开并搜索 字符串 s
|
|
26
|
+
function OpenSearch(s) {
|
|
27
|
+
if (typeof SearchService === 'undefined')
|
|
28
|
+
loadSearchScript().then(() => {
|
|
29
|
+
SearchService.setQueryText(s);
|
|
30
|
+
SearchService.search();
|
|
31
|
+
});
|
|
32
|
+
else {
|
|
33
|
+
SearchService.setQueryText(s);
|
|
34
|
+
SearchService.search();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 访问含有 ?s=xxx 的链接时打开搜索 // 与搜索引擎 structured data 相关: /scripts/helpers/structured-data/lib/config.js
|
|
39
|
+
if (window.location.search && /^\?s=/g.test(window.location.search)) {
|
|
40
|
+
let queryText = decodeURI(window.location.search)
|
|
41
|
+
.replace(/\ /g, "-")
|
|
42
|
+
.replace(/^\?s=/g, "");
|
|
43
|
+
OpenSearch(queryText);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 搜索输入框获取焦点时加载搜索
|
|
47
|
+
document.querySelectorAll(".input.u-search-input").forEach((e) => {
|
|
48
|
+
e.addEventListener("focus", loadSearchService, false);
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
function load_swiper() {
|
|
3
|
+
if (!document.querySelectorAll(".swiper-container")[0]) return;
|
|
4
|
+
volantis.css("<%- theme.plugins.swiper.css %>");
|
|
5
|
+
volantis.js("<%- theme.plugins.swiper.js %>").then(() => {
|
|
6
|
+
pjax_swiper();
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
load_swiper();
|
|
11
|
+
|
|
12
|
+
function pjax_swiper() {
|
|
13
|
+
volantis.swiper = new Swiper('.swiper-container', {
|
|
14
|
+
slidesPerView: 'auto',
|
|
15
|
+
spaceBetween: 8,
|
|
16
|
+
centeredSlides: true,
|
|
17
|
+
loop: true,
|
|
18
|
+
pagination: {
|
|
19
|
+
el: '.swiper-pagination',
|
|
20
|
+
clickable: true,
|
|
21
|
+
},
|
|
22
|
+
navigation: {
|
|
23
|
+
nextEl: '.swiper-button-next',
|
|
24
|
+
prevEl: '.swiper-button-prev',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
volantis.pjax.push(() => {
|
|
30
|
+
if (!document.querySelectorAll(".swiper-container")[0]) return;
|
|
31
|
+
if (typeof volantis.swiper === "undefined") {
|
|
32
|
+
load_swiper();
|
|
33
|
+
} else {
|
|
34
|
+
pjax_swiper();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
</script>
|
package/layout/_pre.ejs
CHANGED
package/layout/_widget/_pre.ejs
CHANGED
|
@@ -18,4 +18,9 @@ if (where == 'sidebar') {
|
|
|
18
18
|
page.widget_style += theme.custom_css.body.effect.join(' ');
|
|
19
19
|
}
|
|
20
20
|
page.widget_platform = pf.join(' ');
|
|
21
|
+
if (item.pjaxReload || item.pjaxReload===undefined){
|
|
22
|
+
page.widget_pjax = "pjax"
|
|
23
|
+
}else{
|
|
24
|
+
page.widget_pjax = ""
|
|
25
|
+
}
|
|
21
26
|
%>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<div class='content'>
|
|
4
4
|
<% if (item.avatar) { %>
|
|
5
5
|
<% if (item.url) { %>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<% if (site.categories.length){ %>
|
|
2
2
|
<%- partial('_pre') %>
|
|
3
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
3
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
4
4
|
<%- partial('header', {item: item}) %>
|
|
5
5
|
<div class='content'>
|
|
6
6
|
<ul class="entry navigation">
|
|
7
7
|
<% site.categories.sort('path').each(function(category){ %>
|
|
8
8
|
<li><a class="flat-box<%= category.parent ? ' child' : ''%>"
|
|
9
9
|
title="<%- url_for(category.path) %>" href="<%- url_for(category.path) %>"
|
|
10
|
-
|
|
10
|
+
active-action="action-<%= url_for(category.path).replace(/\/|%|\./g, "")?url_for(category.path).replace(/\/|%|\./g, ""):"home" %>"
|
|
11
11
|
><div class='name'><%- category.name %></div><div class='badge'>(<%- category.posts.length %>)</div></a></li>
|
|
12
12
|
<% }) %>
|
|
13
13
|
</ul>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<div class='content'>
|
|
4
4
|
<% if (item.blockquote == true) { %>
|
|
5
5
|
<blockquote>
|
package/layout/_widget/grid.ejs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
5
|
<div class="grid navigation<%- item.fixed ? ' fixed' : '' %>">
|
|
6
6
|
<% (item.rows||[]).forEach(function(row){ %>
|
|
7
|
-
<a class="flat-box"
|
|
7
|
+
<a class="flat-box" href="<%- url_for(row.url) %>"
|
|
8
8
|
<% if (row.rel) { %>
|
|
9
9
|
rel="<%- row.rel %>"
|
|
10
10
|
<% } %>
|
|
11
11
|
<% if (row.target) { %>
|
|
12
12
|
target="<%- row.target %>"
|
|
13
13
|
<% } %>
|
|
14
|
-
|
|
14
|
+
active-action="action-<%= url_for(row.url).replace(/\/|%|\./g, "")?url_for(row.url).replace(/\/|%|\./g, ""):"home" %>">
|
|
15
15
|
<% if (row.img) { %>
|
|
16
16
|
<img src="<%- row.img %>">
|
|
17
17
|
<% } else if(row.avatar) { %>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<%
|
|
2
|
+
function genList() {
|
|
3
|
+
let content = '';
|
|
4
|
+
site.posts.filter(p => {
|
|
5
|
+
return p.title && p.title.length > 0;
|
|
6
|
+
}).sort("updated", -1).limit(5).each(item => {
|
|
7
|
+
content += `<li><a class="widget-last" href="${url_for(item.link || item.path)}">`;
|
|
8
|
+
content += '<div class="item">';
|
|
9
|
+
content += `<time>${date(item.updated, config.date_format)}</time>`;
|
|
10
|
+
item.categories.limit(1).forEach((cat, i) => {
|
|
11
|
+
content += `<span>${cat.name}</span>`;
|
|
12
|
+
});
|
|
13
|
+
content += '</div>';
|
|
14
|
+
content += `<span>${item.title}</span>`;
|
|
15
|
+
content += '</a></li>';
|
|
16
|
+
content += '';
|
|
17
|
+
})
|
|
18
|
+
return `<ul class="list entry navigation">${content}</ul>`;
|
|
19
|
+
}
|
|
20
|
+
%>
|
|
21
|
+
<%- partial('_pre') %>
|
|
22
|
+
<section class="widget <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
23
|
+
<%- partial('header', {item: item}) %>
|
|
24
|
+
<div class='content'>
|
|
25
|
+
<%- genList() %>
|
|
26
|
+
</div>
|
|
27
|
+
</section>
|
package/layout/_widget/list.ejs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class == 'list' ? item.class : 'list ' + item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class == 'list' ? item.class : 'list ' + item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
5
|
<ul class="list entry navigation">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<% if (row.target) { %>
|
|
12
12
|
target="<%- row.target %>"
|
|
13
13
|
<% } %>
|
|
14
|
-
|
|
14
|
+
active-action="action-<%= url_for(row.url).replace(/\/|%|\./g, "")?url_for(row.url).replace(/\/|%|\./g, ""):"home" %>"
|
|
15
15
|
>
|
|
16
16
|
<div class='name'>
|
|
17
17
|
<% if (row.img) { %>
|
package/layout/_widget/load.ejs
CHANGED
|
@@ -4,3 +4,21 @@
|
|
|
4
4
|
<%- partial(w.class, {item: w, where: where}) %>
|
|
5
5
|
<% } %>
|
|
6
6
|
<% }) %>
|
|
7
|
+
<%
|
|
8
|
+
let widget_pjax_length = 0;
|
|
9
|
+
page.sidebar.forEach(function(e){
|
|
10
|
+
if (e&&theme.sidebar.widget_library&&theme.sidebar.widget_library[e]) {
|
|
11
|
+
let widget_pjax_flag = theme.sidebar.widget_library[e].pjaxReload
|
|
12
|
+
if (widget_pjax_flag || widget_pjax_flag===undefined) {
|
|
13
|
+
widget_pjax_length ++;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
let widget_pjax_place_length = Object.keys(theme.sidebar.widget_library).length - widget_pjax_length
|
|
18
|
+
%>
|
|
19
|
+
<!-- 没有 pjax 占位会报错 万恶的 pjax -->
|
|
20
|
+
<% for(let i=0;i<widget_pjax_place_length;i++){ %>
|
|
21
|
+
<div class="pjax">
|
|
22
|
+
<!-- pjax占位 -->
|
|
23
|
+
</div>
|
|
24
|
+
<% } %>
|
package/layout/_widget/music.ejs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
<%- partial('_pre') %>
|
|
1
2
|
<% if (theme.plugins.aplayer.enable == true) { %>
|
|
2
|
-
<section class='widget <%-
|
|
3
|
+
<section class='widget <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %> <%- item.class %>'>
|
|
3
4
|
<%- partial('header', {item: item}) %>
|
|
4
5
|
<div class='content'>
|
|
5
|
-
<%- partial('../
|
|
6
|
+
<%- partial('../_plugins/aplayer/layout', {post: null, where: 'widget'}) %>
|
|
6
7
|
</div>
|
|
7
8
|
</section>
|
|
8
9
|
<% } %>
|
package/layout/_widget/page.ejs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
5
|
<% site.pages.forEach(function(post){ %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content article-entry'>
|
|
5
5
|
<% (item.images||[]).forEach(function(url){ %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if(page.layout == 'post' && page.content && page.path != undefined){ %>
|
|
2
2
|
<%- partial('_pre') %>
|
|
3
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
3
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
4
4
|
<%- partial('header', {item: item}) %>
|
|
5
5
|
<div class="content">
|
|
6
6
|
<%- popular_posts( { maxCount: item.max_count , ulClass: 'popular-posts' , PPMixingRate: 0.2 } , page ) %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if (site.tags.length){ %>
|
|
2
2
|
<%- partial('_pre') %>
|
|
3
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
3
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
4
4
|
<%- partial('header', {item: item}) %>
|
|
5
5
|
<div class='content'>
|
|
6
6
|
<%- tagcloud(site.tags, {
|
package/layout/_widget/text.ejs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
|
-
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
|
|
2
|
+
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
5
|
<% (item.content||[]).forEach(function(row){ %>
|
package/layout/_widget/toc.ejs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<%- partial('_pre') %>
|
|
2
2
|
<% var realcontent = (page.encrypt == true) ? page.origin : page.content; %>
|
|
3
3
|
<% if (realcontent && page.toc != false && toc(realcontent).length > 0) { %>
|
|
4
|
-
<section class="widget toc-wrapper <%- page.widget_style %> <%- page.widget_platform %>" id="toc-div" <% if (page.encrypt == true) { %>style="display:none" <% } %>>
|
|
4
|
+
<section class="widget toc-wrapper <%- page.widget_style %> <%- page.widget_platform %> <%- page.widget_pjax %>" id="toc-div" <% if (page.encrypt == true) { %>style="display:none" <% } %>>
|
|
5
5
|
<%- partial('header', {item: item}) %>
|
|
6
6
|
<div class='content'>
|
|
7
7
|
<%- toc(realcontent, {list_number: item.list_number, min_depth: item.min_depth, max_depth: item.max_depth}) %>
|
|
8
8
|
</div>
|
|
9
9
|
</section>
|
|
10
|
-
<% } %>
|
|
10
|
+
<% }else{ %>
|
|
11
|
+
<div class="<%- page.widget_pjax %>">
|
|
12
|
+
<!-- pjax占位 -->
|
|
13
|
+
</div>
|
|
14
|
+
<% } %>
|