This commit is contained in:
Van 2019-03-04 17:25:36 +08:00
parent a08a2f385b
commit 0d85dfbfd1
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
21 changed files with 15 additions and 30 deletions

View File

@ -47,5 +47,6 @@
Util.initSW();
Util.parseMarkdown();
Util.killIE(10)
Util.previewImg()
</script>
${plugins}

View File

@ -28,10 +28,6 @@
*/
var Skin = {
_initCommon: function ($goTop) {
$('body').on('click', '.content-reset img', function () {
window.open(this.src);
});
var $banner = $('header .banner'),
$navbar = $('header .navbar');

View File

@ -1 +1 @@
var Skin={_initCommon:function(i){$("body").on("click",".content-reset img",function(){window.open(this.src)});var t=$("header .banner"),n=$("header .navbar");$(window).scroll(function(){if(125<$(window).scrollTop()?i.show():i.hide(),$(window).width()<701)return!1;$(window).scrollTop()>t.height()?(n.addClass("pin"),$(".main-wrap").parent().css("margin-top","86px")):(n.removeClass("pin"),$(".main-wrap").parent().css("margin-top","0"))})},init:function(){this._initCommon($(".icon-up")),$(".navbar nav a").each(function(){this.href===location.href&&(this.className="current")}),$(".responsive .list a").each(function(){this.href===location.href&&$(this).parent().addClass("current")}),$(".responsive .icon-list").click(function(){$(".responsive .list").slideToggle()})},_initArticleCommon:function(i,t){if(0<$(".b3-solo-list li").length&&1e3<$(window).width()){$("aside").addClass("has-toc");var n='<ul class="fn-clear"><li class="current" data-tab="toc">'+i+'</li><li data-tab="site">'+t+"</li></ul><section></section>";$("aside").prepend(n);var o=$("aside section:first").html($(".b3-solo-list")),s=$("aside section:last");o.height($(window).height()-154).css({overflow:"auto",width:$("aside").width()+"px"}),s.hide(),$("aside > ul > li").click(function(){"toc"===$(this).data("tab")?s.animate({opacity:"0",top:"-50px"},300,function(){o.show().css("top","-50px"),o.animate({opacity:"1",top:"0"},300).show()}):o.animate({opacity:"0",top:"-50px"},300,function(){o.hide().css("top","-50px"),s.animate({opacity:"1",top:"0"},300).show()}).hide(),$("aside > ul > li").removeClass("current"),$(this).addClass("current")}),$(window).scroll(function(){125<$(window).scrollTop()?$("aside section:eq(0)").css({position:"fixed",top:"51px",backgroundColor:"#fff"}):$("aside section:eq(0)").css({position:"inherit",borderLeft:0})})}},initArticle:function(i,t){this._initArticleCommon(i,t)}};Skin.init();
var Skin={_initCommon:function(i){var t=$("header .banner"),n=$("header .navbar");$(window).scroll(function(){if(125<$(window).scrollTop()?i.show():i.hide(),$(window).width()<701)return!1;$(window).scrollTop()>t.height()?(n.addClass("pin"),$(".main-wrap").parent().css("margin-top","86px")):(n.removeClass("pin"),$(".main-wrap").parent().css("margin-top","0"))})},init:function(){this._initCommon($(".icon-up")),$(".navbar nav a").each(function(){this.href===location.href&&(this.className="current")}),$(".responsive .list a").each(function(){this.href===location.href&&$(this).parent().addClass("current")}),$(".responsive .icon-list").click(function(){$(".responsive .list").slideToggle()})},_initArticleCommon:function(i,t){if(0<$(".b3-solo-list li").length&&1e3<$(window).width()){$("aside").addClass("has-toc");var n='<ul class="fn-clear"><li class="current" data-tab="toc">'+i+'</li><li data-tab="site">'+t+"</li></ul><section></section>";$("aside").prepend(n);var o=$("aside section:first").html($(".b3-solo-list")),s=$("aside section:last");o.height($(window).height()-154).css({overflow:"auto",width:$("aside").width()+"px"}),s.hide(),$("aside > ul > li").click(function(){"toc"===$(this).data("tab")?s.animate({opacity:"0",top:"-50px"},300,function(){o.show().css("top","-50px"),o.animate({opacity:"1",top:"0"},300).show()}):o.animate({opacity:"0",top:"-50px"},300,function(){o.hide().css("top","-50px"),s.animate({opacity:"1",top:"0"},300).show()}).hide(),$("aside > ul > li").removeClass("current"),$(this).addClass("current")}),$(window).scroll(function(){125<$(window).scrollTop()?$("aside section:eq(0)").css({position:"fixed",top:"51px",backgroundColor:"#fff"}):$("aside section:eq(0)").css({position:"inherit",borderLeft:0})})}},initArticle:function(i,t){this._initArticleCommon(i,t)}};Skin.init();

View File

@ -45,5 +45,6 @@
Util.initSW();
Util.parseMarkdown();
Util.killIE(8)
Util.previewImg()
</script>
${plugins}

View File

@ -54,5 +54,6 @@
Util.initSW();
Util.parseMarkdown();
Util.killIE(8)
Util.previewImg()
</script>
${plugins}

View File

@ -64,10 +64,6 @@ var Skin = {
$('.header a').removeClass('current')
this.className = 'current tooltipped tooltipped__w'
})
$('body').on('click', '.content-reset img', function () {
window.open(this.src)
})
},
}
Skin.init()

