🎨 fix: code
This commit is contained in:
parent
a0e92eb20c
commit
7bf0adfd98
@ -1,5 +1,6 @@
|
|||||||
<%- js('/js/jquery-2.0.3.min') %>
|
<%- js('/js/jquery-2.0.3.min') %>
|
||||||
<%- js('/js/lazyload.min') %>
|
<%- js('/js/lazyload.min') %>
|
||||||
|
<!-- Subtitle -->
|
||||||
<% if (theme.subtitle.enable){ %>
|
<% if (theme.subtitle.enable){ %>
|
||||||
<script>
|
<script>
|
||||||
try {
|
try {
|
||||||
@ -12,15 +13,14 @@
|
|||||||
showCursor: <%= theme.subtitle.showCursor %>
|
showCursor: <%= theme.subtitle.showCursor %>
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!-- Tocbot -->
|
||||||
<% if (theme.toc && is_post() && !page.no_toc){ %>
|
<% if (theme.toc && is_post() && !page.no_toc){ %>
|
||||||
<%- js('/js/tocbot.min') %>
|
<%- js('/js/tocbot.min') %>
|
||||||
<script>
|
<script>
|
||||||
// Tocbot_v4.7.0 http://tscanlin.github.io/tocbot/
|
|
||||||
tocbot.init({
|
tocbot.init({
|
||||||
tocSelector: '.tocbot',
|
tocSelector: '.tocbot',
|
||||||
contentSelector: '.article-entry',
|
contentSelector: '.article-entry',
|
||||||
@ -34,16 +34,15 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>
|
||||||
<%- js('dist/main') %>
|
<%- js('dist/main') %>
|
||||||
|
<!-- ImageViewer -->
|
||||||
<% if (theme.image_viewer){ %>
|
<% if (theme.image_viewer){ %>
|
||||||
<%- partial('viewer') %>
|
<%- partial('viewer') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!-- MathJax -->
|
||||||
<% if (theme.mathjax){ %>
|
<% if (theme.mathjax){ %>
|
||||||
<%- partial('mathjax') %>
|
<%- partial('mathjax') %>
|
||||||
<script>
|
<script>
|
||||||
@ -52,20 +51,20 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!-- Katex -->
|
||||||
<% if (theme.katex.enable){ %>
|
<% if (theme.katex.enable){ %>
|
||||||
<%- partial('katex') %>
|
<%- partial('katex') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!-- busuanzi -->
|
||||||
<% if (theme.busuanzi && theme.busuanzi.enable){ %>
|
<% if (theme.busuanzi && theme.busuanzi.enable){ %>
|
||||||
<%- js('/js/busuanzi-2.3.pure.min') %>
|
<%- js('/js/busuanzi-2.3.pure.min') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!-- ClickLove -->
|
||||||
<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>
|
|
||||||
<% if (theme.clickLove){ %>
|
<% if (theme.clickLove){ %>
|
||||||
<%- js('/js/clickLove') %>
|
<%- js('/js/clickLove') %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!-- CodeCopy -->
|
||||||
<!-- 复制 -->
|
|
||||||
<% if (theme.copy_btn == true) { %>
|
<% if (theme.copy_btn == true) { %>
|
||||||
<%- css('/css/clipboard') %>
|
<%- css('/css/clipboard') %>
|
||||||
<%- partial('post/clipboard') %>
|
<%- partial('post/clipboard') %>
|
||||||
<% } %>
|
<% } %>
|
@ -171,6 +171,7 @@
|
|||||||
ayerNameStyle,
|
ayerNameStyle,
|
||||||
ayerNameStr
|
ayerNameStr
|
||||||
);
|
);
|
||||||
|
document.write('<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>');
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
2
source/dist/main.js
vendored
2
source/dist/main.js
vendored
@ -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;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"MiQR":[function(require,module,exports) {
|
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;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"MiQR":[function(require,module,exports) {
|
||||||
|
|
||||||
},{}],"jSg4":[function(require,module,exports) {
|
},{}],"jSg4":[function(require,module,exports) {
|
||||||
!function(e){var o=e(".search-form-wrap"),a=!1;e(".nav-item-search").click(function(){var n;a||(a=!0,o.addClass("on"),n=function(){e(".local-search-input").focus()},setTimeout(function(){a=!1,n&&n()},200))}),e(document).mouseup(function(a){var n=e(".local-search");n.is(a.target)||0!==n.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 n;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")})}),(n=e("#totop")).hide(),e(".content").scroll(function(){e(".content").scrollTop()>1e3?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('<script type="text/javascript" src="https://js.users.51.la/20544303.js"><\/script>')}(jQuery);
|
||||||
},{}],"BNiz":[function(require,module,exports) {
|
},{}],"BNiz":[function(require,module,exports) {
|
||||||
function e(e,t){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,t.sTitle).replace(/<%-sDesc%>/g,t.sDesc).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function t(){$(".wx-share-modal").addClass("in ready"),$("#share-mask").show()}function s(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}function r(s,r){"weibo"===s?e("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",r):"qq"===s?e("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",r):"douban"===s?e("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",r):"qzone"===s?e("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",r):"facebook"===s?e("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",r):"twitter"===s?e("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>&via=<%-config.url%>",r):"google"===s?e("https://plus.google.com/share?url=<%-sUrl%>",r):"weixin"===s&&t()}var c=function(){var e=document.querySelectorAll(".share-sns");if(e&&0!==e.length){var t=window.location.href,c=document.querySelector("title").innerHTML,o=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===o||/^(http:|https:)?\/\//.test(o)||(o=window.location.origin+o),e.forEach(function(e){e.onclick=function(s){r(e.getAttribute("data-type"),{sUrl:t,sPic:o,sTitle:c,sDesc:c})}}),document.querySelector("#mask").onclick=s,document.querySelector(".modal-close").onclick=s}};c();
|
function e(e,t){e=e.replace(/<%-sUrl%>/g,encodeURIComponent(t.sUrl)).replace(/<%-sTitle%>/g,t.sTitle).replace(/<%-sDesc%>/g,t.sDesc).replace(/<%-sPic%>/g,encodeURIComponent(t.sPic));window.open(e)}function t(){$(".wx-share-modal").addClass("in ready"),$("#share-mask").show()}function s(){$(".wx-share-modal").removeClass("in ready"),$("#share-mask").hide()}function r(s,r){"weibo"===s?e("http://service.weibo.com/share/share.php?url=<%-sUrl%>&title=<%-sTitle%>&pic=<%-sPic%>",r):"qq"===s?e("http://connect.qq.com/widget/shareqq/index.html?url=<%-sUrl%>&title=<%-sTitle%>&source=<%-sDesc%>",r):"douban"===s?e("https://www.douban.com/share/service?image=<%-sPic%>&href=<%-sUrl%>&name=<%-sTitle%>&text=<%-sDesc%>",r):"qzone"===s?e("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%-sUrl%>&title=<%-sTitle%>&pics=<%-sPic%>&summary=<%-sDesc%>",r):"facebook"===s?e("https://www.facebook.com/sharer/sharer.php?u=<%-sUrl%>",r):"twitter"===s?e("https://twitter.com/intent/tweet?text=<%-sTitle%>&url=<%-sUrl%>&via=<%-config.url%>",r):"google"===s?e("https://plus.google.com/share?url=<%-sUrl%>",r):"weixin"===s&&t()}var c=function(){var e=document.querySelectorAll(".share-sns");if(e&&0!==e.length){var t=window.location.href,c=document.querySelector("title").innerHTML,o=document.querySelectorAll(".article-entry img").length?document.querySelector(".article-entry img").getAttribute("src"):"";""===o||/^(http:|https:)?\/\//.test(o)||(o=window.location.origin+o),e.forEach(function(e){e.onclick=function(s){r(e.getAttribute("data-type"),{sUrl:t,sPic:o,sTitle:c,sDesc:c})}}),document.querySelector("#mask").onclick=s,document.querySelector(".modal-close").onclick=s}};c();
|
||||||
},{}],"epB2":[function(require,module,exports) {
|
},{}],"epB2":[function(require,module,exports) {
|
||||||
|
Loading…
Reference in New Issue
Block a user