diff --git a/9IPHP/footer.ftl b/9IPHP/footer.ftl index 009f3df..292ef3c 100644 --- a/9IPHP/footer.ftl +++ b/9IPHP/footer.ftl @@ -34,20 +34,5 @@ - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/Andrea/footer.ftl b/Andrea/footer.ftl index 3be48cc..c35236d 100644 --- a/Andrea/footer.ftl +++ b/Andrea/footer.ftl @@ -23,22 +23,8 @@ Theme ${skinDirName} by Vanessa. +<#include "../../common-template/skin-script.ftl"> +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/Community/footer.ftl b/Community/footer.ftl index 2e4f200..8b856cd 100644 --- a/Community/footer.ftl +++ b/Community/footer.ftl @@ -50,21 +50,9 @@ +<#include "../../common-template/skin-script.ftl"> - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/Finding/js/Finding.js b/Finding/js/Finding.js index 78d52bc..a13e176 100644 --- a/Finding/js/Finding.js +++ b/Finding/js/Finding.js @@ -160,7 +160,7 @@ var Finding = { if ($qrCode.find('canvas').length === 0) { $.ajax({ method: 'GET', - url: latkeConfig.staticServePath + + url: Label.staticServePath + '/js/lib/jquery.qrcode.min.js', dataType: 'script', cache: true, diff --git a/Finding/js/Finding.min.js b/Finding/js/Finding.min.js index a6008bc..3997c9f 100644 --- a/Finding/js/Finding.min.js +++ b/Finding/js/Finding.min.js @@ -1 +1 @@ -var Finding={init:function(){Util.killIE(),this._initToc(),this.share(),$(".scroll-down").click(function(t){t.preventDefault();var n=$(this),i=$("html, body"),o=!!n.attr("data-offset")&&n.attr("data-offset"),a=parseInt(o);i.stop(!0,!1).animate({scrollTop:$(this.hash).offset().top+a},500)}),$("body").append('Menu'),$(".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")),500<$(window).width()&&$("body").toggleClass("nav-opened nav-closed"),$(".nav .icon-list").show(),Finding.tabNav("toc");var s=$(".vditor-reset [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(t){if(0===$(".b3-solo-list li").length)return!1;var n=[];s.each(function(t){n.push({id:this.id,offsetTop:this.offsetTop})});for(var i=$(window).scrollTop(),o=0,a=n.length;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(){var t=$(".share"),n=t.find(".icon-wechat"),i=n.data("url"),o=n.data("avatar"),a=encodeURIComponent(n.data("title")+" - "+n.data("blogtitle")),e=encodeURIComponent(i),s={};s.weibo="http://v.t.sina.com.cn/share/share.php?title="+a+"&url="+e+"&pic="+o,s.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+e+"&sharesource=qzone&title="+a+"&pics="+o,s.twitter="https://twitter.com/intent/tweet?status="+a+" "+e,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===n.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){n.qrcode({width:128,height:128,text:i})}}):n.find("canvas").slideToggle(),!1):void window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})}};Finding.init(); \ No newline at end of file +var Finding={init:function(){Util.killIE(),this._initToc(),this.share(),$(".scroll-down").click(function(t){t.preventDefault();var n=$(this),i=$("html, body"),o=!!n.attr("data-offset")&&n.attr("data-offset"),a=parseInt(o);i.stop(!0,!1).animate({scrollTop:$(this.hash).offset().top+a},500)}),$("body").append('Menu'),$(".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")),500<$(window).width()&&$("body").toggleClass("nav-opened nav-closed"),$(".nav .icon-list").show(),Finding.tabNav("toc");var s=$(".vditor-reset [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(t){if(0===$(".b3-solo-list li").length)return!1;var n=[];s.each(function(t){n.push({id:this.id,offsetTop:this.offsetTop})});for(var i=$(window).scrollTop(),o=0,a=n.length;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(){var t=$(".share"),n=t.find(".icon-wechat"),i=n.data("url"),o=n.data("avatar"),a=encodeURIComponent(n.data("title")+" - "+n.data("blogtitle")),e=encodeURIComponent(i),s={};s.weibo="http://v.t.sina.com.cn/share/share.php?title="+a+"&url="+e+"&pic="+o,s.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+e+"&sharesource=qzone&title="+a+"&pics="+o,s.twitter="https://twitter.com/intent/tweet?status="+a+" "+e,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===n.find("canvas").length?$.ajax({method:"GET",url:Label.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){n.qrcode({width:128,height:128,text:i})}}):n.find("canvas").slideToggle(),!1):void window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})}};Finding.init(); \ No newline at end of file diff --git a/Jane/footer.ftl b/Jane/footer.ftl index 19d810a..5c37ad6 100644 --- a/Jane/footer.ftl +++ b/Jane/footer.ftl @@ -38,21 +38,5 @@ - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/Medium/footer.ftl b/Medium/footer.ftl index b4a52e9..847bc3c 100644 --- a/Medium/footer.ftl +++ b/Medium/footer.ftl @@ -46,20 +46,5 @@ - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/Medium/js/common.js b/Medium/js/common.js index 0f6caff..7ffb350 100644 --- a/Medium/js/common.js +++ b/Medium/js/common.js @@ -48,7 +48,7 @@ var Skin = { if (!$('#articleSideShare .article__code').qrcode) { $.ajax({ method: "GET", - url: latkeConfig.staticServePath + '/js/lib/jquery.qrcode.min.js', + url: Label.staticServePath + '/js/lib/jquery.qrcode.min.js', dataType: "script", cache: true }); diff --git a/Medium/js/common.min.js b/Medium/js/common.min.js index 5ea5a1e..7a7a012 100644 --- a/Medium/js/common.min.js +++ b/Medium/js/common.min.js @@ -1 +1 @@ -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=$(".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;65e-$(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(); \ No newline at end of file +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:Label.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=$(".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;65e-$(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(); \ No newline at end of file diff --git a/NeoEase/footer.ftl b/NeoEase/footer.ftl index 8681fd4..11fd1c1 100644 --- a/NeoEase/footer.ftl +++ b/NeoEase/footer.ftl @@ -29,23 +29,8 @@
TOP
- +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/NeoEase/js/NeoEase.js b/NeoEase/js/NeoEase.js index c00151a..df7d91f 100644 --- a/NeoEase/js/NeoEase.js +++ b/NeoEase/js/NeoEase.js @@ -95,7 +95,7 @@ var goTranslate = function () { window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href); }; -(function () { +$(document).ready(function () { // go top icon show or hide $(window).scroll(function () { var y = $(window).scrollTop(); @@ -153,14 +153,13 @@ var goTranslate = function () { // nav current $(".nav ul li").each(function () { var $a = $(this).find("a"); - if ($a.attr("href") === latkeConfig.servePath + location.pathname) { + if ($a.attr("href") === Label.servePath + location.pathname) { $(this).addClass("current"); } else if (/\/[0-9]+$/.test(location.pathname)) { $(".nav ul li")[0].className = "current"; } }); - Util.init(); Util.setTopBar() Util.replaceSideEm($(".recent-comments-content")); Util.buildTags("tagsSide"); @@ -175,4 +174,4 @@ var goTranslate = function () { }); } }); -})(); \ No newline at end of file +}); \ No newline at end of file diff --git a/NeoEase/js/NeoEase.min.js b/NeoEase/js/NeoEase.min.js index 91ed8d6..b03d9c9 100644 --- a/NeoEase/js/NeoEase.min.js +++ b/NeoEase/js/NeoEase.min.js @@ -1 +1 @@ -var goTop=function(e){e=e||.1;var a=$(window).scrollTop(),t=1+e;if(window.scrollTo(0,Math.floor(a/t)),0
"+n+" 年
"))}),$(".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.setTopBar(),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"})})}(); \ No newline at end of file +var goTop=function(e){e=e||.1;var a=$(window).scrollTop(),t=1+e;if(window.scrollTo(0,Math.floor(a/t)),0
"+n+" 年
"))}),$(".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")===Label.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.setTopBar(),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"})})}(); \ No newline at end of file diff --git a/Pinghsu/footer.ftl b/Pinghsu/footer.ftl index 911e73d..cec72d6 100644 --- a/Pinghsu/footer.ftl +++ b/Pinghsu/footer.ftl @@ -82,21 +82,5 @@ - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/Pinghsu/js/common.js b/Pinghsu/js/common.js index d8c88bc..0b4eafb 100644 --- a/Pinghsu/js/common.js +++ b/Pinghsu/js/common.js @@ -114,7 +114,7 @@ var Skin = { if ($qrCode.find('canvas').length === 0) { $.ajax({ method: 'GET', - url: latkeConfig.staticServePath + + url: Label.staticServePath + '/js/lib/jquery.qrcode.min.js', dataType: 'script', cache: true, diff --git a/Pinghsu/js/common.min.js b/Pinghsu/js/common.min.js index d082554..d45074d 100644 --- a/Pinghsu/js/common.min.js +++ b/Pinghsu/js/common.min.js @@ -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")})}),$(".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===$(".vditor-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()}),$(window).scroll())},_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(); \ No newline at end of file +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===$(".vditor-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()}),$(window).scroll())},_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:Label.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(); \ No newline at end of file diff --git a/favourite/footer.ftl b/favourite/footer.ftl index a6f1716..5266363 100644 --- a/favourite/footer.ftl +++ b/favourite/footer.ftl @@ -30,24 +30,9 @@ +<#include "../../common-template/skin-script.ftl"> +<#include "../../common-template/skin-script.ftl"> - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/metro-hot/js/metro-hot.js b/metro-hot/js/metro-hot.js index 017f1eb..71a38dc 100644 --- a/metro-hot/js/metro-hot.js +++ b/metro-hot/js/metro-hot.js @@ -45,7 +45,7 @@ var MetroHot = { $(".navigation").hide(); }); $(".header .title").click(function() { - window.location.href = latkeConfig.servePath; + window.location.href = Label.servePath; }); // 当先用户在线数目 @@ -188,7 +188,7 @@ var MetroHot = { if ($qrCode.find('canvas').length === 0) { $.ajax({ method: 'GET', - url: latkeConfig.staticServePath + + url: Label.staticServePath + '/js/lib/jquery.qrcode.min.js', dataType: 'script', cache: true, @@ -215,7 +215,7 @@ var MetroHot = { loadRandomArticles: function() { // getRandomArticles $.ajax({ - url: latkeConfig.servePath + "/articles/random", + url: Label.servePath + "/articles/random", type: "POST", success: function(result, textStatus) { var randomArticles = result.randomArticles; @@ -228,7 +228,7 @@ var MetroHot = { for (var i = 0; i < randomArticles.length && i < 5; i++) { var article = randomArticles[i]; var title = article.articleTitle; - var randomArticleLiHtml = "
  • " + "" + title + "
  • "; listHtml += randomArticleLiHtml; } @@ -244,7 +244,7 @@ var MetroHot = { */ loadRelevantArticles: function(id) { $.ajax({ - url: latkeConfig.servePath + "/article/id/" + id + "/relevant/articles", + url: Label.servePath + "/article/id/" + id + "/relevant/articles", type: "GET", success: function(data, textStatus) { var articles = data.relevantArticles; @@ -258,7 +258,7 @@ var MetroHot = { var title = article.articleTitle; var articleLiHtml = "
  • " + "" + + Label.servePath + article.articlePermalink + "'>" + title + "
  • "; listHtml += articleLiHtml; } @@ -322,7 +322,6 @@ var MetroHot = { (function() { MetroHot.init(); - Util.killIE(); if ($(".article-header").length > 0) { MetroHot.share(); } diff --git a/metro-hot/js/metro-hot.min.js b/metro-hot/js/metro-hot.min.js index 56919e7..89f4eb0 100644 --- a/metro-hot/js/metro-hot.min.js +++ b/metro-hot/js/metro-hot.min.js @@ -1 +1 @@ -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 e="";$("#admin a").each(function(){-1<$(this).attr("href").indexOf("/logout")&&(e=$(this).attr("href"))}),$("#logout, .logout").attr("href",e),$(".header .title, .navigation").mouseover(function(){$(".navigation").show()}).mouseout(function(){$(".navigation").hide()}),$(".header .title").click(function(){window.location.href=latkeConfig.servePath});var t=$("#top > span").first().text();$(".online-count .text").append(t.substr(1,t.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(e){"title"!==e.target.className&&"title"!==e.target.parentElement.className&&$(".navigation").slideUp()}),void $("body").css("min-height","inherit");$("#login, .login").attr("href",$("#admin > a").first().attr("href")),$(window).scroll(function(){var e=$(window).scrollTop();e>MetroHot.headerH?i?$(".logout, .settings").show():$(".login, .register").show():i?$(".logout, .settings").hide():$(".login, .register").hide(),e>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide(),$(".side > div").height()<620?e>MetroHot.headerH?$(".side > div").css({position:"fixed",top:"0px",width:"240px"}):$(".side > div").css("position","static"):e+$(window).height()>$(".side > div").height()+MetroHot.headerH?$(".side > div").css({position:"fixed",top:"auto",bottom:"10px",width:"240px"}):$(".side > div").css("position","static")}).click(function(e){"title"!==e.target.className&&"title"!==e.target.parentElement.className&&$(".navigation").slideUp()}).resize(function(){var e=window.innerWidth,t="large";460"+r+""}var l="
      "+o+"
    ";$("#randomArticles .text").append(l)}else $("#randomArticles").remove()}})},loadRelevantArticles:function(e){$.ajax({url:latkeConfig.servePath+"/article/id/"+e+"/relevant/articles",type:"GET",success:function(e,t){var i=e.relevantArticles;if(i&&0!==i.length){for(var o="",a=0;a"+r+""}var l="
      "+o+"
    ";$("#relevantArticles .text").append(l)}else $("#relevantArticles").remove()},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(e){var t=this.tips;try{$.ajax({url:"http://rhythm.b3log.org:80/get-articles-by-tags.do?tags="+e+"&blogHost="+t.blogHost+"&paginationPageSize="+t.externalRelevantArticlesDisplayCount,type:"GET",cache:!0,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(e,t){var i=e.articles;if(i&&0!==i.length){for(var o="",a=0;a"+r+""}var l="
      "+o+"
    ";$("#externalRelevantArticles .text").append(l)}else $("#externalRelevantArticles").remove()}})}catch(e){$("#externalRelevantArticles").remove()}},goCmt:function(){$("html, body").animate({scrollTop:$(".comment-disabled").get(0).offsetTop})}};MetroHot.init(),Util.killIE(),0<$(".article-header").length&&MetroHot.share(); \ No newline at end of file +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 e="";$("#admin a").each(function(){-1<$(this).attr("href").indexOf("/logout")&&(e=$(this).attr("href"))}),$("#logout, .logout").attr("href",e),$(".header .title, .navigation").mouseover(function(){$(".navigation").show()}).mouseout(function(){$(".navigation").hide()}),$(".header .title").click(function(){window.location.href=Label.servePath});var t=$("#top > span").first().text();$(".online-count .text").append(t.substr(1,t.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(e){"title"!==e.target.className&&"title"!==e.target.parentElement.className&&$(".navigation").slideUp()}),void $("body").css("min-height","inherit");$("#login, .login").attr("href",$("#admin > a").first().attr("href")),$(window).scroll(function(){var e=$(window).scrollTop();e>MetroHot.headerH?i?$(".logout, .settings").show():$(".login, .register").show():i?$(".logout, .settings").hide():$(".login, .register").hide(),e>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide(),$(".side > div").height()<620?e>MetroHot.headerH?$(".side > div").css({position:"fixed",top:"0px",width:"240px"}):$(".side > div").css("position","static"):e+$(window).height()>$(".side > div").height()+MetroHot.headerH?$(".side > div").css({position:"fixed",top:"auto",bottom:"10px",width:"240px"}):$(".side > div").css("position","static")}).click(function(e){"title"!==e.target.className&&"title"!==e.target.parentElement.className&&$(".navigation").slideUp()}).resize(function(){var e=window.innerWidth,t="large";460"+n+""}var l="
      "+a+"
    ";$("#randomArticles .text").append(l)}else $("#randomArticles").remove()}})},loadRelevantArticles:function(e){$.ajax({url:Label.servePath+"/article/id/"+e+"/relevant/articles",type:"GET",success:function(e,t){var i=e.relevantArticles;if(i&&0!==i.length){for(var a="",o=0;o"+n+""}var l="
      "+a+"
    ";$("#relevantArticles .text").append(l)}else $("#relevantArticles").remove()},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(e){var t=this.tips;try{$.ajax({url:"http://rhythm.b3log.org:80/get-articles-by-tags.do?tags="+e+"&blogHost="+t.blogHost+"&paginationPageSize="+t.externalRelevantArticlesDisplayCount,type:"GET",cache:!0,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(e,t){var i=e.articles;if(i&&0!==i.length){for(var a="",o=0;o"+n+""}var l="
      "+a+"
    ";$("#externalRelevantArticles .text").append(l)}else $("#externalRelevantArticles").remove()}})}catch(e){$("#externalRelevantArticles").remove()}},goCmt:function(){$("html, body").animate({scrollTop:$(".comment-disabled").get(0).offsetTop})}};MetroHot.init(),0<$(".article-header").length&&MetroHot.share(); \ No newline at end of file diff --git a/metro-hot/macro-head.ftl b/metro-hot/macro-head.ftl index 641e2da..e7db896 100644 --- a/metro-hot/macro-head.ftl +++ b/metro-hot/macro-head.ftl @@ -30,7 +30,6 @@ - diff --git a/next/footer.ftl b/next/footer.ftl index f30d560..301acb6 100644 --- a/next/footer.ftl +++ b/next/footer.ftl @@ -38,22 +38,9 @@ +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/nijigen/footer.ftl b/nijigen/footer.ftl index 3e49fcb..88d0652 100644 --- a/nijigen/footer.ftl +++ b/nijigen/footer.ftl @@ -37,21 +37,5 @@ - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/owmx-3.0/footer.ftl b/owmx-3.0/footer.ftl index e4277cd..1fd5781 100644 --- a/owmx-3.0/footer.ftl +++ b/owmx-3.0/footer.ftl @@ -26,23 +26,9 @@ +<#include "../../common-template/skin-script.ftl"> +<#include "../../common-template/skin-script.ftl"> + ${plugins} diff --git a/timeline/js/timeline.js b/timeline/js/timeline.js index 84c7534..99249b8 100644 --- a/timeline/js/timeline.js +++ b/timeline/js/timeline.js @@ -214,11 +214,11 @@ var timeline = { path = "/articles/archives/" + archive + "/"; } $.ajax({ - url: latkeConfig.servePath + path + '?p=' + currentPage, + url: Label.servePath + path + '?p=' + currentPage, type: "GET", beforeSend: function() { $more.css("background", - "url(" + latkeConfig.staticServePath + "url(" + Label.staticServePath + "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text(""); }, success: function(result, textStatus) { @@ -243,7 +243,7 @@ var timeline = { + '

    ' + + Label.servePath + article.articlePermalink + '">' + article.articleTitle + ''; if (article.hasUpdated) { @@ -259,7 +259,7 @@ var timeline = { var articleTags = article.articleTags.split(","); for (var j = 0; j < articleTags.length; j++) { - articlesHTML += '' + articleTags[j] + ''; if (j < articleTags.length - 1) { @@ -268,9 +268,9 @@ var timeline = { } articlesHTML += ' ' - + ' ' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount) + ' ' + '' + article.articleViewCount @@ -448,7 +448,6 @@ var timeline = { })(jQuery); (function() { - Util.init(); Util.setTopBar() Util.replaceSideEm($(".comments .vditor-reset")); Util.buildTags("tagsSide"); diff --git a/timeline/js/timeline.min.js b/timeline/js/timeline.min.js index b1b9d0a..fa54190 100644 --- a/timeline/js/timeline.min.js +++ b/timeline/js/timeline.min.js @@ -1 +1 @@ -var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");0===e.length||0<$(".articles > .fn-clear").length||($(window).resize(function(){if("auto"===$("#hideTop").css("top")){var i=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),t=i[1]>i[0],a=t?i[0]:i[1];parseInt(e.css("top"))===a&&0!==a||(e.css({top:a+"px",position:"absolute"}),this.className=t?"l":"r"),i[t?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(i[0]>i[1]?i[0]:i[1])}else e.find("article").each(function(){$(this).css({position:"inherit",top:"auto"}).removeClass("r l")}),e.css("height","auto")}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()}))},_initIndexList:function(){var e=$(".articles > .fn-clear");if(0!==e.length){var a=0;$(".nav-abs li").each(function(e){var t=$(this);t.hide(),a!==t.data("year")&&(a=t.data("year"),t.before("
  • "+a+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){e.each(function(){if("auto"===$("#hideTop").css("top")){var i=[timeline._COLHA+60,4*timeline._COLHB];0===(e=$(this).find("article")).length?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(e.each(function(){var e=$(this),t=i[1]>i[0],a=t?i[0]:i[1];parseInt(e.css("top"))===a&&0!==a||(e.css({top:a+"px",position:"absolute"}),this.className=t?"l":"r"),i[t?"0":"1"]+=parseInt(e.outerHeight(!0))}),$(this).height(i[0]>i[1]?i[0]:i[1]))}else{var e;0===(e=$(this).find("article")).length?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(e.each(function(){$(this).css({position:"inherit",top:"auto"}).removeClass("r l")}),$(this).css("height","auto"))}})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){60<$(window).scrollTop()?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent(),$(".ico-list").click(function(){"0px"===$(".header > .container > form").css("height")?$(".header > .container > ul, .header > .container > form").css({height:"auto"}):$(".header > .container > ul, .header > .container > form").animate({height:"0px"})})},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,a){var i=e+t,s=e+"/"+t;if(window.location.hash="#"+i,0===$("#"+i+" > article").length){var n=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;"en"===Label.localeString.substring(0,2)&&(n=a+" "+e);var r='

    '+n+'

    '+Label.moreLabel+"
    ";$("#"+i).html(r).css("margin-bottom","50px"),timeline.getNextPage($("#"+i).find(".article-more")[0],s)}},getNextPage:function(e,t){var l=$(e),c=l.data("page")+1,a="/articles/";if(1===$("#tag").length)a="/articles/tags/"+(i=location.pathname.split("/"))[i.length-1]+"/";else if(1===$("#author").length){var i;a="/articles/authors/"+(i=location.pathname.split("/"))[i.length-1]+"/"}else t&&(a="/articles/archives/"+t+"/");$.ajax({url:latkeConfig.servePath+a+"?p="+c,type:"GET",beforeSend:function(){l.css("background","url("+latkeConfig.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(e.sc)if(0!==e.rslts.articles.length){for(var a="",i=e.rslts.pagination,s=0;s

    '+n.articleTitle+"",n.hasUpdated&&(a+=""+Label.updatedLabel+""),n.articlePutTop&&(a+=""+Label.topArticleLabel+""),a+="

    "+n.articleAbstract+'

    ';for(var r=n.articleTags.split(","),o=0;o'+r[o]+"",o  '+(0===n.articleCommentCount?Label.noCommentLabel:n.articleCommentCount)+' '+n.articleViewCount+"
    "}l.before(a).data("page",c),i.paginationPageCount<=c?l.remove():l.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}else l.remove();else l.css("background","none #60829F").text("Error")}})},toggleArchives:function(a,i){$(".nav-abs li").each(function(e){var t=$(this);t.hasClass("year")||(t.hide(),i===t.data("year")&&$(a).hasClass("close")&&t.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===i?$(a).hasClass("close")?a.className="year open":a.className="year close":this.className="year close"})}};!function(u,e){"use strict";var g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";u.fn.imagesLoaded=function(a){var i=this,s=u.isFunction(u.Deferred)?u.Deferred():0,n=u.isFunction(s.notify),r=i.find("img").add(i.filter("img")),o=[],l=[],c=[];function h(){var e=u(l),t=u(c);s&&(c.length?s.reject(r,e,t):s.resolve(r)),u.isFunction(a)&&a.call(i,r,e,t)}function d(e){m(e.target,"error"===e.type)}function m(e,t){e.src!==g&&-1===u.inArray(e,o)&&(o.push(e),t?c.push(e):l.push(e),u.data(e,"imagesLoaded",{isBroken:t,src:e.src}),n&&s.notifyWith(u(e),[t,r,u(l),u(c)]),r.length===o.length&&(setTimeout(h),r.unbind(".imagesLoaded",d)))}return u.isPlainObject(a)&&u.each(a,function(e,t){"callback"===e?a=t:s&&s[e](t)}),r.length?r.bind("load.imagesLoaded error.imagesLoaded",d).each(function(e,t){var a=t.src,i=u.data(t,"imagesLoaded");i&&i.src===a?m(t,i.isBroken):t.complete&&void 0!==t.naturalWidth?m(t,0===t.naturalWidth||0===t.naturalHeight):(t.readyState||t.complete)&&(t.src=g,t.src=a)}):h(),s?s.promise(i):i}}(jQuery),Util.init(),Util.setTopBar(),Util.replaceSideEm($(".comments .vditor-reset")),Util.buildTags("tagsSide"),timeline.init(); \ No newline at end of file +var timeline={_COLHA:0,_COLHB:20,_initArticleList:function(){var e=$(".articles");0===e.length||0<$(".articles > .fn-clear").length||($(window).resize(function(){if("auto"===$("#hideTop").css("top")){var i=[timeline._COLHA,timeline._COLHB];e.find("article").each(function(){var e=$(this),t=i[1]>i[0],a=t?i[0]:i[1];parseInt(e.css("top"))===a&&0!==a||(e.css({top:a+"px",position:"absolute"}),this.className=t?"l":"r"),i[t?"0":"1"]+=parseInt(e.outerHeight(!0))}),e.height(i[0]>i[1]?i[0]:i[1])}else e.find("article").each(function(){$(this).css({position:"inherit",top:"auto"}).removeClass("r l")}),e.css("height","auto")}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()}))},_initIndexList:function(){var e=$(".articles > .fn-clear");if(0!==e.length){var a=0;$(".nav-abs li").each(function(e){var t=$(this);t.hide(),a!==t.data("year")&&(a=t.data("year"),t.before("
  • "+a+"
  • "))}),$(".article-more").parent().data("count")<=$(".article-more").parent().find("article").length&&$(".article-more").remove(),$(window).resize(function(){e.each(function(){if("auto"===$("#hideTop").css("top")){var i=[timeline._COLHA+60,4*timeline._COLHB];0===(e=$(this).find("article")).length?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(e.each(function(){var e=$(this),t=i[1]>i[0],a=t?i[0]:i[1];parseInt(e.css("top"))===a&&0!==a||(e.css({top:a+"px",position:"absolute"}),this.className=t?"l":"r"),i[t?"0":"1"]+=parseInt(e.outerHeight(!0))}),$(this).height(i[0]>i[1]?i[0]:i[1]))}else{var e;0===(e=$(this).find("article")).length?($(this).find("h2").remove(),$(this).css("margin-bottom",0)):(e.each(function(){$(this).css({position:"inherit",top:"auto"}).removeClass("r l")}),$(this).css("height","auto"))}})}),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}},_setNavCurrent:function(){$(".header li a").each(function(){$(this).prop("href")===location.href.split("#")[0]?this.className="current":this.className=""})},init:function(){$(window).scroll(function(){60<$(window).scrollTop()?$(".ico-top").show():$(".ico-top").hide()}),timeline._initIndexList(),timeline._initArticleList(),timeline._setNavCurrent(),$(".ico-list").click(function(){"0px"===$(".header > .container > form").css("height")?$(".header > .container > ul, .header > .container > form").css({height:"auto"}):$(".header > .container > ul, .header > .container > form").animate({height:"0px"})})},translate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getArchive:function(e,t,a){var i=e+t,s=e+"/"+t;if(window.location.hash="#"+i,0===$("#"+i+" > article").length){var n=e+" "+Label.yearLabel+" "+t+" "+Label.monthLabel;"en"===Label.localeString.substring(0,2)&&(n=a+" "+e);var r='

    '+n+'

    '+Label.moreLabel+"
    ";$("#"+i).html(r).css("margin-bottom","50px"),timeline.getNextPage($("#"+i).find(".article-more")[0],s)}},getNextPage:function(e,t){var o=$(e),c=o.data("page")+1,a="/articles/";if(1===$("#tag").length)a="/articles/tags/"+(i=location.pathname.split("/"))[i.length-1]+"/";else if(1===$("#author").length){var i;a="/articles/authors/"+(i=location.pathname.split("/"))[i.length-1]+"/"}else t&&(a="/articles/archives/"+t+"/");$.ajax({url:Label.servePath+a+"?p="+c,type:"GET",beforeSend:function(){o.css("background","url("+Label.staticServePath+"/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("")},success:function(e,t){if(e.sc)if(0!==e.rslts.articles.length){for(var a="",i=e.rslts.pagination,s=0;s

    '+n.articleTitle+"",n.hasUpdated&&(a+=""+Label.updatedLabel+""),n.articlePutTop&&(a+=""+Label.topArticleLabel+""),a+="

    "+n.articleAbstract+'

    ';for(var r=n.articleTags.split(","),l=0;l'+r[l]+"",l  '+(0===n.articleCommentCount?Label.noCommentLabel:n.articleCommentCount)+' '+n.articleViewCount+"
    "}o.before(a).data("page",c),i.paginationPageCount<=c?o.remove():o.css("background","none #60829F").text(Label.moreLabel),$(window).resize(),$(".module img").imagesLoaded(function(){$(window).resize()})}else o.remove();else o.css("background","none #60829F").text("Error")}})},toggleArchives:function(a,i){$(".nav-abs li").each(function(e){var t=$(this);t.hasClass("year")||(t.hide(),i===t.data("year")&&$(a).hasClass("close")&&t.show())}),$(".nav-abs li.year").each(function(){parseInt($(this).text())===i?$(a).hasClass("close")?a.className="year open":a.className="year close":this.className="year close"})}};!function(u,e){"use strict";var g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";u.fn.imagesLoaded=function(a){var i=this,s=u.isFunction(u.Deferred)?u.Deferred():0,n=u.isFunction(s.notify),r=i.find("img").add(i.filter("img")),l=[],o=[],c=[];function h(){var e=u(o),t=u(c);s&&(c.length?s.reject(r,e,t):s.resolve(r)),u.isFunction(a)&&a.call(i,r,e,t)}function d(e){m(e.target,"error"===e.type)}function m(e,t){e.src!==g&&-1===u.inArray(e,l)&&(l.push(e),t?c.push(e):o.push(e),u.data(e,"imagesLoaded",{isBroken:t,src:e.src}),n&&s.notifyWith(u(e),[t,r,u(o),u(c)]),r.length===l.length&&(setTimeout(h),r.unbind(".imagesLoaded",d)))}return u.isPlainObject(a)&&u.each(a,function(e,t){"callback"===e?a=t:s&&s[e](t)}),r.length?r.bind("load.imagesLoaded error.imagesLoaded",d).each(function(e,t){var a=t.src,i=u.data(t,"imagesLoaded");i&&i.src===a?m(t,i.isBroken):t.complete&&void 0!==t.naturalWidth?m(t,0===t.naturalWidth||0===t.naturalHeight):(t.readyState||t.complete)&&(t.src=g,t.src=a)}):h(),s?s.promise(i):i}}(jQuery),Util.init(),Util.setTopBar(),Util.replaceSideEm($(".comments .vditor-reset")),Util.buildTags("tagsSide"),timeline.init(); \ No newline at end of file diff --git a/tree-house/footer.ftl b/tree-house/footer.ftl index 6117ee7..cf9dc43 100644 --- a/tree-house/footer.ftl +++ b/tree-house/footer.ftl @@ -25,24 +25,9 @@ by Vanessa.
    +<#include "../../common-template/skin-script.ftl"> - +<#include "../../common-template/skin-script.ftl"> ${plugins} diff --git a/yilia/js/yilia.js b/yilia/js/yilia.js index c83d932..d80c060 100644 --- a/yilia/js/yilia.js +++ b/yilia/js/yilia.js @@ -102,7 +102,7 @@ var Yilia = { if ($qrCode.find('canvas').length === 0) { $.ajax({ method: 'GET', - url: latkeConfig.staticServePath + + url: Label.staticServePath + '/js/lib/jquery.qrcode.min.js', dataType: 'script', cache: true, diff --git a/yilia/js/yilia.min.js b/yilia/js/yilia.min.js index f1761ad..a515866 100644 --- a/yilia/js/yilia.min.js +++ b/yilia/js/yilia.min.js @@ -1 +1 @@ -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(''),$(".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(){var t=$(".share .fn-right"),i=t.find(".icon-wechat"),e=i.data("url"),o=i.data("avatar"),a=encodeURIComponent(i.data("title")+" - "+i.data("blogtitle")),s=encodeURIComponent(e),n={};n.weibo="http://v.t.sina.com.cn/share/share.php?title="+a+"&url="+s+"&pic="+o,n.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+s+"&sharesource=qzone&title="+a+"&pics="+o,n.twitter="https://twitter.com/intent/tweet?status="+a+" "+s,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===i.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){i.qrcode({width:128,height:128,text:e})}}):i.find("canvas").slideToggle(),!1):void window.open(n[t],"_blank","top=100,left=200,width=648,height=618")})}};Yilia.init(); \ No newline at end of file +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(''),$(".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(){var t=$(".share .fn-right"),i=t.find(".icon-wechat"),e=i.data("url"),o=i.data("avatar"),a=encodeURIComponent(i.data("title")+" - "+i.data("blogtitle")),s=encodeURIComponent(e),n={};n.weibo="http://v.t.sina.com.cn/share/share.php?title="+a+"&url="+s+"&pic="+o,n.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+s+"&sharesource=qzone&title="+a+"&pics="+o,n.twitter="https://twitter.com/intent/tweet?status="+a+" "+s,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===i.find("canvas").length?$.ajax({method:"GET",url:Label.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){i.qrcode({width:128,height:128,text:e})}}):i.find("canvas").slideToggle(),!1):void window.open(n[t],"_blank","top=100,left=200,width=648,height=618")})}};Yilia.init(); \ No newline at end of file