View File

@ -1 +1 @@
var Skin={initToc:function(){0<$(".b3-solo-list li").length&&768<$(window).width()?($(".b3-solo-list").css({right:"50px","border-right":"1px solid #fff",opacity:1}),$("#pjax.wrapper").css({"max-width":"968px","padding-right":"270px"})):$("#pjax.wrapper").removeAttr("style")},init:function(){Skin.initToc(),Util.initPjax(function(){$(".header a").each(function(){this.href===location.href?this.className="current tooltipped tooltipped__w":this.className="tooltipped tooltipped__w"}),Skin.initToc()}),$(".header a").each(function(){this.href===location.href&&(this.className="current tooltipped tooltipped__w")}).click(function(){$(".header a").removeClass("current"),this.className="current tooltipped tooltipped__w"}),$("body").on("click",".content-reset img",function(){window.open(this.src)})}};Skin.init();
var Skin={initToc:function(){0<$(".b3-solo-list li").length&&768<$(window).width()?($(".b3-solo-list").css({right:"50px","border-right":"1px solid #fff",opacity:1}),$("#pjax.wrapper").css({"max-width":"968px","padding-right":"270px"})):$("#pjax.wrapper").removeAttr("style")},init:function(){Skin.initToc(),Util.initPjax(function(){$(".header a").each(function(){this.href===location.href?this.className="current tooltipped tooltipped__w":this.className="tooltipped tooltipped__w"}),Skin.initToc()}),$(".header a").each(function(){this.href===location.href&&(this.className="current tooltipped tooltipped__w")}).click(function(){$(".header a").removeClass("current"),this.className="current tooltipped tooltipped__w"})}};Skin.init();

View File

@ -60,5 +60,6 @@
Util.initSW();
Util.killIE(8)
Util.parseMarkdown();
Util.previewImg()
</script>
${plugins}

View File

