/* * Solo - A small and beautiful blogging system written in Java. * Copyright (c) 2010-2019, b3log.org & hacpai.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getNextPage=function(){var c=$(".article-next");currentPage+=1;var e="/articles/";if(1===$("#tag").length)e="/articles/tags/"+(t=location.pathname.split("/"))[t.length-1]+"/";else if(1===$("#archive").length){e="/articles/archives/"+(t=location.pathname.split("/"))[t.length-2]+"/"+t[t.length-1]+"/"}else if(1===$("#author").length){var t;e="/articles/authors/"+(t=location.pathname.split("/"))[t.length-1]+"/"}$.ajax({url:latkeConfig.servePath+e+currentPage,type:"GET",beforeSend:function(){c.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(e,t){if(e.sc){for(var a="",i=e.rslts.pagination,n=0;n

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

'+r.articleAbstract+'
',r.hasUpdated?a+=Util.toDate(r.articleUpdateTime,"yy-MM-dd HH:mm"):a+=Util.toDate(r.articleCreateTime,"yy-MM-dd HH:mm"),a+=' '+r.authorName+'
'+Label.tag1Label+" ";for(var l=r.articleTags.split(","),o=0;o
"}e.html(a);for(var o=$(".archives>div"),c=0,h=0,g=[],d=0;d=o.length);f++)o[d].style.left=310*f+"px",g[f]=0=n.headerH+t?(n.$nav.css("position","fixed"),n.$body.css("marginTop","55px")):(n.$nav.css("position","inherit"),n.$body.css("marginTop","0")),e>n.headerH){var a=$(window).height(),i=e+a-21;$("body").height()-58<=e+a&&(i=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",i)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if(!($(".dynamic").length<1)){var t=e.find(".side-comments"),a=e.find(".side-tags"),i=e.find(".side-most-comment"),n=e.find(".side-most-view");t.height()>a.height()?a.height(t.height()):t.height(a.height()),i.height()>n.height()?n.height(i.height()):i.height(n.height()),$(".content-reset").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})}},scrollToCmt:function(){1==$(window.location.hash).length&&$(window).scrollTop($(window.location.hash).offset().top-60)}};ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic();