Van 2019-03-19 19:03:09 +08:00
parent 20a63cbe49
commit c8131b93ca
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
35 changed files with 63 additions and 353 deletions

View File

@ -34,20 +34,5 @@
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}"
};
Util.init()
</script>
${plugins} ${plugins}

View File

@ -23,22 +23,8 @@
Theme <a rel="friend" href="https://github.com/b3log/solo-skins" target="_blank">${skinDirName}</a> by <a rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>. Theme <a rel="friend" href="https://github.com/b3log/solo-skins" target="_blank">${skinDirName}</a> by <a rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
// init brush // init brush
var buildBrush = function () { var buildBrush = function () {
$("#brush").height(document.documentElement.scrollHeight - document.documentElement.clientHeight).css("background-position", $("#brush").height(document.documentElement.scrollHeight - document.documentElement.clientHeight).css("background-position",
@ -47,7 +33,6 @@
// init // init
$(document).ready(function () { $(document).ready(function () {
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($("#naviComments li .side-comment")); Util.replaceSideEm($("#naviComments li .side-comment"));

View File

@ -27,34 +27,11 @@
<div><em>All rights reserved.</em></div> <div><em>All rights reserved.</em></div>
</div> </div>
<script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"tag1Label": "${tag1Label}",
"viewLabel": "${viewLabel}",
"commentLabel": "${commentLabel}",
"topArticleLabel": "${topArticleLabel}",
"updatedLabel": "${updatedLabel}",
"contentLabel": "${fullContentLabel}",
"abstractLabel": "${abstractLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
</script>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/bootstrap${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/bootstrap${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script> <script>
Util.init()
Util.setTopBar() Util.setTopBar()
</script> </script>
${plugins} ${plugins}

View File

@ -50,21 +50,9 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
},
maxLength = parseInt("${mostCommentArticles?size}"); maxLength = parseInt("${mostCommentArticles?size}");
$(document).ready(function () { $(document).ready(function () {
@ -81,7 +69,6 @@
$(".moon-current-icon").removeClass().addClass("moon-icon"); $(".moon-current-icon").removeClass().addClass("moon-icon");
} }
Util.init();
Util.setTopBar() Util.setTopBar()
$(".footer-block").each(function (num) { $(".footer-block").each(function (num) {

View File

@ -30,20 +30,5 @@
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}"
};
Util.init()
</script>
${plugins} ${plugins}

View File

@ -160,7 +160,7 @@ var Finding = {
if ($qrCode.find('canvas').length === 0) { if ($qrCode.find('canvas').length === 0) {
$.ajax({ $.ajax({
method: 'GET', method: 'GET',
url: latkeConfig.staticServePath + url: Label.staticServePath +
'/js/lib/jquery.qrcode.min.js', '/js/lib/jquery.qrcode.min.js',
dataType: 'script', dataType: 'script',
cache: true, cache: true,

View File

@ -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('<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")),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<a;o++)if(i<n[o].offsetTop+280){l.find("li").removeClass("current");var e=0<o?o-1:0;l.find('a[href="#'+n[e].id+'"]').parent().addClass("current");break}i>=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(); 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('<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")),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<a;o++)if(i<n[o].offsetTop+280){l.find("li").removeClass("current");var e=0<o?o-1:0;l.find('a[href="#'+n[e].id+'"]').parent().addClass("current");break}i>=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();

View File

@ -38,21 +38,5 @@
<script type="text/javascript" src="${staticServePath}/js/lib/compress/pjax.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/compress/pjax.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}",
};
Util.init()
</script>
${plugins} ${plugins}

View File

@ -46,20 +46,5 @@
<script type="text/javascript" <script type="text/javascript"
src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script> charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}"
};
Util.init()
</script>
${plugins} ${plugins}

View File

@ -48,7 +48,7 @@ var Skin = {
if (!$('#articleSideShare .article__code').qrcode) { if (!$('#articleSideShare .article__code').qrcode) {
$.ajax({ $.ajax({
method: "GET", method: "GET",
url: latkeConfig.staticServePath + '/js/lib/jquery.qrcode.min.js', url: Label.staticServePath + '/js/lib/jquery.qrcode.min.js',
dataType: "script", dataType: "script",
cache: true cache: true
}); });

View File

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

View File

@ -29,23 +29,8 @@
</div> </div>
</div> </div>
<div id="goTop" onclick="goTop()">TOP</div> <div id="goTop" onclick="goTop()">TOP</div>
<script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
</script>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
${plugins} ${plugins}

View File

@ -95,7 +95,7 @@ var goTranslate = function () {
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href); window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
}; };
(function () { $(document).ready(function () {
// go top icon show or hide // go top icon show or hide
$(window).scroll(function () { $(window).scroll(function () {
var y = $(window).scrollTop(); var y = $(window).scrollTop();
@ -153,14 +153,13 @@ var goTranslate = function () {
// nav current // nav current
$(".nav ul li").each(function () { $(".nav ul li").each(function () {
var $a = $(this).find("a"); var $a = $(this).find("a");
if ($a.attr("href") === latkeConfig.servePath + location.pathname) { if ($a.attr("href") === Label.servePath + location.pathname) {
$(this).addClass("current"); $(this).addClass("current");
} else if (/\/[0-9]+$/.test(location.pathname)) { } else if (/\/[0-9]+$/.test(location.pathname)) {
$(".nav ul li")[0].className = "current"; $(".nav ul li")[0].className = "current";
} }
}); });
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($(".recent-comments-content")); Util.replaceSideEm($(".recent-comments-content"));
Util.buildTags("tagsSide"); Util.buildTags("tagsSide");
@ -175,4 +174,4 @@ var goTranslate = function () {
}); });
} }
}); });
})(); });

View File

@ -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<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+"&nbsp;年</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.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"})})}(); 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+"&nbsp;年</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")===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"})})}();

View File

@ -82,21 +82,5 @@
<script type="text/javascript" <script type="text/javascript"
src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script> charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
'servePath': "${servePath}",
'staticServePath': "${staticServePath}",
'isLoggedIn': "${isLoggedIn?string}",
'userName': "${userName}",
}
var Label = {
'markedAvailable': ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
'skinDirName': "${skinDirName}",
}
Util.init()
</script>
${plugins} ${plugins}

View File

@ -114,7 +114,7 @@ var Skin = {
if ($qrCode.find('canvas').length === 0) { if ($qrCode.find('canvas').length === 0) {
$.ajax({ $.ajax({
method: 'GET', method: 'GET',
url: latkeConfig.staticServePath + url: Label.staticServePath +
'/js/lib/jquery.qrcode.min.js', '/js/lib/jquery.qrcode.min.js',
dataType: 'script', dataType: 'script',
cache: true, cache: true,

View File

@ -1 +1 @@
var Skin={init:function(){new Headroom($("header")[0],{tolerance:0,offset:70,classes:{initial:"header",pinned:"header--down",unpinned:"header--up",top:"header",notTop:"header",bottom:"header",notBottom:"header"}}).init(),Util.initPjax(function(){0===$(".post__fix").length?$("body").addClass("body--gray"):$("body").removeClass("body--gray"),$(".header__nav a").each(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})}),$(".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(); 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();

View File

@ -30,24 +30,9 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
$(document).ready(function () { $(document).ready(function () {
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($(".side-navi .navi-comments .side-comment")); Util.replaceSideEm($(".side-navi .navi-comments .side-comment"));
}); });

View File

@ -28,24 +28,9 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
$(document).ready(function () { $(document).ready(function () {
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($(".side-navi .navi-comments li .side-comment")); Util.replaceSideEm($(".side-navi .navi-comments li .side-comment"));

File diff suppressed because one or more lines are too long

View File

@ -17,33 +17,8 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"tag1Label": "${tag1Label}",
"viewLabel": "${viewLabel}",
"commentLabel": "${commentLabel}",
"topArticleLabel": "${topArticleLabel}",
"updatedLabel": "${updatedLabel}",
"contentLabel": "${contentLabel}",
"abstractLabel": "${abstractLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
</script>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script> <#include "../../common-template/skin-script.ftl">
Util.init()
</script>
${plugins} ${plugins}

View File

@ -45,7 +45,7 @@ var MetroHot = {
$(".navigation").hide(); $(".navigation").hide();
}); });
$(".header .title").click(function() { $(".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) { if ($qrCode.find('canvas').length === 0) {
$.ajax({ $.ajax({
method: 'GET', method: 'GET',
url: latkeConfig.staticServePath + url: Label.staticServePath +
'/js/lib/jquery.qrcode.min.js', '/js/lib/jquery.qrcode.min.js',
dataType: 'script', dataType: 'script',
cache: true, cache: true,
@ -215,7 +215,7 @@ var MetroHot = {
loadRandomArticles: function() { loadRandomArticles: function() {
// getRandomArticles // getRandomArticles
$.ajax({ $.ajax({
url: latkeConfig.servePath + "/articles/random", url: Label.servePath + "/articles/random",
type: "POST", type: "POST",
success: function(result, textStatus) { success: function(result, textStatus) {
var randomArticles = result.randomArticles; var randomArticles = result.randomArticles;
@ -228,7 +228,7 @@ var MetroHot = {
for (var i = 0; i < randomArticles.length && i < 5; i++) { for (var i = 0; i < randomArticles.length && i < 5; i++) {
var article = randomArticles[i]; var article = randomArticles[i];
var title = article.articleTitle; var title = article.articleTitle;
var randomArticleLiHtml = "<li>" + "<a rel='nofollow' title='" + title + "' href='" + latkeConfig.servePath + var randomArticleLiHtml = "<li>" + "<a rel='nofollow' title='" + title + "' href='" + Label.servePath +
article.articlePermalink + "'>" + title + "</a></li>"; article.articlePermalink + "'>" + title + "</a></li>";
listHtml += randomArticleLiHtml; listHtml += randomArticleLiHtml;
} }
@ -244,7 +244,7 @@ var MetroHot = {
*/ */
loadRelevantArticles: function(id) { loadRelevantArticles: function(id) {
$.ajax({ $.ajax({
url: latkeConfig.servePath + "/article/id/" + id + "/relevant/articles", url: Label.servePath + "/article/id/" + id + "/relevant/articles",
type: "GET", type: "GET",
success: function(data, textStatus) { success: function(data, textStatus) {
var articles = data.relevantArticles; var articles = data.relevantArticles;
@ -258,7 +258,7 @@ var MetroHot = {
var title = article.articleTitle; var title = article.articleTitle;
var articleLiHtml = "<li>" var articleLiHtml = "<li>"
+ "<a rel='nofollow' title='" + title + "' href='" + "<a rel='nofollow' title='" + title + "' href='"
+ latkeConfig.servePath + article.articlePermalink + "'>" + Label.servePath + article.articlePermalink + "'>"
+ title + "</a></li>"; + title + "</a></li>";
listHtml += articleLiHtml; listHtml += articleLiHtml;
} }
@ -322,7 +322,6 @@ var MetroHot = {
(function() { (function() {
MetroHot.init(); MetroHot.init();
Util.killIE();
if ($(".article-header").length > 0) { if ($(".article-header").length > 0) {
MetroHot.share(); MetroHot.share();
} }

View File

@ -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<e&&e<=860?t="mid":window<460&&(t="small"),MetroHot.responsiveType!==t&&($(window).scroll(),MetroHot.responsiveType)}),$(window).scroll()},loadImg:function(e){e.style.marginTop=(220-e.height)/2+"px"},share:function(){var e=$(".share .text"),t=e.find(".icon-wechat"),i=t.data("url"),o=t.data("avatar"),a=encodeURIComponent(t.data("title")+" - "+t.data("blogtitle")),n=encodeURIComponent(i),r={};r.weibo="http://v.t.sina.com.cn/share/share.php?title="+a+"&url="+n+"&pic="+o,r.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+n+"&sharesource=qzone&title="+a+"&pics="+o,r.twitter="https://twitter.com/intent/tweet?status="+a+" "+n,e.find("span").click(function(){var e=$(this).data("type");if(e)return"wechat"===e?(0===t.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){t.qrcode({width:111,height:111,text:i})}}):t.find("canvas").slideToggle(),!1):void window.open(r[e],"_blank","top=100,left=200,width=648,height=618")})},loadRandomArticles:function(){$.ajax({url:latkeConfig.servePath+"/articles/random",type:"POST",success:function(e,t){var i=e.randomArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var n=i[a],r=n.articleTitle;o+="<li><a rel='nofollow' title='"+r+"' href='"+latkeConfig.servePath+n.articlePermalink+"'>"+r+"</a></li>"}var l="<ul>"+o+"</ul>";$("#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<i.length&&a<5;a++){var n=i[a],r=n.articleTitle;o+="<li><a rel='nofollow' title='"+r+"' href='"+latkeConfig.servePath+n.articlePermalink+"'>"+r+"</a></li>"}var l="<ul>"+o+"</ul>";$("#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<i.length&&a<5;a++){var n=i[a],r=n.articleTitle;o+="<li><a rel='nofollow' title='"+r+"' target='_blank' href='"+n.articlePermalink+"'>"+r+"</a></li>"}var l="<ul>"+o+"</ul>";$("#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(); 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<e&&e<=860?t="mid":window<460&&(t="small"),MetroHot.responsiveType!==t&&($(window).scroll(),MetroHot.responsiveType)}),$(window).scroll()},loadImg:function(e){e.style.marginTop=(220-e.height)/2+"px"},share:function(){var e=$(".share .text"),t=e.find(".icon-wechat"),i=t.data("url"),a=t.data("avatar"),o=encodeURIComponent(t.data("title")+" - "+t.data("blogtitle")),r=encodeURIComponent(i),n={};n.weibo="http://v.t.sina.com.cn/share/share.php?title="+o+"&url="+r+"&pic="+a,n.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+r+"&sharesource=qzone&title="+o+"&pics="+a,n.twitter="https://twitter.com/intent/tweet?status="+o+" "+r,e.find("span").click(function(){var e=$(this).data("type");if(e)return"wechat"===e?(0===t.find("canvas").length?$.ajax({method:"GET",url:Label.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){t.qrcode({width:111,height:111,text:i})}}):t.find("canvas").slideToggle(),!1):void window.open(n[e],"_blank","top=100,left=200,width=648,height=618")})},loadRandomArticles:function(){$.ajax({url:Label.servePath+"/articles/random",type:"POST",success:function(e,t){var i=e.randomArticles;if(i&&0!==i.length){for(var a="",o=0;o<i.length&&o<5;o++){var r=i[o],n=r.articleTitle;a+="<li><a rel='nofollow' title='"+n+"' href='"+Label.servePath+r.articlePermalink+"'>"+n+"</a></li>"}var l="<ul>"+a+"</ul>";$("#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<i.length&&o<5;o++){var r=i[o],n=r.articleTitle;a+="<li><a rel='nofollow' title='"+n+"' href='"+Label.servePath+r.articlePermalink+"'>"+n+"</a></li>"}var l="<ul>"+a+"</ul>";$("#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<i.length&&o<5;o++){var r=i[o],n=r.articleTitle;a+="<li><a rel='nofollow' title='"+n+"' target='_blank' href='"+r.articlePermalink+"'>"+n+"</a></li>"}var l="<ul>"+a+"</ul>";$("#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();

View File

@ -30,7 +30,6 @@
<meta name="revised" content="${blogTitle?html}, ${year}" /> <meta name="revised" content="${blogTitle?html}, ${year}" />
<meta http-equiv="Window-target" content="_top" /> <meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}" charset="utf-8" /> <link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}" charset="utf-8" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/${skinDirName}-responsive${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link href="${servePath}/rss.xml" title="RSS" type="application/rss+xml" rel="alternate" /> <link href="${servePath}/rss.xml" title="RSS" type="application/rss+xml" rel="alternate" />
<link rel="icon" type="image/png" href="${faviconURL}" /> <link rel="icon" type="image/png" href="${faviconURL}" />
<link rel="manifest" href="${servePath}/manifest.json"> <link rel="manifest" href="${servePath}/manifest.json">

View File

@ -38,22 +38,9 @@
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = { Label.tocLabel = "${tocLabel}";
"servePath": "${servePath}", Label.siteViewLabel = "${siteViewLabel}";
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}",
"tocLabel": "${tocLabel}",
"siteViewLabel": "${siteViewLabel}"
};
Util.init()
</script> </script>
${plugins} ${plugins}

View File

@ -37,21 +37,5 @@
<script type="text/javascript" src="${staticServePath}/js/lib/compress/pjax.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/compress/pjax.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}"
};
Util.init()
</script>
${plugins} ${plugins}

View File

@ -26,23 +26,9 @@
</footer> </footer>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
$(document).ready(function () { $(document).ready(function () {
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($(".side-comment").parent()); Util.replaceSideEm($(".side-comment").parent());
}); });

View File

@ -48,36 +48,21 @@
</div> </div>
</div> </div>
<div class="ico-top none" onclick="Util.goTop()" title="TOP"></div> <div class="ico-top none" onclick="Util.goTop()" title="TOP"></div>
<script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"tagLabel": "${tagLabel}",
"viewLabel": "${viewLabel}",
"commentLabel": "${commentLabel}",
"noCommentLabel": "${noCommentLabel}",
"topArticleLabel": "${topArticleLabel}",
"authorLabel": "${authorLabel}",
"updatedLabel": "${updatedLabel}",
"contentLabel": "${contentLabel}",
"abstractLabel": "${abstractLabel}",
"moreLabel": "${moreLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}",
"localeString": "${localeString}",
"yearLabel": "${yearLabel}",
"monthLabel": "${monthLabel}"
};
</script>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript">
Label.localeString = "${localeString}"
Label.yearLabel = "${yearLabel}"
Label.monthLabel = "${monthLabel}"
Label.moreLabel = "${moreLabel}"
Label.viewLabel = "${viewLabel}"
Label.commentLabel = "${commentLabel}"
Label.noCommentLabel = "${noCommentLabel}"
Label.tagLabel = "${tagLabel}"
Label.topArticleLabel = "${topArticleLabel}"
Label.authorLabel = "${authorLabel}"
Label.updatedLabel = "${updatedLabel}"
</script>
${plugins} ${plugins}

View File

@ -214,11 +214,11 @@ var timeline = {
path = "/articles/archives/" + archive + "/"; path = "/articles/archives/" + archive + "/";
} }
$.ajax({ $.ajax({
url: latkeConfig.servePath + path + '?p=' + currentPage, url: Label.servePath + path + '?p=' + currentPage,
type: "GET", type: "GET",
beforeSend: function() { beforeSend: function() {
$more.css("background", $more.css("background",
"url(" + latkeConfig.staticServePath "url(" + Label.staticServePath
+ "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text(""); + "/skins/timeline/images/ajax-loader.gif) no-repeat scroll center center #60829F").text("");
}, },
success: function(result, textStatus) { success: function(result, textStatus) {
@ -243,7 +243,7 @@ var timeline = {
+ '<div class="arrow"></div><time class="article-time"><span>' + '<div class="arrow"></div><time class="article-time"><span>'
+ Util.toDate(article.articleCreateTime, 'yy-MM-dd HH:mm') + Util.toDate(article.articleCreateTime, 'yy-MM-dd HH:mm')
+ '</span></time><h3 class="article-title"><a rel="bookmark" href="' + '</span></time><h3 class="article-title"><a rel="bookmark" href="'
+ latkeConfig.servePath + article.articlePermalink + '">' + Label.servePath + article.articlePermalink + '">'
+ article.articleTitle + '</a>'; + article.articleTitle + '</a>';
if (article.hasUpdated) { if (article.hasUpdated) {
@ -259,7 +259,7 @@ var timeline = {
var articleTags = article.articleTags.split(","); var articleTags = article.articleTags.split(",");
for (var j = 0; j < articleTags.length; j++) { for (var j = 0; j < articleTags.length; j++) {
articlesHTML += '<a rel="category tag" href="' + latkeConfig.servePath articlesHTML += '<a rel="category tag" href="' + Label.servePath
+ '/tags/' + encodeURIComponent(articleTags[j]) + '">' + articleTags[j] + '</a>'; + '/tags/' + encodeURIComponent(articleTags[j]) + '">' + articleTags[j] + '</a>';
if (j < articleTags.length - 1) { if (j < articleTags.length - 1) {
@ -268,9 +268,9 @@ var timeline = {
} }
articlesHTML += '</span>&nbsp;<span class="ico-author ico" title="' + Label.authorLabel + '">' articlesHTML += '</span>&nbsp;<span class="ico-author ico" title="' + Label.authorLabel + '">'
+ '<a rel="author" href="' + latkeConfig.servePath + '/authors/' + article.authorId + '">' + '<a rel="author" href="' + Label.servePath + '/authors/' + article.authorId + '">'
+ article.authorName + '</a></span>&nbsp;<span class="ico-comment ico" title="' + article.authorName + '</a></span>&nbsp;<span class="ico-comment ico" title="'
+ Label.commentLabel + '"><a rel="nofollow" href="' + latkeConfig.servePath + article.articlePermalink + Label.commentLabel + '"><a rel="nofollow" href="' + Label.servePath + article.articlePermalink
+ '#comments">' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount) + '#comments">' + (article.articleCommentCount === 0 ? Label.noCommentLabel : article.articleCommentCount)
+ '</a></span>&nbsp;<span class="ico-view ico" title="' + Label.viewLabel + '">' + '</a></span>&nbsp;<span class="ico-view ico" title="' + Label.viewLabel + '">'
+ '<a rel="nofollow" href="${servePath}${article.articlePermalink}">' + article.articleViewCount + '<a rel="nofollow" href="${servePath}${article.articlePermalink}">' + article.articleViewCount
@ -448,7 +448,6 @@ var timeline = {
})(jQuery); })(jQuery);
(function() { (function() {
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($(".comments .vditor-reset")); Util.replaceSideEm($(".comments .vditor-reset"));
Util.buildTags("tagsSide"); Util.buildTags("tagsSide");

File diff suppressed because one or more lines are too long

View File

@ -25,24 +25,9 @@ by <a rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.
<div class='goBottomIcon' onclick='Util.goBottom();'></div> <div class='goBottomIcon' onclick='Util.goBottom();'></div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include "../../common-template/skin-script.ftl">
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = {
"servePath": "${servePath}",
"isLoggedIn": "${isLoggedIn?string}",
"staticServePath": "${staticServePath}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"adminLabel": "${adminLabel}",
"logoutLabel": "${logoutLabel}",
"skinDirName": "${skinDirName}"
};
$(document).ready(function () { $(document).ready(function () {
Util.init();
Util.setTopBar() Util.setTopBar()
Util.replaceSideEm($("#recentComments li a")); Util.replaceSideEm($("#recentComments li a"));
}); });

View File

@ -50,20 +50,5 @@
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript"> <#include "../../common-template/skin-script.ftl">
var latkeConfig = {
"servePath": "${servePath}",
"staticServePath": "${staticServePath}",
"isLoggedIn": "${isLoggedIn?string}",
"userName": "${userName}"
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
"skinDirName": "${skinDirName}"
};
Util.init()
</script>
${plugins} ${plugins}

View File

@ -102,7 +102,7 @@ var Yilia = {
if ($qrCode.find('canvas').length === 0) { if ($qrCode.find('canvas').length === 0) {
$.ajax({ $.ajax({
method: 'GET', method: 'GET',
url: latkeConfig.staticServePath + url: Label.staticServePath +
'/js/lib/jquery.qrcode.min.js', '/js/lib/jquery.qrcode.min.js',
dataType: 'script', dataType: 'script',
cache: true, cache: true,

View File

@ -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('<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(){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(); 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(){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();