This commit is contained in:
parent
068eb9613f
commit
a79849e8d4
2
9IPHP/js/common.min.js
vendored
2
9IPHP/js/common.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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($(window).scrollTop()>125?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($(".b3-solo-list li").length>0&&$(window).width()>1e3){$("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(){$(window).scrollTop()>125?$("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){$("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();
|
3
9IPHP/js/isotope.pkgd.min.js
vendored
3
9IPHP/js/isotope.pkgd.min.js
vendored
File diff suppressed because one or more lines are too long
9
Bruce/js/bootstrap.min.js
vendored
9
Bruce/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
Finding/js/Finding.min.js
vendored
2
Finding/js/Finding.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var Finding={init:function(){Util.killIE(),this._initToc(),$(".scroll-down").click(function(t){t.preventDefault();var n=$(this),o=$("html, body"),i=!!n.attr("data-offset")&&n.attr("data-offset"),e=parseInt(i);o.stop(!0,!1).animate({scrollTop:$(this.hash).offset().top+e},500)}),$("body").append('<a class="icon-gotop fn-none" href="javascript:Util.goTop()"></a><span class="menu-button icon-menu"><span class="word">Menu</span></span>'),$(".menu-button").click(function(t){t.stopPropagation(),$("body").toggleClass("nav-opened nav-closed")}),$(window).scroll(function(){$(window).scrollTop()>$(".main-header").height()?$(".icon-gotop").show():$(".icon-gotop").hide()})},_initToc:function(){if(0===$(".b3-solo-list li").length)return $(".nav .icon-list").hide(),void $(".nav .icon-sitemap").click();$(".nav ul:first").after($(".b3-solo-list")),$("body").toggleClass("nav-opened nav-closed"),$(".nav .icon-list").show(),Finding.tabNav("toc");var t=$(".article-body [id^=b3_solo_h]"),n=$(".b3-solo-list");$(window).scroll(function(o){if(0===$(".b3-solo-list li").length)return!1;var i=[];t.each(function(t){i.push({id:this.id,offsetTop:this.offsetTop})});for(var e=$(window).scrollTop(),s=0,a=i.length;s<a;s++)if(e<i[s].offsetTop+280){n.find("li").removeClass("current");var l=s>0?s-1:0;n.find('a[href="#'+i[l].id+'"]').parent().addClass("current");break}e>=i[i.length-1].offsetTop+280&&(n.find("li").removeClass("current"),n.find("li:last").addClass("current"))}),$(window).scroll()},tabNav:function(t){$(".nav .current").removeClass("current"),"toc"===t?($(".nav ul:first, .nav .count").hide(),$(".nav ul:last").show(),$(".icon-list").addClass("current")):($(".nav ul:first, .nav .count").show(),$(".nav ul:last").hide(),$(".icon-sitemap").addClass("current"))},share:function(){$(".share span").click(function(){var t=$(this).data("type"),n=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,i=$(".post-content img:eq(0)").attr("src"),e={};e.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+n+"&url="+o+"&pic="+i,e.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+o+"&pic="+i,e.google="https://plus.google.com/share?url="+o,e.twitter="https://twitter.com/intent/tweet?status="+n+" "+o,window.open(e[t],"_blank","top=100,left=200,width=648,height=618")})}};Finding.init();
|
||||
var Finding={init:function(){Util.killIE(),this._initToc(),$(".scroll-down").click(function(t){t.preventDefault();var n=$(this),o=$("html, body"),i=!!n.attr("data-offset")&&n.attr("data-offset"),e=parseInt(i);o.stop(!0,!1).animate({scrollTop:$(this.hash).offset().top+e},500)}),$("body").append('<a class="icon-gotop fn-none" href="javascript:Util.goTop()"></a><span class="menu-button icon-menu"><span class="word">Menu</span></span>'),$(".menu-button").click(function(t){t.stopPropagation(),$("body").toggleClass("nav-opened nav-closed")}),$(window).scroll(function(){$(window).scrollTop()>$(".main-header").height()?$(".icon-gotop").show():$(".icon-gotop").hide()})},_initToc:function(){if(0===$(".b3-solo-list li").length)return $(".nav .icon-list").hide(),void $(".nav .icon-sitemap").click();$(".nav ul:first").after($(".b3-solo-list")),$("body").toggleClass("nav-opened nav-closed"),$(".nav .icon-list").show(),Finding.tabNav("toc");var a=$(".article-body [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(t){if(0===$(".b3-solo-list li").length)return!1;var n=[];a.each(function(t){n.push({id:this.id,offsetTop:this.offsetTop})});for(var o=$(window).scrollTop(),i=0,e=n.length;i<e;i++)if(o<n[i].offsetTop+280){l.find("li").removeClass("current");var s=0<i?i-1:0;l.find('a[href="#'+n[s].id+'"]').parent().addClass("current");break}o>=n[n.length-1].offsetTop+280&&(l.find("li").removeClass("current"),l.find("li:last").addClass("current"))}),$(window).scroll()},tabNav:function(t){$(".nav .current").removeClass("current"),"toc"===t?($(".nav ul:first, .nav .count").hide(),$(".nav ul:last").show(),$(".icon-list").addClass("current")):($(".nav ul:first, .nav .count").show(),$(".nav ul:last").hide(),$(".icon-sitemap").addClass("current"))},share:function(){$(".share span").click(function(){var t=$(this).data("type"),n=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,i=$(".post-content img:eq(0)").attr("src"),e={};e.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+n+"&url="+o+"&pic="+i,e.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+o+"&pic="+i,e.google="https://plus.google.com/share?url="+o,e.twitter="https://twitter.com/intent/tweet?status="+n+" "+o,window.open(e[t],"_blank","top=100,left=200,width=648,height=618")})}};Finding.init();
|
2
Medium/js/common.min.js
vendored
2
Medium/js/common.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var Skin={init:function(){$("body").on("click",".content-reset img",function(){window.open(this.src)}),$(window).scroll(function(){0!==$("#headerNav").length&&($(window).scrollTop()>64?($("#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("content-reset"),Util.isArticlePage(location.href)&&($("#articleSideShare .article__code").qrcode||$.ajax({method:"GET",url:latkeConfig.staticServePath+"/skins/Medium/js/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(n>s*a&&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 t=$(".post__side");$(window).height()>=$(".post").height()&&t.css("opacity",1),t.css("left",($(".post").offset().left-20)/2-27+"px");var e=($(window).height()-249)/2+125,i=$(window).scrollTop();$(window).scroll(function(){if(0!==$("#articleShare").length){var a=$(window).scrollTop(),o=$(".article__bottom").offset().top;a>65?(t.css("opacity",1),i-a>0?($(".header").addClass("header--fixed").css({top:"0"}),$(".main").css("padding-top","64px"),$(window).height()<=$(".post").height()&&a<o-$(window).height()&&$(".article__toolbar").css({bottom:0,opacity:1})):i-a<0&&($(".header").css({top:"-64px"}).removeClass("header--fixed"),$(".main").css("padding-top","0"),$(".article__toolbar").css({bottom:"-44px",opacity:0}))):($(window).height()<=$(".post").height()&&t.css("opacity",0),$(".header").removeClass("header--fixed").css("top","-64px"),$(".main").css("padding-top","0")),a>o-$(window).height()?o<$(window).height()?t.css({position:"absolute",top:o-125+"px"}):t.css({position:"absolute",top:o-e+"px"}):t.css({position:"fixed",top:"50%"}),i=a}}),$(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.google="https://plus.google.com/share?url="+s,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(){$("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("content-reset"),Util.isArticlePage(location.href)&&($("#articleSideShare .article__code").qrcode||$.ajax({method:"GET",url:latkeConfig.staticServePath+"/skins/Medium/js/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.google="https://plus.google.com/share?url="+s,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();
|
2
Medium/js/jquery.qrcode.min.js
vendored
2
Medium/js/jquery.qrcode.min.js
vendored
File diff suppressed because one or more lines are too long
2
NeoEase/js/NeoEase.min.js
vendored
2
NeoEase/js/NeoEase.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var goTop=function(e){e=e||.1;var a=$(window).scrollTop(),t=1+e;if(window.scrollTo(0,Math.floor(a/t)),a>0){var n="goTop("+e+")";window.setTimeout(n,16)}},collapseArchive=function(e,a){var t=!0;"collapse-ico"===e.className?(e.className="expand-ico",t=!1):e.className="collapse-ico",$("#archiveSide li").each(function(){$(this).data("year")===a&&(t?$(this).show():$(this).hide())})},getArticle=function(e,a){var t=$("#abstract"+a),n=$("#content"+a);return""===n.html()?$.ajax({url:"/get-article-content?id="+a,type:"GET",dataType:"html",beforeSend:function(){t.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(a,i){e.className="collapse-ico",n.html(a),t.hide().css("background","none"),n.fadeIn("slow")}}):"expand-ico"===e.className?(t.hide(),n.fadeIn(),e.className="collapse-ico"):(n.hide(),t.fadeIn(),e.className="expand-ico"),!1},goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};!function(){$(window).scroll(function(){var e=$(window).scrollTop();if(e>182){var a=$(window).height(),t=e+a-21;$("body").height()-58<=e+a&&(t=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",t)}else $("#goTop").hide()});var e=(new Date).getFullYear(),a=e;$("#archiveSide li").each(function(t){var n=$(this);n.data("year")!==e&&$(this).hide(),a!==n.data("year")&&(a=n.data("year"),n.before("<li class='archive-year'><div onclick='collapseArchive(this, "+a+")' class='expand-ico'>"+a+" 年</div></li>"))}),$(".recent-comments .expand-ico").click(function(){"expand-ico"===this.className?($(this).parent().next().css({height:"auto","white-space":"normal"}),this.className="collapse-ico"):($(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")}),this.className="expand-ico")}),$(".nav ul li").each(function(){$(this).find("a").attr("href")===latkeConfig.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})}();
|
||||
var goTop=function(e){e=e||.1;var a=$(window).scrollTop(),t=1+e;if(window.scrollTo(0,Math.floor(a/t)),0<a){var n="goTop("+e+")";window.setTimeout(n,16)}},collapseArchive=function(e,a){var t=!0;"collapse-ico"===e.className?(e.className="expand-ico",t=!1):e.className="collapse-ico",$("#archiveSide li").each(function(){$(this).data("year")===a&&(t?$(this).show():$(this).hide())})},getArticle=function(t,e){var n=$("#abstract"+e),i=$("#content"+e);return""===i.html()?$.ajax({url:"/get-article-content?id="+e,type:"GET",dataType:"html",beforeSend:function(){n.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(e,a){t.className="collapse-ico",i.html(e),n.hide().css("background","none"),i.fadeIn("slow")}}):"expand-ico"===t.className?(n.hide(),i.fadeIn(),t.className="collapse-ico"):(i.hide(),n.fadeIn(),t.className="expand-ico"),!1},goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};!function(){$(window).scroll(function(){var e=$(window).scrollTop();if(182<e){var a=$(window).height(),t=e+a-21;$("body").height()-58<=e+a&&(t=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",t)}else $("#goTop").hide()});var t=(new Date).getFullYear(),n=t;$("#archiveSide li").each(function(e){var a=$(this);a.data("year")!==t&&$(this).hide(),n!==a.data("year")&&(n=a.data("year"),a.before("<li class='archive-year'><div onclick='collapseArchive(this, "+n+")' class='expand-ico'>"+n+" 年</div></li>"))}),$(".recent-comments .expand-ico").click(function(){"expand-ico"===this.className?($(this).parent().next().css({height:"auto","white-space":"normal"}),this.className="collapse-ico"):($(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")}),this.className="expand-ico")}),$(".nav ul li").each(function(){$(this).find("a").attr("href")===latkeConfig.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})}();
|
2
ease/js/ease.min.js
vendored
2
ease/js/ease.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getNextPage=function(){var e=$(".article-next");currentPage+=1;var t="/articles/";if(1===$("#tag").length){var a=location.pathname.split("/");t="/articles/tags/"+a[a.length-1]+"/"}else if(1===$("#archive").length){var a=location.pathname.split("/");t="/articles/archives/"+a[a.length-2]+"/"+a[a.length-1]+"/"}else if(1===$("#author").length){var a=location.pathname.split("/");t="/articles/authors/"+a[a.length-1]+"/"}$.ajax({url:latkeConfig.servePath+t+currentPage,type:"GET",beforeSend:function(){e.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(t,a){if(t.sc){for(var i="",r=t.rslts.pagination,n=0;n<t.rslts.articles.length;n++){var l=t.rslts.articles[n],s="";t.rslts.articles.length-1===n&&(s=" article-last"),i+='<li class="article'+s+'"><div class="article-title"><h2><a rel="bookmark" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleTitle+"</a>",l.hasUpdated&&(i+="<sup>"+Label.updatedLabel+"</sup>"),l.articlePutTop&&(i+="<sup>"+Label.topArticleLabel+"</sup>"),i+='</h2><div class="right"><a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'#comments">'+ +l.articleCommentCount+" "+Label.commentLabel+'</a> <a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleViewCount+" "+Label.viewLabel+'</a></div><div class="clear"></div></div><div class="article-body"><div id="abstract'+l.oId+'">'+l.articleAbstract+'</div><div id="content'+l.oId+'" class="none"></div></div><div class="right ft-gray">',l.hasUpdated?i+=Util.toDate(l.articleUpdateTime,"yy-MM-dd HH:mm"):i+=Util.toDate(l.articleCreateTime,"yy-MM-dd HH:mm"),i+=' <a href="'+latkeConfig.servePath+"/authors/"+l.authorId+'">'+l.authorName+'</a></div><div class="left ft-gray">'+Label.tag1Label+" ";for(var o=l.articleTags.split(","),c=0;c<o.length;c++)i+='<a rel="tag" href="'+latkeConfig.servePath+"/tags/"+encodeURIComponent(o[c])+'">'+o[c]+"</a>",c<o.length-1&&(i+=", ");i+='</div><div class="clear"></div></li>'}$(".article-last").removeClass("article-last"),$(".main>.wrapper>ul").append(i),r.paginationPageCount===currentPage?e.remove():e.css("background","none")}}})},ease={$header:$(".header"),headerH:103,$body:$(".main > .wrapper"),$nav:$(".nav"),getCurrentPage:function(){var e=$(".article-next");e.length>0&&(window.currentPage=e.data("page"))},setNavCurrent:function(){$(".nav ul a").each(function(){var e=$(this);e.attr("href")===location.href?e.addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")})},initCommon:function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide")},initArchives:function(){var e=$(".archives");if(!(e.length<1)){$(".footer").css("marginTop","30px");for(var t=[],a=e.find("span").each(function(){for(var e=$(this).data("year"),a=!0,i=0;i<t.length;i++)if(e===t[i]){a=!1;break}a&&t.push(e)}),i="",r=0;r<t.length;r++){for(var n="",l=0;l<a.length;l++){var s=$(a[l]);s.data("year")===t[r]&&(n+=s.html())}i+="<div><h3 class='ft-gray'>"+t[r]+"</h3>"+n+"</div>"}e.html(i);for(var o=$(".archives>div"),c=0,h=0,g=[],d=0;d<o.length;d++){for(var f=0;f<3&&!(d>=o.length);f++)o[d].style.left=310*f+"px",c>0?(""!==o[d-3].style.top&&(h=parseInt(o[d-3].style.top)),o[d].style.top=$(o[d-3]).height()+60+h+"px",g[f]=parseInt(o[d].style.top)+$(o[d]).height()+60):g[f]=$(o[d]).height()+60,f<2&&(d+=1);c+=1}e.height(g.sort()[g.length-1])}},scrollEvent:function(){var e=this;$(window).scroll(function(){var t=$(window).scrollTop();if(t>e.headerH){var a=$(window).height(),i=t+a-21;$("body").height()-58<=t+a&&(i=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",i)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if(!($(".dynamic").length<1)){var t=e.find(".side-categories"),a=e.find(".side-tags"),i=e.find(".side-most-comment"),r=e.find(".side-most-view");t.height()>a.height()?a.height(t.height()):t.height(a.height()),i.height()>r.height()?r.height(i.height()):i.height(r.height()),$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})}}};!function(){ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic()}();
|
||||
var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getNextPage=function(){var c=$(".article-next");currentPage+=1;var e="/articles/";if(1===$("#tag").length)e="/articles/tags/"+(t=location.pathname.split("/"))[t.length-1]+"/";else if(1===$("#archive").length){e="/articles/archives/"+(t=location.pathname.split("/"))[t.length-2]+"/"+t[t.length-1]+"/"}else if(1===$("#author").length){var t;e="/articles/authors/"+(t=location.pathname.split("/"))[t.length-1]+"/"}$.ajax({url:latkeConfig.servePath+e+currentPage,type:"GET",beforeSend:function(){c.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(e,t){if(e.sc){for(var a="",i=e.rslts.pagination,r=0;r<e.rslts.articles.length;r++){var l=e.rslts.articles[r],n="";e.rslts.articles.length-1===r&&(n=" article-last"),a+='<li class="article'+n+'"><div class="article-title"><h2><a rel="bookmark" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleTitle+"</a>",l.hasUpdated&&(a+="<sup>"+Label.updatedLabel+"</sup>"),l.articlePutTop&&(a+="<sup>"+Label.topArticleLabel+"</sup>"),a+='</h2><div class="right"><a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'#comments">'+ +l.articleCommentCount+" "+Label.commentLabel+'</a> <a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleViewCount+" "+Label.viewLabel+'</a></div><div class="clear"></div></div><div class="article-body"><div id="abstract'+l.oId+'">'+l.articleAbstract+'</div><div id="content'+l.oId+'" class="none"></div></div><div class="right ft-gray">',l.hasUpdated?a+=Util.toDate(l.articleUpdateTime,"yy-MM-dd HH:mm"):a+=Util.toDate(l.articleCreateTime,"yy-MM-dd HH:mm"),a+=' <a href="'+latkeConfig.servePath+"/authors/"+l.authorId+'">'+l.authorName+'</a></div><div class="left ft-gray">'+Label.tag1Label+" ";for(var s=l.articleTags.split(","),o=0;o<s.length;o++)a+='<a rel="tag" href="'+latkeConfig.servePath+"/tags/"+encodeURIComponent(s[o])+'">'+s[o]+"</a>",o<s.length-1&&(a+=", ");a+='</div><div class="clear"></div></li>'}$(".article-last").removeClass("article-last"),$(".main>.wrapper>ul").append(a),i.paginationPageCount===currentPage?c.remove():c.css("background","none")}}})},ease={$header:$(".header"),headerH:103,$body:$(".main > .wrapper"),$nav:$(".nav"),getCurrentPage:function(){var e=$(".article-next");0<e.length&&(window.currentPage=e.data("page"))},setNavCurrent:function(){$(".nav ul a").each(function(){var e=$(this);e.attr("href")===location.href?e.addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")})},initCommon:function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide")},initArchives:function(){var e=$(".archives");if(!(e.length<1)){$(".footer").css("marginTop","30px");for(var i=[],t=e.find("span").each(function(){for(var e=$(this).data("year"),t=!0,a=0;a<i.length;a++)if(e===i[a]){t=!1;break}t&&i.push(e)}),a="",r=0;r<i.length;r++){for(var l="",n=0;n<t.length;n++){var s=$(t[n]);s.data("year")===i[r]&&(l+=s.html())}a+="<div><h3 class='ft-gray'>"+i[r]+"</h3>"+l+"</div>"}e.html(a);for(var o=$(".archives>div"),c=0,h=0,g=[],d=0;d<o.length;d++){for(var f=0;f<3&&!(d>=o.length);f++)o[d].style.left=310*f+"px",g[f]=0<c?(""!==o[d-3].style.top&&(h=parseInt(o[d-3].style.top)),o[d].style.top=$(o[d-3]).height()+60+h+"px",parseInt(o[d].style.top)+$(o[d]).height()+60):$(o[d]).height()+60,f<2&&(d+=1);c+=1}e.height(g.sort()[g.length-1])}},scrollEvent:function(){var i=this;$(window).scroll(function(){var e=$(window).scrollTop();if(e>i.headerH){var t=$(window).height(),a=e+t-21;$("body").height()-58<=e+t&&(a=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",a)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if(!($(".dynamic").length<1)){var t=e.find(".side-categories"),a=e.find(".side-tags"),i=e.find(".side-most-comment"),r=e.find(".side-most-view");t.height()>a.height()?a.height(t.height()):t.height(a.height()),i.height()>r.height()?r.height(i.height()):i.height(r.height()),$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})}}};ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic();
|
2
metro-hot/js/metro-hot.min.js
vendored
2
metro-hot/js/metro-hot.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var MetroHot={headerH:$("#header").height()+30+($("#header > div").get(1)?30:0),responsiveType:"large",goTranslate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},init:function(){var t="";$("#admin a").each(function(){$(this).attr("href").indexOf("/logout?goto=")>-1&&(t=$(this).attr("href"))}),$("#logout, .logout").attr("href",t),$(".header .title, .navigation").mouseover(function(){$(".navigation").show()}).mouseout(function(){$(".navigation").hide()}),$(".header .title").click(function(){window.location.href=latkeConfig.servePath});var e=$("#top > span").first().text();$(".online-count .text").append(e.substr(1,e.length));var i=$("#admin").data("login");if(i?($(".user .text").html($("#admin > span").text()),$(".login, .register, #login, #register, .logout, .settings").hide()):$(".login, .register, .user, .clear, .logout, .settings, #logout, #settings").hide(),1===$("#dynamic").length)return $(window).scroll(function(){$(window).scrollTop()>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide()}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}),void $("body").css("min-height","inherit");$("#login, .login").attr("href",$("#admin > a").first().attr("href")),$(window).scroll(function(){var t=$(window).scrollTop();t>MetroHot.headerH?i?$(".logout, .settings").show():$(".login, .register").show():i?$(".logout, .settings").hide():$(".login, .register").hide(),t>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide(),$(".side > div").height()<620?t>MetroHot.headerH?$(".side > div").css({position:"fixed",top:"0px",width:"240px"}):$(".side > div").css("position","static"):t+Util.getWinHeight()>$(".side > div").height()+MetroHot.headerH?$(".side > div").css({position:"fixed",top:"auto",bottom:"10px",width:"240px"}):$(".side > div").css("position","static")}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}).resize(function(){var t=window.innerWidth,e="large";t>460&&t<=860?e="mid":window<460&&(e="small"),MetroHot.responsiveType!==e&&($(window).scroll(),MetroHot.responsiveType)}),$(window).scroll()},initArticleList:function(){$(".article-list .article-abstract").each(function(){var t=$(this),e=t.find("img");e.length>0&&(t.addClass("article-image"),e.hide(),t.before("<img onload='MetroHot.loadImg(this);' src='"+$(e[0]).attr("src")+"'/>"))})},loadImg:function(t){t.style.marginTop=(220-t.height)/2+"px"},share:function(){var t=encodeURIComponent($("title").text()),e=window.location.href,i=$(".article-body img").attr("src"),o={};o.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+t+"&url="+e+"&pic="+i,o.sina="http://v.t.sina.com.cn/share/share.php?title="+t+"&url="+e+"&pic="+i,o.google="https://plus.google.com/share?url="+e,o.twitter="https://twitter.com/intent/tweet?status="+t+" "+e,$(".share span").click(function(){var t=$(this).attr("title").toLowerCase();window.open(o[t],"_blank","top=100,left=200,width=648,height=618")})},loadRandomArticles:function(){$.ajax({url:latkeConfig.servePath+"/get-random-articles.do",type:"POST",success:function(t,e){var i=t.randomArticles;if(!i||0===i.length)return void $("#randomArticles").remove();for(var o="",r=0;r<i.length&&r<5;r++){var a=i[r],n=a.articleTitle;o+="<li><a rel='nofollow' title='"+n+"' href='"+latkeConfig.servePath+a.articlePermalink+"'>"+n+"</a></li>"}var l="<ul>"+o+"</ul>";$("#randomArticles .text").append(l)}})},loadRelevantArticles:function(t){$.ajax({url:latkeConfig.servePath+"/article/id/"+t+"/relevant/articles",type:"GET",success:function(t,e){var i=t.relevantArticles;if(!i||0===i.length)return void $("#relevantArticles").remove();for(var o="",r=0;r<i.length&&r<5;r++){var a=i[r],n=a.articleTitle;o+="<li><a rel='nofollow' title='"+n+"' href='"+latkeConfig.servePath+a.articlePermalink+"'>"+n+"</a></li>"}var l="<ul>"+o+"</ul>";$("#relevantArticles .text").append(l)},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(t){var e=this.tips;try{$.ajax({url:"http://rhythm.b3log.org:80/get-articles-by-tags.do?tags="+t+"&blogHost="+e.blogHost+"&paginationPageSize="+e.externalRelevantArticlesDisplayCount,type:"GET",cache:!0,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(t,e){var i=t.articles;if(!i||0===i.length)return void $("#externalRelevantArticles").remove();for(var o="",r=0;r<i.length&&r<5;r++){var a=i[r],n=a.articleTitle;o+="<li><a rel='nofollow' title='"+n+"' target='_blank' href='"+a.articlePermalink+"'>"+n+"</a></li>"}var l="<ul>"+o+"</ul>";$("#externalRelevantArticles .text").append(l)}})}catch(t){$("#externalRelevantArticles").remove()}},goCmt:function(){$("html, body").animate({scrollTop:$(".comment-disabled").get(0).offsetTop})}};!function(){MetroHot.init(),Util.killIE(),$(".article-header").length>0?MetroHot.share():MetroHot.initArticleList()}();
|
||||
var MetroHot={headerH:$("#header").height()+30+($("#header > div").get(1)?30:0),responsiveType:"large",goTranslate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},init:function(){var t="";$("#admin a").each(function(){-1<$(this).attr("href").indexOf("/logout?goto=")&&(t=$(this).attr("href"))}),$("#logout, .logout").attr("href",t),$(".header .title, .navigation").mouseover(function(){$(".navigation").show()}).mouseout(function(){$(".navigation").hide()}),$(".header .title").click(function(){window.location.href=latkeConfig.servePath});var e=$("#top > span").first().text();$(".online-count .text").append(e.substr(1,e.length));var i=$("#admin").data("login");if(i?($(".user .text").html($("#admin > span").text()),$(".login, .register, #login, #register, .logout, .settings").hide()):$(".login, .register, .user, .clear, .logout, .settings, #logout, #settings").hide(),1===$("#dynamic").length)return $(window).scroll(function(){$(window).scrollTop()>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide()}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}),void $("body").css("min-height","inherit");$("#login, .login").attr("href",$("#admin > a").first().attr("href")),$(window).scroll(function(){var t=$(window).scrollTop();t>MetroHot.headerH?i?$(".logout, .settings").show():$(".login, .register").show():i?$(".logout, .settings").hide():$(".login, .register").hide(),t>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide(),$(".side > div").height()<620?t>MetroHot.headerH?$(".side > div").css({position:"fixed",top:"0px",width:"240px"}):$(".side > div").css("position","static"):t+Util.getWinHeight()>$(".side > div").height()+MetroHot.headerH?$(".side > div").css({position:"fixed",top:"auto",bottom:"10px",width:"240px"}):$(".side > div").css("position","static")}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}).resize(function(){var t=window.innerWidth,e="large";460<t&&t<=860?e="mid":window<460&&(e="small"),MetroHot.responsiveType!==e&&($(window).scroll(),MetroHot.responsiveType)}),$(window).scroll()},initArticleList:function(){$(".article-list .article-abstract").each(function(){var t=$(this),e=t.find("img");0<e.length&&(t.addClass("article-image"),e.hide(),t.before("<img onload='MetroHot.loadImg(this);' src='"+$(e[0]).attr("src")+"'/>"))})},loadImg:function(t){t.style.marginTop=(220-t.height)/2+"px"},share:function(){var t=encodeURIComponent($("title").text()),e=window.location.href,i=$(".article-body img").attr("src"),o={};o.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+t+"&url="+e+"&pic="+i,o.sina="http://v.t.sina.com.cn/share/share.php?title="+t+"&url="+e+"&pic="+i,o.google="https://plus.google.com/share?url="+e,o.twitter="https://twitter.com/intent/tweet?status="+t+" "+e,$(".share span").click(function(){var t=$(this).attr("title").toLowerCase();window.open(o[t],"_blank","top=100,left=200,width=648,height=618")})},loadRandomArticles:function(){$.ajax({url:latkeConfig.servePath+"/get-random-articles.do",type:"POST",success:function(t,e){var i=t.randomArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' href='"+latkeConfig.servePath+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#randomArticles .text").append(n)}else $("#randomArticles").remove()}})},loadRelevantArticles:function(t){$.ajax({url:latkeConfig.servePath+"/article/id/"+t+"/relevant/articles",type:"GET",success:function(t,e){var i=t.relevantArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' href='"+latkeConfig.servePath+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#relevantArticles .text").append(n)}else $("#relevantArticles").remove()},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(t){var e=this.tips;try{$.ajax({url:"http://rhythm.b3log.org:80/get-articles-by-tags.do?tags="+t+"&blogHost="+e.blogHost+"&paginationPageSize="+e.externalRelevantArticlesDisplayCount,type:"GET",cache:!0,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(t,e){var i=t.articles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' target='_blank' href='"+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#externalRelevantArticles .text").append(n)}else $("#externalRelevantArticles").remove()}})}catch(t){$("#externalRelevantArticles").remove()}},goCmt:function(){$("html, body").animate({scrollTop:$(".comment-disabled").get(0).offsetTop})}};MetroHot.init(),Util.killIE(),0<$(".article-header").length?MetroHot.share():MetroHot.initArticleList();
|
2
next/js/next.min.js
vendored
2
next/js/next.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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(){$(".b3-solo-list li").length>0&&$(window).width()>1e3&&$(".sidebar-toggle").click()})})}),$(".logo-line-after i").animate({right:"0"})},500),$("body").on("click",".article-body img",function(){window.open(this.src)})})},initArticle:function(){if($(".b3-solo-list li").length>0&&$(window).width()>1e3){$(".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 i=$(".article-body [id^=b3_solo_h]"),t=$(".b3-solo-list");$(window).scroll(function(a){if(0===$(".b3-solo-list li").length)return!1;var o=[];i.each(function(i){o.push({id:this.id,offsetTop:this.offsetTop})});for(var e=$(window).scrollTop(),n=0,s=o.length;n<s;n++)if(e<o[n].offsetTop+200){t.find("li").removeClass("current");var l=n>0?n-1:0;t.find('a[href="#'+o[l].id+'"]').parent().addClass("current");break}e>=o[o.length-1].offsetTop+200&&(t.find("li").removeClass("current"),t.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),$("body").on("click",".article-body 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")),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=$(".article-body [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(),o=0,e=t.length;o<e;o++)if(a<t[o].offsetTop+200){l.find("li").removeClass("current");var n=0<o?o-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();
|
2
nijigen/js/common.min.js
vendored
2
nijigen/js/common.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var Skin={_initCommon:function(e){$(window).scroll(function(){$(window).scrollTop()>125?e.show():e.hide()})},_initAnimation:function(){if(!("IntersectionObserver"in window))return $(".item").addClass("item--active"),!1;window.imageIntersectionObserver?(window.imageIntersectionObserver.disconnect(),$(".item").each(function(){window.imageIntersectionObserver.observe(this)})):(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||$(e.target).closest(".article-list").hasClass("content")||$(e.target).outerHeight()>768)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(){$(".b3-solo-list li").length>0&&$(window).width()>1e3&&($(".side").prepend('<div class="module"><div class="module__list"></div></div>'),$(".side .module:eq(0) .module__list").html($(".b3-solo-list")))},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()})},_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||$(e.target).closest(".article-list").hasClass("content")||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(){0<$(".b3-solo-list li").length&&1e3<$(window).width()&&($(".side").prepend('<div class="module"><div class="module__list"></div></div>'),$(".side .module:eq(0) .module__list").html($(".b3-solo-list")))},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();
|
3
nijigen/js/isotope.pkgd.min.js
vendored
3
nijigen/js/isotope.pkgd.min.js
vendored
File diff suppressed because one or more lines are too long
2
timeline/js/timeline.min.js
vendored
2
timeline/js/timeline.min.js
vendored
File diff suppressed because one or more lines are too long
2
yilia/js/yilia.min.js
vendored
2
yilia/js/yilia.min.js
vendored
@ -15,4 +15,4 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var Yilia={init:function(){Util.killIE(),this._initToc(),this.resetTags(),$(window).scroll(function(){$("article").length>0&&0===$("article.post").length&&$("article:not(.show)").each(function(){$(this).offset().top<=$(window).scrollTop()+$(window).height()-$(this).height()/7&&$(this).addClass("show")}),$(window).scrollTop()>$(window).height()?$(".icon-goup").show():$(".icon-goup").hide(),1===$("article.post").length&&$("article.post").addClass("show")}),$(window).scroll()},_initToc:function(){if(0===$(".b3-solo-list li").length)return!1;$(".side footer").after('<div class="toc"><a onclick="$(\'.side .toc\').hide();" href="javascript:void(0)" class="close">X</a></div>'),$(".side .toc a").after($(".b3-solo-list")),$(".side .toc-btn").show()},resetTags:function(){$("a.tag").each(function(t){$(this).addClass("color"+Math.ceil(4*Math.random()))})},share:function(){$(".share span").click(function(){var t=$(this).data("type"),i=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,e=$(".post-content img:eq(0)").attr("src"),s={};s.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+i+"&url="+o+"&pic="+e,s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+o+"&pic="+e,s.google="https://plus.google.com/share?url="+o,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+o,window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})}};Yilia.init();
|
||||
var Yilia={init:function(){Util.killIE(),this._initToc(),this.resetTags(),$(window).scroll(function(){0<$("article").length&&0===$("article.post").length&&$("article:not(.show)").each(function(){$(this).offset().top<=$(window).scrollTop()+$(window).height()-$(this).height()/7&&$(this).addClass("show")}),$(window).scrollTop()>$(window).height()?$(".icon-goup").show():$(".icon-goup").hide(),1===$("article.post").length&&$("article.post").addClass("show")}),$(window).scroll()},_initToc:function(){if(0===$(".b3-solo-list li").length)return!1;$(".side footer").after('<div class="toc"><a onclick="$(\'.side .toc\').hide();" href="javascript:void(0)" class="close">X</a></div>'),$(".side .toc a").after($(".b3-solo-list")),$(".side .toc-btn").show()},resetTags:function(){$("a.tag").each(function(t){$(this).addClass("color"+Math.ceil(4*Math.random()))})},share:function(){$(".share span").click(function(){var t=$(this).data("type"),i=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,e=$(".post-content img:eq(0)").attr("src"),s={};s.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+i+"&url="+o+"&pic="+e,s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+o+"&pic="+e,s.google="https://plus.google.com/share?url="+o,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+o,window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})}};Yilia.init();
|
Loading…
x
Reference in New Issue
Block a user