@ -28,10 +28,6 @@
*/
var Skin = {
init: function () {
$('body').on('click', '.content-reset img', function () {
window.open(this.src);
});
$(window).scroll(function () {
if ($('#headerNav').length === 0) {
return

View File

@ -1 +1 @@
var Skin={init:function(){$("body").on("click",".content-reset img",function(){window.open(this.src)}),$(window).scroll(function(){0!==$("#headerNav").length&&(64<$(window).scrollTop()?($("#headerNav").addClass("header__nav--fixed"),$(".main").css("margin-top","100px")):($("#headerNav").removeClass("header__nav--fixed"),$(".main").css("margin-top","50px")))}),$(window).scroll(),Util.initPjax(function(){Util.parseMarkdown(),Util.isArticlePage(location.href)&&($("#articleSideShare .article__code").qrcode||$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0}))})},initTags:function(){for(var t=$("#tags"),e=t.find(".tag"),i=parseInt(e.first().data("count")),a=Math.ceil(i/5),o=0;o<e.length;o++)for(var n=parseInt($(e[o]).data("count")),s=0;s<5;s++)if(s*a<n&&n<=(s+1)*a){e[o].className="tag tag__level"+s;break}t.html(e.get().sort(function(t,e){var i=$(t).text().toLowerCase(),a=$(e).text().toLowerCase();return i.localeCompare(a)}))},initArticle:function(){if(0!==$("#articleShare").length){Skin._share("#articleShare"),Skin._share("#articleSideShare"),Skin._share("#articleBottomShare");var i=$(".post__side");$(window).height()>=$(".post").height()&&i.css("opacity",1),i.css("left",($(".post").offset().left-20)/2-27+"px");var a=($(window).height()-249)/2+125,o=$(window).scrollTop();$(window).scroll(function(){if(0!==$("#articleShare").length){var t=$(window).scrollTop(),e=$(".article__bottom").offset().top;65<t?(i.css("opacity",1),0<o-t?($(".header").addClass("header--fixed").css({top:"0"}),$(".main").css("padding-top","64px"),$(window).height()<=$(".post").height()&&t<e-$(window).height()&&$(".article__toolbar").css({bottom:0,opacity:1})):o-t<0&&($(".header").css({top:"-64px"}).removeClass("header--fixed"),$(".main").css("padding-top","0"),$(".article__toolbar").css({bottom:"-44px",opacity:0}))):($(window).height()<=$(".post").height()&&i.css("opacity",0),$(".header").removeClass("header--fixed").css("top","-64px"),$(".main").css("padding-top","0")),t>e-$(window).height()?e<$(window).height()?i.css({position:"absolute",top:e-125+"px"}):i.css({position:"absolute",top:e-a+"px"}):i.css({position:"fixed",top:"50%"}),o=t}}),$(window).scroll()}},_share:function(t){var e=$(t),i=e.find(".article__code"),a=i.data("url"),o=i.data("avatar"),n=encodeURIComponent(i.data("title")+" - "+i.data("blogtitle")),s=encodeURIComponent(a),r={};r.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+n+"&url="+s+"&pic="+o,r.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+s+"&pic="+o,r.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+s+"&sharesource=qzone&title="+n+"&pics="+o,r.twitter="https://twitter.com/intent/tweet?status="+n+" "+s,e.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===i.find("canvas").length?i.qrcode({width:128,height:128,text:a}):i.slideToggle(),!1):void window.open(r[t],"_blank","top=100,left=200,width=648,height=618")})}};Skin.init();
var Skin={init:function(){$(window).scroll(function(){0!==$("#headerNav").length&&(64<$(window).scrollTop()?($("#headerNav").addClass("header__nav--fixed"),$(".main").css("margin-top","100px")):($("#headerNav").removeClass("header__nav--fixed"),$(".main").css("margin-top","50px")))}),$(window).scroll(),Util.initPjax(function(){Util.parseMarkdown(),Util.isArticlePage(location.href)&&($("#articleSideShare .article__code").qrcode||$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0}))})},initTags:function(){for(var t=$("#tags"),e=t.find(".tag"),i=parseInt(e.first().data("count")),a=Math.ceil(i/5),o=0;o<e.length;o++)for(var s=parseInt($(e[o]).data("count")),n=0;n<5;n++)if(n*a<s&&s<=(n+1)*a){e[o].className="tag tag__level"+n;break}t.html(e.get().sort(function(t,e){var i=$(t).text().toLowerCase(),a=$(e).text().toLowerCase();return i.localeCompare(a)}))},initArticle:function(){if(0!==$("#articleShare").length){Skin._share("#articleShare"),Skin._share("#articleSideShare"),Skin._share("#articleBottomShare");var i=$(".post__side");$(window).height()>=$(".post").height()&&i.css("opacity",1),i.css("left",($(".post").offset().left-20)/2-27+"px");var a=($(window).height()-249)/2+125,o=$(window).scrollTop();$(window).scroll(function(){if(0!==$("#articleShare").length){var t=$(window).scrollTop(),e=$(".article__bottom").offset().top;65<t?(i.css("opacity",1),0<o-t?($(".header").addClass("header--fixed").css({top:"0"}),$(".main").css("padding-top","64px"),$(window).height()<=$(".post").height()&&t<e-$(window).height()&&$(".article__toolbar").css({bottom:0,opacity:1})):o-t<0&&($(".header").css({top:"-64px"}).removeClass("header--fixed"),$(".main").css("padding-top","0"),$(".article__toolbar").css({bottom:"-44px",opacity:0}))):($(window).height()<=$(".post").height()&&i.css("opacity",0),$(".header").removeClass("header--fixed").css("top","-64px"),$(".main").css("padding-top","0")),t>e-$(window).height()?e<$(window).height()?i.css({position:"absolute",top:e-125+"px"}):i.css({position:"absolute",top:e-a+"px"}):i.css({position:"fixed",top:"50%"}),o=t}}),$(window).scroll()}},_share:function(t){var e=$(t),i=e.find(".article__code"),a=i.data("url"),o=i.data("avatar"),s=encodeURIComponent(i.data("title")+" - "+i.data("blogtitle")),n=encodeURIComponent(a),r={};r.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+s+"&url="+n+"&pic="+o,r.weibo="http://v.t.sina.com.cn/share/share.php?title="+s+"&url="+n+"&pic="+o,r.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+n+"&sharesource=qzone&title="+s+"&pics="+o,r.twitter="https://twitter.com/intent/tweet?status="+s+" "+n,e.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===i.find("canvas").length?i.qrcode({width:128,height:128,text:a}):i.slideToggle(),!1):void window.open(r[t],"_blank","top=100,left=200,width=648,height=618")})}};Skin.init();

