From 7bf0adfd98b7e863cf3a5ef948dda17f93dc702c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=AE=87?= <448766534@qq.com> Date: Thu, 23 Apr 2020 15:04:32 +0800 Subject: [PATCH] :art: fix: code --- layout/_partial/after-footer.ejs | 27 +++++++++++++-------------- source-src/js/ayer.js | 3 ++- source/dist/main.js | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 80a07ed..ac40d69 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -1,5 +1,6 @@ <%- js('/js/jquery-2.0.3.min') %> <%- js('/js/lazyload.min') %> + <% if (theme.subtitle.enable){ %> <% } %> - + <% if (theme.toc && is_post() && !page.no_toc){ %> <%- js('/js/tocbot.min') %> <% } %> - - <%- js('dist/main') %> - + <% if (theme.image_viewer){ %> <%- partial('viewer') %> <% } %> + <% if (theme.mathjax){ %> <%- partial('mathjax') %> <% } %> + <% if (theme.katex.enable){ %> <%- partial('katex') %> <% } %> + <% if (theme.busuanzi && theme.busuanzi.enable){ %> <%- js('/js/busuanzi-2.3.pure.min') %> <% } %> - - + <% if (theme.clickLove){ %> - <%- js('/js/clickLove') %> +<%- js('/js/clickLove') %> <% } %> - - + <% if (theme.copy_btn == true) { %> - <%- css('/css/clipboard') %> - <%- partial('post/clipboard') %> -<% } %> +<%- css('/css/clipboard') %> +<%- partial('post/clipboard') %> +<% } %> \ No newline at end of file diff --git a/source-src/js/ayer.js b/source-src/js/ayer.js index 6b40624..6a23db3 100644 --- a/source-src/js/ayer.js +++ b/source-src/js/ayer.js @@ -30,7 +30,7 @@ $searchWrap.removeClass('on'); } }); - + // 建议在移动端不初始化,其实 /search.xml 文件还挺大的, if ($('.local-search').size()) { $.getScript('/js/search.js', function () { @@ -171,6 +171,7 @@ ayerNameStyle, ayerNameStr ); + document.write(''); })(jQuery); diff --git a/source/dist/main.js b/source/dist/main.js index ce1df23..69b0662 100644 --- a/source/dist/main.js +++ b/source/dist/main.js @@ -1,7 +1,7 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c1e3?e(n).stop().fadeTo(200,.6):e(n).stop().fadeTo(200,0)}),e(n).click(function(){return e(".content").animate({scrollTop:0},1600),!1});var r=e(".content"),s=e(".sidebar");e(".navbar-toggle").on("click",function(){e(".content,.sidebar").addClass("anim"),r.toggleClass("on"),s.toggleClass("on")}),e("#reward-btn").click(function(){e("#reward").fadeIn(150),e("#mask").fadeIn(150)}),e("#reward .close, #mask").click(function(){e("#mask").fadeOut(100),e("#reward").fadeOut(100)}),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").click(function(){1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))});console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","主题不错?⭐star 支持一下 ->","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/Shen-Yu/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n")}(jQuery); +!function(e){var o=e(".search-form-wrap"),a=!1;e(".nav-item-search").click(function(){var s;a||(a=!0,o.addClass("on"),s=function(){e(".local-search-input").focus()},setTimeout(function(){a=!1,s&&s()},200))}),e(document).mouseup(function(a){var s=e(".local-search");s.is(a.target)||0!==s.has(a.target).length||o.removeClass("on")}),e(".local-search").size()&&e.getScript("/js/search.js",function(){searchFunc("/search.xml","local-search-input","local-search-result")});var s;e(".share-outer").click(function(){return e(".share-wrap").fadeToggle()}),e("img.lazy").lazyload({effect:"fadeIn"}),e("#gallery").justifiedGallery({rowHeight:200,margins:5}),e(document).ready(function(e){e(".anchor").click(function(o){o.preventDefault(),e("main").animate({scrollTop:e(".cover").height()},"smooth")})}),(s=e("#totop")).hide(),e(".content").scroll(function(){e(".content").scrollTop()>1e3?e(s).stop().fadeTo(200,.6):e(s).stop().fadeTo(200,0)}),e(s).click(function(){return e(".content").animate({scrollTop:0},1600),!1});var n=e(".content"),r=e(".sidebar");e(".navbar-toggle").on("click",function(){e(".content,.sidebar").addClass("anim"),n.toggleClass("on"),r.toggleClass("on")}),e("#reward-btn").click(function(){e("#reward").fadeIn(150),e("#mask").fadeIn(150)}),e("#reward .close, #mask").click(function(){e("#mask").fadeOut(100),e("#reward").fadeOut(100)}),1==sessionStorage.getItem("darkmode")?(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line")):(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line")),e("#todark").click(function(){1==sessionStorage.getItem("darkmode")?(e("body").removeClass("darkmode"),e("#todark i").removeClass("ri-sun-line").addClass("ri-moon-line"),sessionStorage.removeItem("darkmode")):(e("body").addClass("darkmode"),e("#todark i").removeClass("ri-moon-line").addClass("ri-sun-line"),sessionStorage.setItem("darkmode",1))});console.log("%c%s%c%s%c%s","background-color: #49b1f5; color: #fff; padding: 8px; font-size: 14px;","主题不错?⭐star 支持一下 ->","background-color: #ffbca2; padding: 8px; font-size: 14px;","https://github.com/Shen-Yu/hexo-theme-ayer","background-color: #eaf8ff;","\n\n _ __ _______ _____ \n / \\ \\ \\ / / ____| _ \\ \n / _ \\ \\ V /| _| | |_) | \n / ___ \\ | | | |___| _ < \n /_/ \\_\\ _| |_____|_| \\__\\ \n"),document.write('