View File

@ -98,5 +98,6 @@
Util.initSW()
Util.parseMarkdown()
Util.killIE()
Util.previewImg()
</script>
${plugins}

View File

@ -57,10 +57,6 @@ var Skin = {
})
})
$('body').on('click', '.content-reset img', function () {
window.open(this.src)
})
$('.header__nav a').each(function () {
if (this.href === location.href) {
this.className = 'current'

View File

@ -1 +1 @@
var Skin={init:function(){new Headroom($("header")[0],{tolerance:0,offset:70,classes:{initial:"header",pinned:"header--down",unpinned:"header--up",top:"header",notTop:"header",bottom:"header",notBottom:"header"}}).init(),Util.initPjax(function(){0===$(".post__fix").length?$("body").addClass("body--gray"):$("body").removeClass("body--gray"),$(".header__nav a").each(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})}),$("body").on("click",".content-reset img",function(){window.open(this.src)}),$(".header__nav a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})},_initToc:function(){0===$(".content-reset .b3-solo-list li").length||$(window).width()<746?$(".post__toc .b3-solo-list").remove():($(".post__toc").html($(".b3-solo-list")).css("left",$(".post").offset().left+$(".post").outerWidth()),$(window).scroll(function(){72<$(window).scrollTop()?$(".post__toc").show():$(".post__toc").hide()}))},_initShare:function(){var t=$(".post__share"),e=t.find(".post__code"),o=e.data("url"),n=e.data("avatar"),i=encodeURIComponent(e.data("title")+" - "+e.data("blogtitle")),a=encodeURIComponent(o),s={};s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+a+"&pic="+n,s.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+a+"&sharesource=qzone&title="+i+"&pics="+n,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+a,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===e.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){e.qrcode({width:128,height:128,text:o})}}):e.find("canvas").slideToggle(),!1):void window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})},initArticle:function(){new Headroom($(".post__fix")[0],{tolerance:0,offset:48,classes:{initial:"post__fix",pinned:"post__fix--pinned",unpinned:"post__fix--unpinned",top:"post__fix",notTop:"post__fix",bottom:"post__fix",notBottom:"post__fix"}}).init(),Skin._initShare(),Skin._initToc()}};Skin.init();
var Skin={init:function(){new Headroom($("header")[0],{tolerance:0,offset:70,classes:{initial:"header",pinned:"header--down",unpinned:"header--up",top:"header",notTop:"header",bottom:"header",notBottom:"header"}}).init(),Util.initPjax(function(){0===$(".post__fix").length?$("body").addClass("body--gray"):$("body").removeClass("body--gray"),$(".header__nav a").each(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})}),$(".header__nav a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})},_initToc:function(){0===$(".content-reset .b3-solo-list li").length||$(window).width()<746?$(".post__toc .b3-solo-list").remove():($(".post__toc").html($(".b3-solo-list")).css("left",$(".post").offset().left+$(".post").outerWidth()),$(window).scroll(function(){72<$(window).scrollTop()?$(".post__toc").show():$(".post__toc").hide()}))},_initShare:function(){var t=$(".post__share"),e=t.find(".post__code"),o=e.data("url"),i=e.data("avatar"),n=encodeURIComponent(e.data("title")+" - "+e.data("blogtitle")),a=encodeURIComponent(o),s={};s.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+a+"&pic="+i,s.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+a+"&sharesource=qzone&title="+n+"&pics="+i,s.twitter="https://twitter.com/intent/tweet?status="+n+" "+a,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===e.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){e.qrcode({width:128,height:128,text:o})}}):e.find("canvas").slideToggle(),!1):void window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})},initArticle:function(){new Headroom($(".post__fix")[0],{tolerance:0,offset:48,classes:{initial:"post__fix",pinned:"post__fix--pinned",unpinned:"post__fix--unpinned",top:"post__fix",notTop:"post__fix",bottom:"post__fix",notBottom:"post__fix"}}).init(),Skin._initShare(),Skin._initToc()}};Skin.init();

View File

@ -44,5 +44,6 @@
<script>
Util.initSW();
Util.parseMarkdown();
Util.previewImg()
</script>
${plugins}

View File

@ -55,5 +55,6 @@
Util.initSW();
Util.parseMarkdown();
Util.killIE(8);
Util.previewImg()
</script>
${plugins}

View File

@ -89,10 +89,6 @@ var NexT = {
'right': '0'
});
}, 500);
$('body').on('click', '.content-reset img', function () {
window.open(this.src);
});
});
},
initArticle: function () {

2
next/js/next.min.js vendored
View File

@ -1 +1 @@
var NexT={init:function(){$(".sidebar-toggle").click(function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320}),i.find("section").css("opacity",0)):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0},function(){i.find("section:first").animate({opacity:1})}))}),$(".site-nav-toggle").click(function(){$(".site-nav").slideToggle()}),$(document).ready(function(){setTimeout(function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},function(){$(".site-title").css("opacity",1).animate({top:0},function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"},function(){0<$(".b3-solo-list li").length&&1e3<$(window).width()&&$(".sidebar-toggle").click()})})}),$(".logo-line-after i").animate({right:"0"})},500),$("body").on("click",".content-reset img",function(){window.open(this.src)})})},initArticle:function(){if(0<$(".b3-solo-list li").length&&1e3<$(window).width()){$(".sidebar-toggle").addClass("has-toc");var i='<ul><li class="current" data-tab="toc">'+Label.tocLabel+'</li><li data-tab="site">'+Label.siteViewLabel+"</li></ul><section></section>";$(".sidebar").prepend(i);var t=$(".sidebar section:first").html($(".b3-solo-list")),e=$(".sidebar section:last");t.height($(window).height()-90),$(".sidebar > ul > li").click(function(){"toc"===$(this).data("tab")?e.animate({opacity:"0",top:"-50px"},300,function(){t.show().css("top","-50px"),t.animate({opacity:"1",top:"0"},300)}):t.animate({opacity:"0",top:"-50px"},300,function(){t.hide().css("top","-50px"),e.animate({opacity:"1",top:"0"},300)}),$(".sidebar > ul > li").removeClass("current"),$(this).addClass("current")}),this.initToc()}},initToc:function(){var s=$(".content-reset [id^=b3_solo_h]"),c=$(".b3-solo-list");$(window).scroll(function(i){if(0===$(".b3-solo-list li").length)return!1;var t=[];s.each(function(i){t.push({id:this.id,offsetTop:this.offsetTop})});for(var e=$(window).scrollTop(),a=0,o=t.length;a<o;a++)if(e<t[a].offsetTop+200){c.find("li").removeClass("current");var n=0<a?a-1:0;c.find('a[href="#'+t[n].id+'"]').parent().addClass("current");break}e>=t[t.length-1].offsetTop+200&&(c.find("li").removeClass("current"),c.find("li:last").addClass("current"))}),$(window).scroll()}};NexT.init();
var NexT={init:function(){$(".sidebar-toggle").click(function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320}),i.find("section").css("opacity",0)):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0},function(){i.find("section:first").animate({opacity:1})}))}),$(".site-nav-toggle").click(function(){$(".site-nav").slideToggle()}),$(document).ready(function(){setTimeout(function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},function(){$(".site-title").css("opacity",1).animate({top:0},function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"},function(){0<$(".b3-solo-list li").length&&1e3<$(window).width()&&$(".sidebar-toggle").click()})})}),$(".logo-line-after i").animate({right:"0"})},500)})},initArticle:function(){if(0<$(".b3-solo-list li").length&&1e3<$(window).width()){$(".sidebar-toggle").addClass("has-toc");var i='<ul><li class="current" data-tab="toc">'+Label.tocLabel+'</li><li data-tab="site">'+Label.siteViewLabel+"</li></ul><section></section>";$(".sidebar").prepend(i);var t=$(".sidebar section:first").html($(".b3-solo-list")),a=$(".sidebar section:last");t.height($(window).height()-90),$(".sidebar > ul > li").click(function(){"toc"===$(this).data("tab")?a.animate({opacity:"0",top:"-50px"},300,function(){t.show().css("top","-50px"),t.animate({opacity:"1",top:"0"},300)}):t.animate({opacity:"0",top:"-50px"},300,function(){t.hide().css("top","-50px"),a.animate({opacity:"1",top:"0"},300)}),$(".sidebar > ul > li").removeClass("current"),$(this).addClass("current")}),this.initToc()}},initToc:function(){var s=$(".content-reset [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(i){if(0===$(".b3-solo-list li").length)return!1;var t=[];s.each(function(i){t.push({id:this.id,offsetTop:this.offsetTop})});for(var a=$(window).scrollTop(),e=0,o=t.length;e<o;e++)if(a<t[e].offsetTop+200){l.find("li").removeClass("current");var n=0<e?e-1:0;l.find('a[href="#'+t[n].id+'"]').parent().addClass("current");break}a>=t[t.length-1].offsetTop+200&&(l.find("li").removeClass("current"),l.find("li:last").addClass("current"))}),$(window).scroll()}};NexT.init();

View File

@ -53,5 +53,6 @@
Util.initSW();
Util.parseMarkdown();
Util.killIE(8)
Util.previewImg()
</script>
${plugins}

View File

@ -87,10 +87,6 @@ var Skin = {
Skin._initAnimation()
$('body').on('click', '.content-reset img', function () {
window.open(this.src)
})
this._initCommon($('.icon__up'))
$('.header__nav a, .header__m a').each(function () {

View File

@ -1 +1 @@
var Skin={_initCommon:function(e){$(window).scroll(function(){125<$(window).scrollTop()?e.show():e.hide(),0<$(".side .b3-solo-list").length&&(50<$(window).scrollTop()?$(".side").css("position","fixed"):$(".side").css("position","initial"))})},_initAnimation:function(){if(!("IntersectionObserver"in window))return $(".item").addClass("item--active"),!1;window.imageIntersectionObserver?window.imageIntersectionObserver.disconnect():window.imageIntersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){if(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)$(e.target).addClass("item--active");else{if(1===$(e.target).closest(".side").length||1===$(e.target).closest("#articlePage").length||768<$(e.target).outerHeight())return;$(e.target).removeClass("item--active")}})}),$(".item").each(function(){window.imageIntersectionObserver.observe(this)})},init:function(){Util.initPjax(function(){Skin._initAnimation(),0===$("#articlePage").length&&$(".b3-solo-list").closest(".module").remove()}),Skin._initAnimation(),$("body").on("click",".content-reset img",function(){window.open(this.src)}),this._initCommon($(".icon__up")),$(".header__nav a, .header__m a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a, .header__m a").removeClass("current"),this.className="current",$(".header__m .module__list").hide()}),$(".header__logo").click(function(){$(".header__nav a, .header__m a").removeClass("current")})},_initArticleCommon:function(){if(768<$(window).width()){if(0===$("#articlePage .b3-solo-list li").length)return $(".side .b3-solo-list").closest(".module").remove(),void $(".side").css({height:"auto",position:"initial"});$("#articlePage").width($(".main").width()-310),0===$(".side .b3-solo-list").length&&$(".side").prepend('<div class="module"><div class="module__list"></div></div>').css({right:($(window).width()-$(".main").width())/2,position:"fixed",overflow:"auto",height:$(window).height()-30,top:30}),$(".side .module:eq(0) .module__list").html($(".b3-solo-list")),$(window).scroll(),$(".side").scrollTop(0)}else{if(0===$("#articlePage .b3-solo-list li").length)return void $(".header__m .icon__list").hide().next().hide();$(".header__m .icon__list").show().next().html($(".b3-solo-list")),$(".b3-solo-list a").click(function(){$(this).closest(".module__list").hide()})}},initArticle:function(){this._initArticleCommon(),setTimeout(function(){0===$("#externalRelevantArticlesWrap li").length&&($("#externalRelevantArticlesWrap").next().remove(),$("#externalRelevantArticlesWrap").remove()),0===$("#relevantArticlesWrap li").length&&($("#relevantArticlesWrap").prev().remove(),$("#relevantArticlesWrap").remove()),0===$("#randomArticlesWrap li").length&&($("#randomArticlesWrap").prev().remove(),$("#randomArticlesWrap").remove())},1e3)}};Skin.init();
var Skin={_initCommon:function(e){$(window).scroll(function(){125<$(window).scrollTop()?e.show():e.hide(),0<$(".side .b3-solo-list").length&&(50<$(window).scrollTop()?$(".side").css("position","fixed"):$(".side").css("position","initial"))})},_initAnimation:function(){if(!("IntersectionObserver"in window))return $(".item").addClass("item--active"),!1;window.imageIntersectionObserver?window.imageIntersectionObserver.disconnect():window.imageIntersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){if(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)$(e.target).addClass("item--active");else{if(1===$(e.target).closest(".side").length||1===$(e.target).closest("#articlePage").length||768<$(e.target).outerHeight())return;$(e.target).removeClass("item--active")}})}),$(".item").each(function(){window.imageIntersectionObserver.observe(this)})},init:function(){Util.initPjax(function(){Skin._initAnimation(),0===$("#articlePage").length&&$(".b3-solo-list").closest(".module").remove()}),Skin._initAnimation(),this._initCommon($(".icon__up")),$(".header__nav a, .header__m a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a, .header__m a").removeClass("current"),this.className="current",$(".header__m .module__list").hide()}),$(".header__logo").click(function(){$(".header__nav a, .header__m a").removeClass("current")})},_initArticleCommon:function(){if(768<$(window).width()){if(0===$("#articlePage .b3-solo-list li").length)return $(".side .b3-solo-list").closest(".module").remove(),void $(".side").css({height:"auto",position:"initial"});$("#articlePage").width($(".main").width()-310),0===$(".side .b3-solo-list").length&&$(".side").prepend('<div class="module"><div class="module__list"></div></div>').css({right:($(window).width()-$(".main").width())/2,position:"fixed",overflow:"auto",height:$(window).height()-30,top:30}),$(".side .module:eq(0) .module__list").html($(".b3-solo-list")),$(window).scroll(),$(".side").scrollTop(0)}else{if(0===$("#articlePage .b3-solo-list li").length)return void $(".header__m .icon__list").hide().next().hide();$(".header__m .icon__list").show().next().html($(".b3-solo-list")),$(".b3-solo-list a").click(function(){$(this).closest(".module__list").hide()})}},initArticle:function(){this._initArticleCommon(),setTimeout(function(){0===$("#externalRelevantArticlesWrap li").length&&($("#externalRelevantArticlesWrap").next().remove(),$("#externalRelevantArticlesWrap").remove()),0===$("#relevantArticlesWrap li").length&&($("#relevantArticlesWrap").prev().remove(),$("#relevantArticlesWrap").remove()),0===$("#randomArticlesWrap li").length&&($("#randomArticlesWrap").prev().remove(),$("#randomArticlesWrap").remove())},1e3)}};Skin.init();

View File

@ -65,5 +65,6 @@
Util.initSW();
Util.parseMarkdown();
Util.killIE(8)
Util.previewImg()
</script>
${plugins}