Van 2019-02-11 01:02:12 +08:00
parent e3c64f977f
commit cd12e591de
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
122 changed files with 141 additions and 2950 deletions

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -144,7 +145,7 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -37,7 +37,7 @@
<time class="ft-gray">${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time> <time class="ft-gray">${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time>
<#if article.commentable> <#if article.commentable>
<a class="reply-btn" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a> <a class="reply-btn" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}')">${replyLabel}</a>
</#if> </#if>
</div> </div>
<div class="content-reset"> <div class="content-reset">

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -26,94 +26,8 @@
</ul> </ul>
<#if article.commentable> <#if article.commentable>
<header class='title'><h2>${postCommentsLabel}</h2></header> <header class='title'><h2>${postCommentsLabel}</h2></header>
<table id="commentForm" class="form"> <div class="form">
<tbody> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" class="normalInput" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" class="normalInput" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions" class="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="5" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text" class="normalInput" id="commentValidate"/>
<img class="captcha" id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
Skin.initArticle("${tocLabel}", "${siteViewLabel}");
// emotions
page.replaceCommentsEm("#comments .content-reset");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -43,6 +44,6 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -144,7 +145,7 @@
</div> </div>
</div> </div>
</div> </div>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -41,7 +41,7 @@
</div> </div>
<#if article.commentable> <#if article.commentable>
<div> <div>
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> <a rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</div> </div>
</#if> </#if>
</div> </div>

View File

@ -518,12 +518,6 @@ img {
padding-bottom: 30px; padding-bottom: 30px;
} }
.em00, .em01, .em02, .em03, .em04, .em05, .em06, .em07, .em08, .em09, .em10, .em11, .em12, .em13, .em14 {
background-image: url("../../../images/emotions/emotions.png");
background-size: 120px;
margin-right: 4px;
}
.comment-form { .comment-form {
margin-right: 15px; margin-right: 15px;
color: #606060; color: #606060;

File diff suppressed because one or more lines are too long

View File

@ -25,115 +25,8 @@
</#list> </#list>
</div> </div>
<#if article.commentable> <#if article.commentable>
<table id="commentForm" class="comment-form" cellpadding="0" cellspacing="0"> <div class="comment-form">
<tbody> <textarea rows="3" style="width: 100%" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<th width="115px">
${commentNameLabel}
</th>
<td>
<input type="text" id="commentName"/>
</td>
</tr>
<tr>
<th>
${commentEmailLabel}
</th>
<td>
<input type="text" id="commentEmail"/>
</td>
</tr>
<tr>
<th>
${commentURLLabel}
</th>
<td>
<input type="text" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<th>
${commentEmotionsLabel}
</th>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<th valign="top">
${commentContentLabel}
</th>
<td>
<textarea rows="10" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<th>
${captchaLabel}
</th>
<td>
<input type="text" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<button class="right" id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
<span style="margin-top: 13px;" class="right error-msg" id="commentErrorTip"></span>
</td>
</tr>
</tbody>
</table>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='comment-form' id='replyForm' cellpadding='0' cellspacing='0'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
// emotions
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -57,6 +58,6 @@
</div> </div>
</div> </div>
</div> </div>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -98,7 +99,7 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != externalRelevantArticlesDisplayCount> <#if 0 != externalRelevantArticlesDisplayCount>
page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>"); page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>");

View File

@ -34,7 +34,7 @@
</#if> </#if>
<span class="gray">• ${comment.commentDate2?string("yy-MM-dd HH:mm")} • <#if article.commentable> <span class="gray">• ${comment.commentDate2?string("yy-MM-dd HH:mm")} • <#if article.commentable>
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">Reply</a> <a rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">Reply</a>
</#if></span> </#if></span>
</div> </div>

View File

@ -1,18 +1 @@
/**
* 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 <https://www.gnu.org/licenses/>.
*/
@charset "utf-8";.article-date,.article-tags,.article-title,.footer{text-align:center}.footer,.header{background-color:#f9f9f9}body,button,input,select,textarea{font:400 1em/1.8 Avenir,Microsoft Yahei,Hiragino Sans GB,Microsoft Sans Serif,WenQuanYi Micro Hei,sans-serif;letter-spacing:.01rem}.site{padding:0 2em;margin:0 auto;font-size:16px}h4,h5,h6{font-weight:700}.article{margin-bottom:90px}.article-tags{font-size:14px}.article-date{font-size:12px;margin-top:6px;margin-bottom:12px}.article-content{font-size:1.1em}.article-content .task-list-item{list-style:none;margin-left:-1em}.article-content img{max-width:100%}.header{border-bottom:1px solid #ddd;margin-bottom:20px}.nav-item{position:relative;display:inline-block;padding:10px;font-weight:500}.nav-item .page-icon{float:left;height:14px;width:14px;margin:2px 3px 0 0}.comment{margin-bottom:32px}.comment p{margin-bottom:0}#captcha,#captchaReply,#emotions span,#emotionsReply span,.form-control{margin-top:15px}.cmtFromSym{font-size:12px;color:#ccc;margin-bottom:1em}.cmtForm{margin-top:24px}.gray{color:#ccc}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{cursor:pointer;background-image:url(../../../images/emotions/emotions.png);background-size:120px;float:left;height:24px;margin-right:5px;width:24px;transition:all .2s ease-out;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out}#emotions span:hover{transform:scale(1.2) rotate(360deg);-webkit-transform:scale(1.2) rotate(360deg);-moz-transform:scale(1.2) rotate(360deg)}.em01{background-position:-24px 0}.em02{background-position:-48px 0}.em03{background-position:-72px 0}.em04{background-position:-96px 1px}.em05{background-position:0 -24px}.em06{background-position:-24px -24px}.em07{background-position:-48px -24px}.em08{background-position:-72px -24px}.em09{background-position:-96px -24px}.em10{background-position:0 -48px}.em11{background-position:-24px -48px}.em12{background-position:-48px -48px}.em13{background-position:-72px -48px}.em14{background-position:-96px -48px}.footer{padding:40px 0;margin-top:20px;color:#999;border-top:1px solid #e5e5e5}.article-relative{margin-top:48px}.right{float:right} @charset "utf-8";.article-date,.article-tags,.article-title,.footer{text-align:center}.footer,.header{background-color:#f9f9f9}body,button,input,select,textarea{font:400 1em/1.8 Avenir,Microsoft Yahei,Hiragino Sans GB,Microsoft Sans Serif,WenQuanYi Micro Hei,sans-serif;letter-spacing:.01rem}.site{padding:0 2em;margin:0 auto;font-size:16px}h4,h5,h6{font-weight:700}.article{margin-bottom:90px}.article-tags{font-size:14px}.article-date{font-size:12px;margin-top:6px;margin-bottom:12px}.article-content{font-size:1.1em}.article-content .task-list-item{list-style:none;margin-left:-1em}.article-content img{max-width:100%}.header{border-bottom:1px solid #ddd;margin-bottom:20px}.nav-item{position:relative;display:inline-block;padding:10px;font-weight:500}.nav-item .page-icon{float:left;height:14px;width:14px;margin:2px 3px 0 0}.comment{margin-bottom:32px}.comment p{margin-bottom:0}#captcha,#captchaReply,#emotions span,#emotionsReply span,.form-control{margin-top:15px}.cmtFromSym{font-size:12px;color:#ccc;margin-bottom:1em}.cmtForm{margin-top:24px}.gray{color:#ccc}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{cursor:pointer;background-image:url(../../../images/emotions/emotions.png);background-size:120px;float:left;height:24px;margin-right:5px;width:24px;transition:all .2s ease-out;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out}#emotions span:hover{transform:scale(1.2) rotate(360deg);-webkit-transform:scale(1.2) rotate(360deg);-moz-transform:scale(1.2) rotate(360deg)}.em01{background-position:-24px 0}.em02{background-position:-48px 0}.em03{background-position:-72px 0}.em04{background-position:-96px 1px}.em05{background-position:0 -24px}.em06{background-position:-24px -24px}.em07{background-position:-48px -24px}.em08{background-position:-72px -24px}.em09{background-position:-96px -24px}.em10{background-position:0 -48px}.em11{background-position:-24px -48px}.em12{background-position:-48px -48px}.em13{background-position:-72px -48px}.em14{background-position:-96px -48px}.footer{padding:40px 0;margin-top:20px;color:#999;border-top:1px solid #e5e5e5}.article-relative{margin-top:48px}.right{float:right}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,84 +26,7 @@
<#if article.commentable> <#if article.commentable>
<div class="row cmtForm"> <div class="row cmtForm">
<table id="commentForm" class="col-sm-12 form-horizontal"> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment" class="form-control"></textarea>
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<label for="commentName" class="col-sm-2 control-label">Name</label>
</td>
<td>
<input type="text" class="form-control" id="commentName" placeholder="Name"/>
</td>
</tr>
<tr>
<td>
<label for="commentName" class="col-sm-2 control-label">Email</label>
</td>
<td>
<input type="text" class="form-control" id="commentEmail" placeholder="Email"/>
</td>
</tr>
<tr>
<td>
<label for="commentName" class="col-sm-2 control-label">URL</label>
</td>
<td>
<input type="text" id="commentURL" placeholder="URL" class="form-control"/>
</td>
</tr>
</#if>
<tr>
<td>&nbsp;</td>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<textarea rows="3" id="comment" class="form-control"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>&nbsp;</td>
<td>
<form class="form-inline">
<input type="text" id="commentValidate" class="form-control"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</form>
</td>
</tr>
<#else>
<tr colspan="2">
<td>&nbsp;</td>
</tr>
</#if>
<tr>
<td align="right" colspan="2">
<span class="text-danger" id="commentErrorTip"></span>
<button class="btn btn-success" id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
<#if externalRelevantArticlesDisplayCount?? && 0 != externalRelevantArticlesDisplayCount> <#if externalRelevantArticlesDisplayCount?? && 0 != externalRelevantArticlesDisplayCount>
@ -111,39 +34,3 @@
</#if> </#if>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticlesLabel}",
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='cmtReplyForm col-sm-12 form-horizontal' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
$("#replyForm label").each(function () {
$this = $(this);
$this.attr("for", $this.attr("for") + "Reply");
});
};
$(document).ready(function () {
page.load();
// emotions
page.replaceCommentsEm("#comments");
<#nested>
});
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -47,6 +48,6 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -142,7 +143,7 @@
<div class="footer"> <div class="footer">
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -41,7 +41,7 @@
<div class="clear"></div> <div class="clear"></div>
<#if article.commentable> <#if article.commentable>
<div class="reply"> <div class="reply">
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> <a rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</div> </div>
</#if> </#if>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -27,130 +27,8 @@
<div class="comment-title"> <div class="comment-title">
${postCommentsLabel} ${postCommentsLabel}
</div> </div>
<table id="commentForm" class="comment" cellpadding="0" cellspacing="0" width="100%"> <div class="comment">
<tbody> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<th width="200px">
<span class="comment-label">
${commentNameLabel}
</span>
<span class="arrow-right"></span>
</th>
<td>
<input type="text" id="commentName"/>
</td>
</tr>
<tr>
<th>
<span class="comment-label">
${commentEmailLabel}
</span>
<span class="arrow-right"></span>
</th>
<td>
<input type="text" id="commentEmail"/>
</td>
</tr>
<tr>
<th>
<span class="comment-label">
${commentURLLabel}
</span>
<span class="arrow-right"></span>
</th>
<td>
<input type="text" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<th>
<span class="comment-label">
${commentEmotionsLabel}
</span>
<span class="arrow-right"></span>
</th>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<th valign="top">
<span class="comment-label">
${commentContentLabel}
</span>
<span class="arrow-right"></span>
</th>
<td>
<textarea rows="10" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<th>
<span class="comment-label">
${captchaLabel}
</span>
<span class="arrow-right"></span>
</th>
<td>
<input type="text" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2">
<span style="margin-top: 20px;" class="right error-msg" id="commentErrorTip"></span>
<input id="submitCommentButton" type="button" onclick="page.submitComment();" value="${submmitCommentLabel}"/>
</td>
</tr>
</tbody>
</table>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table width='100%' cellspacing='0' cellpadding='0' class='comment' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -44,6 +45,6 @@
<div class="footer"> <div class="footer">
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -134,7 +135,7 @@
</#if> </#if>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != externalRelevantArticlesDisplayCount> <#if 0 != externalRelevantArticlesDisplayCount>
page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>"); page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>");

View File

@ -39,7 +39,7 @@
<time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time> <time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time>
</span> </span>
<#if article.commentable> <#if article.commentable>
<a class="fn-right" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a> <a class="fn-right" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}')">${replyLabel}</a>
</#if> </#if>
</div> </div>
<div class="comment-content post-content"> <div class="comment-content post-content">

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1 @@
/*
* 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 <https://www.gnu.org/licenses/>.
*/
var Finding={init:function(){Util.killIE(),this._initToc(),$(".scroll-down").click(function(t){t.preventDefault();var n=$(this),o=$("html, body"),i=!!n.attr("data-offset")&&n.attr("data-offset"),e=parseInt(i);o.stop(!0,!1).animate({scrollTop:$(this.hash).offset().top+e},500)}),$("body").append('<a class="icon-gotop fn-none" href="javascript:Util.goTop()"></a><span class="menu-button icon-menu"><span class="word">Menu</span></span>'),$(".menu-button").click(function(t){t.stopPropagation(),$("body").toggleClass("nav-opened nav-closed")}),$(window).scroll(function(){$(window).scrollTop()>$(".main-header").height()?$(".icon-gotop").show():$(".icon-gotop").hide()})},_initToc:function(){if(0===$(".b3-solo-list li").length)return $(".nav .icon-list").hide(),void $(".nav .icon-sitemap").click();$(".nav ul:first").after($(".b3-solo-list")),$("body").toggleClass("nav-opened nav-closed"),$(".nav .icon-list").show(),Finding.tabNav("toc");var a=$(".article-body [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(t){if(0===$(".b3-solo-list li").length)return!1;var n=[];a.each(function(t){n.push({id:this.id,offsetTop:this.offsetTop})});for(var o=$(window).scrollTop(),i=0,e=n.length;i<e;i++)if(o<n[i].offsetTop+280){l.find("li").removeClass("current");var s=0<i?i-1:0;l.find('a[href="#'+n[s].id+'"]').parent().addClass("current");break}o>=n[n.length-1].offsetTop+280&&(l.find("li").removeClass("current"),l.find("li:last").addClass("current"))}),$(window).scroll()},tabNav:function(t){$(".nav .current").removeClass("current"),"toc"===t?($(".nav ul:first, .nav .count").hide(),$(".nav ul:last").show(),$(".icon-list").addClass("current")):($(".nav ul:first, .nav .count").show(),$(".nav ul:last").hide(),$(".icon-sitemap").addClass("current"))},share:function(){$(".share span").click(function(){var t=$(this).data("type"),n=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,i=$(".post-content img:eq(0)").attr("src"),e={};e.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+n+"&url="+o+"&pic="+i,e.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+o+"&pic="+i,e.google="https://plus.google.com/share?url="+o,e.twitter="https://twitter.com/intent/tweet?status="+n+" "+o,window.open(e[t],"_blank","top=100,left=200,width=648,height=618")})}};Finding.init(); var Finding={init:function(){Util.killIE(),this._initToc(),$(".scroll-down").click(function(t){t.preventDefault();var n=$(this),o=$("html, body"),i=!!n.attr("data-offset")&&n.attr("data-offset"),e=parseInt(i);o.stop(!0,!1).animate({scrollTop:$(this.hash).offset().top+e},500)}),$("body").append('<a class="icon-gotop fn-none" href="javascript:Util.goTop()"></a><span class="menu-button icon-menu"><span class="word">Menu</span></span>'),$(".menu-button").click(function(t){t.stopPropagation(),$("body").toggleClass("nav-opened nav-closed")}),$(window).scroll(function(){$(window).scrollTop()>$(".main-header").height()?$(".icon-gotop").show():$(".icon-gotop").hide()})},_initToc:function(){if(0===$(".b3-solo-list li").length)return $(".nav .icon-list").hide(),void $(".nav .icon-sitemap").click();$(".nav ul:first").after($(".b3-solo-list")),$("body").toggleClass("nav-opened nav-closed"),$(".nav .icon-list").show(),Finding.tabNav("toc");var a=$(".article-body [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(t){if(0===$(".b3-solo-list li").length)return!1;var n=[];a.each(function(t){n.push({id:this.id,offsetTop:this.offsetTop})});for(var o=$(window).scrollTop(),i=0,e=n.length;i<e;i++)if(o<n[i].offsetTop+280){l.find("li").removeClass("current");var s=0<i?i-1:0;l.find('a[href="#'+n[s].id+'"]').parent().addClass("current");break}o>=n[n.length-1].offsetTop+280&&(l.find("li").removeClass("current"),l.find("li:last").addClass("current"))}),$(window).scroll()},tabNav:function(t){$(".nav .current").removeClass("current"),"toc"===t?($(".nav ul:first, .nav .count").hide(),$(".nav ul:last").show(),$(".icon-list").addClass("current")):($(".nav ul:first, .nav .count").show(),$(".nav ul:last").hide(),$(".icon-sitemap").addClass("current"))},share:function(){$(".share span").click(function(){var t=$(this).data("type"),n=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,i=$(".post-content img:eq(0)").attr("src"),e={};e.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+n+"&url="+o+"&pic="+i,e.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+o+"&pic="+i,e.google="https://plus.google.com/share?url="+o,e.twitter="https://twitter.com/intent/tweet?status="+n+" "+o,window.open(e[t],"_blank","top=100,left=200,width=648,height=618")})}};Finding.init();

View File

@ -24,96 +24,8 @@
</#list> </#list>
</ul> </ul>
<#if article.commentable> <#if article.commentable>
<div class="comment-body fn-wrap"> <div class="comment-body fn-wrap form">
<table id="commentForm" class="form"> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" class="normalInput" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" class="normalInput" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text" class="normalInput" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
Finding.share();
page.load();
// emotions
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -52,7 +53,7 @@
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</div> </div>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -125,7 +126,7 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<#if pjax><!---- pjax {#pjax} start ----></#if> <#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
</@comment_script> </@comment_script>
<#if pjax><!---- pjax {#pjax} end ----></#if> <#if pjax><!---- pjax {#pjax} end ----></#if>

View File

@ -38,7 +38,7 @@
<time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time> <time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time>
<#if article.commentable> <#if article.commentable>
<span class="fn__right comment__btn" onclick="replyTo('${comment.oId}')"> <span class="fn__right comment__btn" onclick="page.toggleEditor('${comment.oId}', '${comment.commentName}')">
<i class="icon__comments"></i> <i class="icon__comments"></i>
</span> </span>
</#if> </#if>

View File

@ -1,20 +1,3 @@
/**
* 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 <https://www.gnu.org/licenses/>.
*/
@charset "UTF-8"; @charset "UTF-8";
/** /**
* Solo - A small and beautiful blogging system written in Java. * Solo - A small and beautiful blogging system written in Java.

17
Jane/css/base.min.css vendored

File diff suppressed because one or more lines are too long

17
Jane/js/common.min.js vendored
View File

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

File diff suppressed because one or more lines are too long

View File

@ -29,101 +29,8 @@
</ul> </ul>
<#if article.commentable> <#if article.commentable>
<table id="commentForm" class="form"> <div class="form" style="padding-left: 0">
<tbody> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions" class="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="5" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text"
id="commentValidate"/>
<img class="comments__captcha" id="captcha" alt="validate" src="${servePath}/captcha"/>
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="ft__red" id="commentErrorTip"></span>
<button class="fn__none" id="cancelCommentButton" onclick="$('#replyForm').remove();page.currentCommentId = ''">${cancelLabel}</button>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
'nameTooLongLabel': "${nameTooLongLabel}",
'mailCannotEmptyLabel': "${mailCannotEmptyLabel}",
'mailInvalidLabel': "${mailInvalidLabel}",
'commentContentCannotEmptyLabel': "${commentContentCannotEmptyLabel}",
'captchaCannotEmptyLabel': "${captchaCannotEmptyLabel}",
'loadingLabel': "${loadingLabel}",
'oId': "${oId}",
'skinDirName': "${skinDirName}",
'blogHost': "${blogHost}",
'randomArticles1Label': "${randomArticles1Label}",
'externalRelevantArticles1Label': "${externalRelevantArticles1Label}",
})
var replyTo = function (id) {
var commentFormHTML = '<table class=\'form comments__reply comments__content\' id=\'replyForm\'>'
page.addReplyForm(id, commentFormHTML)
};
$(document).ready(function () {
page.load({
language: {
theme: 'tomorrow-night-eighties'
}
})
// emotions
page.replaceCommentsEm('#comments .content-reset')
<#nested>
Skin.initToc()
})
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -45,7 +46,7 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<#if pjax><!---- pjax {#pjax} start ----></#if> <#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
<#if pjax><!---- pjax {#pjax} end ----></#if> <#if pjax><!---- pjax {#pjax} end ----></#if>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -135,7 +136,7 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -35,7 +35,7 @@
</div> </div>
<#if article.commentable> <#if article.commentable>
<div class="right"> <div class="right">
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> <a rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
&nbsp;|&nbsp; &nbsp;|&nbsp;
${comment.commentDate2?string("yyyy-MM-dd HH:mm:ss")} ${comment.commentDate2?string("yyyy-MM-dd HH:mm:ss")}
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1 @@
/*
* 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 <https://www.gnu.org/licenses/>.
*/
var goTop=function(e){e=e||.1;var a=$(window).scrollTop(),t=1+e;if(window.scrollTo(0,Math.floor(a/t)),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.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")===latkeConfig.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})}();

View File

@ -32,104 +32,7 @@
<#if article.commentable> <#if article.commentable>
<div class="form"> <div class="form">
<h4>${postCommentsLabel}</h4> <h4>${postCommentsLabel}</h4>
<table id="commentForm"> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<input type="text" class="normalInput" id="commentName"/>
<label for="commentName">${commentNameLabel}</label>
</td>
</tr>
<tr>
<td>
<input type="text" class="normalInput" id="commentEmail"/>
<label for="commentEmail">${commentEmailLabel}</label>
</td>
</tr>
<tr>
<td>
<input type="text" id="commentURL"/>
<label for="commentURL">${commentURLLabel}</label>
</td>
</tr>
</#if>
<tr>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input type="text" class="normalInput" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td align="right">
<span class="tip" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticlesLabel}",
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
$("#replyForm label").each(function () {
$this = $(this);
$this.attr("for", $this.attr("for") + "Reply");
});
};
(function () {
page.load();
// emotions
page.replaceCommentsEm("#comments .article-body");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -43,6 +44,6 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -150,7 +151,7 @@
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
</div> </div>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -36,7 +36,7 @@
<#if article.commentable> <#if article.commentable>
<a class="no-underline" <a class="no-underline"
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</#if> </#if>
</div> </div>
<div class="clear"></div> <div class="clear"></div>

File diff suppressed because one or more lines are too long

View File

@ -31,115 +31,6 @@
<div class="comment-title"> <div class="comment-title">
${postCommentsLabel} ${postCommentsLabel}
</div> </div>
<div class="comment-body"> <textarea style="width: 100%;box-sizing: border-box" rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<table id="commentForm" class="form">
<tbody>
<#if !isLoggedIn>
<tr>
<th>
${commentName1Label}
</th>
<td>
<input type="text" class="normalInput" id="commentName"/>
</td>
</tr>
<tr>
<th>
${commentEmail1Label}
</th>
<td>
<input type="text" class="normalInput" id="commentEmail"/>
</td>
</tr>
<tr>
<th>
${commentURL1Label}
</th>
<td>
<input type="text" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<th>
${commentEmotions1Label}
</th>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<th valign="top">
${commentContent1Label}
</th>
<td>
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<th>
${captcha1Label}
</th>
<td>
<input type="text" class="normalInput" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span style="line-height: 28px;" class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
// emotions
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -53,6 +54,6 @@
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
</div> </div>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -131,7 +132,7 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles('<h4 class="ft-gray">${randomArticlesLabel}</h4>'); page.loadRandomArticles('<h4 class="ft-gray">${randomArticlesLabel}</h4>');

View File

@ -36,7 +36,7 @@
<#if article.commentable> <#if article.commentable>
<div class="right ft-gray"> <div class="right ft-gray">
${comment.commentDate2?string("yy-MM-dd HH:mm")} ${comment.commentDate2?string("yy-MM-dd HH:mm")}
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> <a rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</div> </div>
</#if> </#if>
<span class="clear"></span> <span class="clear"></span>

View File

@ -125,69 +125,6 @@ sup {
padding: 0 5px; padding: 0 5px;
text-shadow: 0 0 1px #D5D5D5; text-shadow: 0 0 1px #D5D5D5;
} }
.em00, .em01, .em02, .em03, .em04, .em05, .em06, .em07, .em08, .em09,
.em10, .em11, .em12, .em13, .em14 {
cursor: pointer;
background-image: url("../../../images/emotions/emotions.png");
background-size: 120px;
float: left;
height: 24px;
margin-right: 5px;
width: 24px;
transition: all .2s ease-out;
-webkit-transition: all .2s ease-out;
-moz-transition: all .2s ease-out;
}
#emotions span:hover {
transform: scale(1.2) rotate(360deg);
-webkit-transform: scale(1.2) rotate(360deg);
-moz-transform: scale(1.2) rotate(360deg);
}
.em01 {
background-position: -24px 0;
}
.em02 {
background-position: -48px 0;
}
.em03 {
background-position: -72px 0;
}
.em04 {
background-position: -96px 1px;
}
.em05 {
background-position: 0 -24px;
}
.em06 {
background-position: -24px -24px;
}
.em07 {
background-position: -48px -24px;
}
.em08 {
background-position: -72px -24px;
}
.em09 {
background-position: -96px -24px;
}
.em10 {
background-position: 0 -48px;
}
.em11 {
background-position: -24px -48px ;
}
.em12 {
background-position: -48px -48px;
}
.em13 {
background-position: -72px -48px;
}
.em14 {
background-position: -96px -48px;
}
/* end base */ /* end base */
/* start ico */ /* start ico */
@ -690,11 +627,6 @@ sup {
.comment-body-ref > .comment-panel > .right { .comment-body-ref > .comment-panel > .right {
display: none; display: none;
} }
#replyForm {
margin-left: 25px;
}
.form { .form {
padding: 0 50px 20px; padding: 0 50px 20px;
} }

19
ease/css/ease.min.css vendored

File diff suppressed because one or more lines are too long

17
ease/js/ease.min.js vendored
View File

@ -1,18 +1 @@
/*
* 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 <https://www.gnu.org/licenses/>.
*/
var goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},getNextPage=function(){var 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+"?p="+currentPage,type:"GET",beforeSend:function(){c.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(e,t){if(e.sc){for(var a="",i=e.rslts.pagination,r=0;r<e.rslts.articles.length;r++){var l=e.rslts.articles[r],n="";e.rslts.articles.length-1===r&&(n=" article-last"),a+='<li class="article'+n+'"><div class="article-title"><h2><a rel="bookmark" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleTitle+"</a>",l.hasUpdated&&(a+="<sup>"+Label.updatedLabel+"</sup>"),l.articlePutTop&&(a+="<sup>"+Label.topArticleLabel+"</sup>"),a+='</h2><div class="right"><a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'#comments">'+ +l.articleCommentCount+"&nbsp;&nbsp;"+Label.commentLabel+'</a>&nbsp;&nbsp;<a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleViewCount+"&nbsp;&nbsp;"+Label.viewLabel+'</a></div><div class="clear"></div></div><div class="article-body"><div id="abstract'+l.oId+'">'+l.articleAbstract+'</div><div id="content'+l.oId+'" class="none"></div></div><div class="right ft-gray">',l.hasUpdated?a+=Util.toDate(l.articleUpdateTime,"yy-MM-dd HH:mm"):a+=Util.toDate(l.articleCreateTime,"yy-MM-dd HH:mm"),a+=' <a href="'+latkeConfig.servePath+"/authors/"+l.authorId+'">'+l.authorName+'</a></div><div class="left ft-gray">'+Label.tag1Label+" ";for(var s=l.articleTags.split(","),o=0;o<s.length;o++)a+='<a rel="tag" href="'+latkeConfig.servePath+"/tags/"+encodeURIComponent(s[o])+'">'+s[o]+"</a>",o<s.length-1&&(a+=", ");a+='</div><div class="clear"></div></li>'}$(".article-last").removeClass("article-last"),$(".main>.wrapper>ul").append(a),i.paginationPageCount===currentPage?c.remove():c.css("background","none")}}})},ease={$header:$(".header"),headerH:103,$body:$(".main > .wrapper"),$nav:$(".nav"),getCurrentPage:function(){var e=$(".article-next");0<e.length&&(window.currentPage=e.data("page"))},setNavCurrent:function(){$(".nav ul a").each(function(){var e=$(this);e.attr("href")===location.href?e.addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")})},initCommon:function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide")},initArchives:function(){var e=$(".archives");if(!(e.length<1)){$(".footer").css("marginTop","30px");for(var i=[],t=e.find("span").each(function(){for(var e=$(this).data("year"),t=!0,a=0;a<i.length;a++)if(e===i[a]){t=!1;break}t&&i.push(e)}),a="",r=0;r<i.length;r++){for(var l="",n=0;n<t.length;n++){var s=$(t[n]);s.data("year")===i[r]&&(l+=s.html())}a+="<div><h3 class='ft-gray'>"+i[r]+"</h3>"+l+"</div>"}e.html(a);for(var o=$(".archives>div"),c=0,h=0,g=[],d=0;d<o.length;d++){for(var f=0;f<3&&!(d>=o.length);f++)o[d].style.left=310*f+"px",g[f]=0<c?(""!==o[d-3].style.top&&(h=parseInt(o[d-3].style.top)),o[d].style.top=$(o[d-3]).height()+60+h+"px",parseInt(o[d].style.top)+$(o[d]).height()+60):$(o[d]).height()+60,f<2&&(d+=1);c+=1}e.height(g.sort()[g.length-1])}},scrollEvent:function(){var i=this;$(window).scroll(function(){var e=$(window).scrollTop();if(e>i.headerH){var t=$(window).height(),a=e+t-21;$("body").height()-58<=e+t&&(a=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",a)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if(!($(".dynamic").length<1)){var t=e.find(".side-categories"),a=e.find(".side-tags"),i=e.find(".side-most-comment"),r=e.find(".side-most-view");t.height()>a.height()?a.height(t.height()):t.height(a.height()),i.height()>r.height()?r.height(i.height()):i.height(r.height()),$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})}}};ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic(); 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+"?p="+currentPage,type:"GET",beforeSend:function(){c.css("background","url("+latkeConfig.staticServePath+"/skins/ease/images/ajax-loader.gif) no-repeat scroll center center #fefefe")},success:function(e,t){if(e.sc){for(var a="",i=e.rslts.pagination,r=0;r<e.rslts.articles.length;r++){var l=e.rslts.articles[r],n="";e.rslts.articles.length-1===r&&(n=" article-last"),a+='<li class="article'+n+'"><div class="article-title"><h2><a rel="bookmark" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleTitle+"</a>",l.hasUpdated&&(a+="<sup>"+Label.updatedLabel+"</sup>"),l.articlePutTop&&(a+="<sup>"+Label.topArticleLabel+"</sup>"),a+='</h2><div class="right"><a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'#comments">'+ +l.articleCommentCount+"&nbsp;&nbsp;"+Label.commentLabel+'</a>&nbsp;&nbsp;<a rel="nofollow" class="ft-gray" href="'+latkeConfig.servePath+l.articlePermalink+'">'+l.articleViewCount+"&nbsp;&nbsp;"+Label.viewLabel+'</a></div><div class="clear"></div></div><div class="article-body"><div id="abstract'+l.oId+'">'+l.articleAbstract+'</div><div id="content'+l.oId+'" class="none"></div></div><div class="right ft-gray">',l.hasUpdated?a+=Util.toDate(l.articleUpdateTime,"yy-MM-dd HH:mm"):a+=Util.toDate(l.articleCreateTime,"yy-MM-dd HH:mm"),a+=' <a href="'+latkeConfig.servePath+"/authors/"+l.authorId+'">'+l.authorName+'</a></div><div class="left ft-gray">'+Label.tag1Label+" ";for(var s=l.articleTags.split(","),o=0;o<s.length;o++)a+='<a rel="tag" href="'+latkeConfig.servePath+"/tags/"+encodeURIComponent(s[o])+'">'+s[o]+"</a>",o<s.length-1&&(a+=", ");a+='</div><div class="clear"></div></li>'}$(".article-last").removeClass("article-last"),$(".main>.wrapper>ul").append(a),i.paginationPageCount===currentPage?c.remove():c.css("background","none")}}})},ease={$header:$(".header"),headerH:103,$body:$(".main > .wrapper"),$nav:$(".nav"),getCurrentPage:function(){var e=$(".article-next");0<e.length&&(window.currentPage=e.data("page"))},setNavCurrent:function(){$(".nav ul a").each(function(){var e=$(this);e.attr("href")===location.href?e.addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")})},initCommon:function(){Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide")},initArchives:function(){var e=$(".archives");if(!(e.length<1)){$(".footer").css("marginTop","30px");for(var i=[],t=e.find("span").each(function(){for(var e=$(this).data("year"),t=!0,a=0;a<i.length;a++)if(e===i[a]){t=!1;break}t&&i.push(e)}),a="",r=0;r<i.length;r++){for(var l="",n=0;n<t.length;n++){var s=$(t[n]);s.data("year")===i[r]&&(l+=s.html())}a+="<div><h3 class='ft-gray'>"+i[r]+"</h3>"+l+"</div>"}e.html(a);for(var o=$(".archives>div"),c=0,h=0,g=[],d=0;d<o.length;d++){for(var f=0;f<3&&!(d>=o.length);f++)o[d].style.left=310*f+"px",g[f]=0<c?(""!==o[d-3].style.top&&(h=parseInt(o[d-3].style.top)),o[d].style.top=$(o[d-3]).height()+60+h+"px",parseInt(o[d].style.top)+$(o[d]).height()+60):$(o[d]).height()+60,f<2&&(d+=1);c+=1}e.height(g.sort()[g.length-1])}},scrollEvent:function(){var i=this;$(window).scroll(function(){var e=$(window).scrollTop();if(e>i.headerH){var t=$(window).height(),a=e+t-21;$("body").height()-58<=e+t&&(a=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",a)}else $("#goTop").hide()})},setDynamic:function(){var e=$(".dynamic");if(!($(".dynamic").length<1)){var t=e.find(".side-categories"),a=e.find(".side-tags"),i=e.find(".side-most-comment"),r=e.find(".side-most-view");t.height()>a.height()?a.height(t.height()):t.height(a.height()),i.height()>r.height()?r.height(i.height()):i.height(r.height()),$(".article-body").each(function(){this.innerHTML=Util.replaceEmString($(this).html())})}}};ease.getCurrentPage(),ease.initCommon(),ease.scrollEvent(),ease.setNavCurrent(),ease.initArchives(),ease.setDynamic();

View File

@ -25,70 +25,7 @@
</div> </div>
<#if article.commentable> <#if article.commentable>
<div class="form"> <div class="form">
<table id="commentForm"> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<tbody>
<#if !isLoggedIn>
<tr>
<td colspan="2">
<input type="text" class="normalInput" id="commentName"/>
<label for="commentName">${commentNameLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" class="normalInput" id="commentEmail"/>
<label for="commentEmail">${commentEmailLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="commentURL"/>
<label for="commentURL">${commentURLLabel}</label>
</td>
</tr>
</#if>
<tr>
<td id="emotions" colspan="2">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td colspan="2">
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td colspan="2">
<input type="text" class="normalInput" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td>
<span class="ft-gray" id="commentErrorTip"></span>
</td>
<td align="right">
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
<#if externalRelevantArticlesDisplayCount?? && 0 != externalRelevantArticlesDisplayCount> <#if externalRelevantArticlesDisplayCount?? && 0 != externalRelevantArticlesDisplayCount>
<div id="externalRelevantArticles" class="article-relative"></div> <div id="externalRelevantArticles" class="article-relative"></div>
@ -96,39 +33,3 @@
<span class="clear"></span> <span class="clear"></span>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticlesLabel}",
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
});
var replyTo = function(id) {
var commentFormHTML = "<table class='form' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
$("#replyForm label").each(function() {
$this = $(this);
$this.attr("for", $this.attr("for") + "Reply");
});
};
$(document).ready(function() {
page.load();
// emotions
page.replaceCommentsEm("#comments .article-body");
<#nested>
});
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -39,6 +40,6 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -161,7 +162,7 @@
<div class="footer-icon"><#include "statistic.ftl"></div> <div class="footer-icon"><#include "statistic.ftl"></div>
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -42,7 +42,7 @@
<#if article.commentable> <#if article.commentable>
<div class="right"> <div class="right">
<a rel="nofollow" class="no-underline" <a rel="nofollow" class="no-underline"
href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</div> </div>
</#if> </#if>
<div class="clear"> <div class="clear">

File diff suppressed because one or more lines are too long

View File

@ -24,109 +24,8 @@
</#list> </#list>
</div> </div>
<#if article.commentable> <#if article.commentable>
<table id="commentForm" class="comment-form"> <div class="comment-form">
<tbody> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<td width="208px">
<input type="text" class="normalInput" id="commentName"/>
</td>
<td width="400px">
${commentNameLabel}
</td>
</tr>
<tr>
<td>
<input type="text" class="normalInput" id="commentEmail"/>
</td>
<td>
${commentEmailLabel}
</td>
</tr>
<tr>
<td>
<input type="text" id="commentURL"/>
</td>
<td>
${commentURLLabel}
</td>
</tr>
</#if>
<tr>
<td id="emotions" colspan="2">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td colspan="2">
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input type="text" class="normalInput" id="commentValidate"/>
</td>
<td>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span style="line-height: 22px;" class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
if ($("#comments div").length === 0) {
$("#comments").removeClass("comments");
}
page.load();
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -60,6 +61,6 @@
<div class="footer-icon"><#include "statistic.ftl"></div> <div class="footer-icon"><#include "statistic.ftl"></div>
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -146,7 +147,7 @@
</div> </div>
</div> </div>
</div> </div>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -41,7 +41,7 @@
</div> </div>
<div class="right"> <div class="right">
<#if article.commentable> <#if article.commentable>
<a rel="nofollow" class="no-underline" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> <a rel="nofollow" class="no-underline" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</#if> </#if>
</div> </div>
<div class="clear"></div> <div class="clear"></div>

File diff suppressed because one or more lines are too long

View File

@ -24,111 +24,8 @@
</#list> </#list>
</div> </div>
<#if article.commentable> <#if article.commentable>
<table id="commentForm" class="comment-form"> <div class="comment-form">
<tbody> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<td width="208px">
<input type="text" class="normalInput" id="commentName"/>
</td>
<td width="400px">
${commentNameLabel}
</td>
</tr>
<tr>
<td>
<input type="text" class="normalInput" id="commentEmail"/>
</td>
<td>
${commentEmailLabel}
</td>
</tr>
<tr>
<td>
<input type="text" id="commentURL"/>
</td>
<td>
${commentURLLabel}
</td>
</tr>
</#if>
<tr>
<td id="emotions" colspan="2">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td colspan="2">
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input type="text" class="normalInput" id="commentValidate"/>
</td>
<td>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='marginTop12 comment-form' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
// emotions
page.replaceCommentsEm("#comments .comment-content");
if ($("#comments div").length === 0) {
$("#comments").removeClass("comments");
}
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -52,7 +53,7 @@
</div> </div>
</div> </div>
</div> </div>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</div> </div>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<#include "macro-side.ftl"> <#include "macro-side.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -110,7 +111,7 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
MetroHot.tips = { MetroHot.tips = {
externalRelevantArticlesDisplayCount: "${externalRelevantArticlesDisplayCount}", externalRelevantArticlesDisplayCount: "${externalRelevantArticlesDisplayCount}",
blogHost: "${blogHost}" blogHost: "${blogHost}"

View File

@ -36,7 +36,7 @@
</#if> </#if>
<#if article.commentable> <#if article.commentable>
<a data-ico="&#x0056;" rel="nofollow" href="javascript:replyTo('${comment.oId}');" title="${replyLabel}"></a> <a data-ico="&#x0056;" rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');" title="${replyLabel}"></a>
</#if> </#if>
<div class="fn-right" data-ico="&#xe200;"> <div class="fn-right" data-ico="&#xe200;">

View File

@ -1,18 +1 @@
/**
* 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 <https://www.gnu.org/licenses/>.
*/
@media (max-width:860px) and (min-width:460px){.wrapper{width:720px}.main{width:460px}.form{width:auto}.form input{width:395px}.form textarea{width:434px}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{margin-right:4px}#comments .article-body{width:340px}#dynamic #comments .article-body{width:283px}.most-comment,.most-view{width:300px;margin-bottom:20px;margin-top:40px}.most-comment .text,.most-view .text{width:195px}.archives-tile,.links-tile,.tags-tile{width:670px}.archives-tile .text,.links-tile .text,.tags-tile .text{width:580px}.links-tile,.tags-tile{margin-left:0}}@media (max-width:460px){#comments>div,.archives,.comment-disabled,.main .pagination,.main>.article-body{margin-right:0}.comment-main,.header>.fn-left,.side,.top-info{float:none}.article-list>div,.main,.side,.wrapper{width:300px}#comments>div>img,#emotions,.footer,.sub-nav>.pagination{display:none}#search{width:237px}.side-tile{width:94px}.article-relative,.notice-board,.online-count,.share,.user{width:249px}#comments .article-body,.side>div{position:static!important;width:auto!important}.share div.text{left:173px}.form{width:auto}.form input{width:240px}.form textarea{width:285px;height:150px}#dynamic .main{margin-bottom:20px}.tags-tile{margin-bottom:50px}.article-title{width:280px}.article-info>a{padding:3px;font-size:12px}#dynamic #comments{padding-left:15px}.links-tile .title,.most-comment .title,.most-view .title,.tags-tile .title{float:right;font-size:15px;font-weight:700;margin:20px 0 0 40px}.most-comment,.most-view{width:249px;margin-left:0}.most-comment .text,.most-view .text{margin-right:0;width:274px;font-size:12px;font-weight:400}.links-tile,.tags-tile{width:249px;margin-left:0}.links-tile .text,.tags-tile .text{width:249px}} @media (max-width:860px) and (min-width:460px){.wrapper{width:720px}.main{width:460px}.form{width:auto}.form input{width:395px}.form textarea{width:434px}.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14{margin-right:4px}#comments .article-body{width:340px}#dynamic #comments .article-body{width:283px}.most-comment,.most-view{width:300px;margin-bottom:20px;margin-top:40px}.most-comment .text,.most-view .text{width:195px}.archives-tile,.links-tile,.tags-tile{width:670px}.archives-tile .text,.links-tile .text,.tags-tile .text{width:580px}.links-tile,.tags-tile{margin-left:0}}@media (max-width:460px){#comments>div,.archives,.comment-disabled,.main .pagination,.main>.article-body{margin-right:0}.comment-main,.header>.fn-left,.side,.top-info{float:none}.article-list>div,.main,.side,.wrapper{width:300px}#comments>div>img,#emotions,.footer,.sub-nav>.pagination{display:none}#search{width:237px}.side-tile{width:94px}.article-relative,.notice-board,.online-count,.share,.user{width:249px}#comments .article-body,.side>div{position:static!important;width:auto!important}.share div.text{left:173px}.form{width:auto}.form input{width:240px}.form textarea{width:285px;height:150px}#dynamic .main{margin-bottom:20px}.tags-tile{margin-bottom:50px}.article-title{width:280px}.article-info>a{padding:3px;font-size:12px}#dynamic #comments{padding-left:15px}.links-tile .title,.most-comment .title,.most-view .title,.tags-tile .title{float:right;font-size:15px;font-weight:700;margin:20px 0 0 40px}.most-comment,.most-view{width:249px;margin-left:0}.most-comment .text,.most-view .text{margin-right:0;width:274px;font-size:12px;font-weight:400}.links-tile,.tags-tile{width:249px;margin-left:0}.links-tile .text,.tags-tile .text{width:249px}}

View File

@ -360,70 +360,6 @@ textarea {
word-wrap: normal; word-wrap: normal;
} }
.em00, .em01, .em02, .em03, .em04, .em05, .em06, .em07, .em08, .em09,
.em10, .em11, .em12, .em13, .em14 {
cursor: pointer;
background-image: url("../../../images/emotions/emotions.png");
background-size: 120px;
float: left;
height: 24px;
margin-right: 8px;
width: 24px;
transition: all .2s ease-out;
-webkit-transition: all .2s ease-out;
-moz-transition: all .2s ease-out;
}
#emotions span:hover {
transform: scale(1.2) rotate(360deg);
-webkit-transform: scale(1.2) rotate(360deg);
-moz-transform: scale(1.2) rotate(360deg);
}
.em01 {
background-position: -24px 0;
}
.em02 {
background-position: -48px 0;
}
.em03 {
background-position: -72px 0;
}
.em04 {
background-position: -96px 1px;
}
.em05 {
background-position: 0 -24px;
}
.em06 {
background-position: -24px -24px;
}
.em07 {
background-position: -48px -24px;
}
.em08 {
background-position: -72px -24px;
}
.em09 {
background-position: -96px -24px;
}
.em10 {
background-position: 0 -48px;
}
.em11 {
background-position: -24px -48px ;
}
.em12 {
background-position: -48px -48px;
}
.em13 {
background-position: -72px -48px;
}
.em14 {
background-position: -96px -48px;
}
.footer a:hover, .footer a:hover,
.article-relative a:hover, .article-relative a:hover,
.article-abstract .article-title a:hover, .article-abstract .article-title a:hover,

File diff suppressed because one or more lines are too long

View File

@ -1,18 +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 t="";$("#admin a").each(function(){-1<$(this).attr("href").indexOf("/logout")&&(t=$(this).attr("href"))}),$("#logout, .logout").attr("href",t),$(".header .title, .navigation").mouseover(function(){$(".navigation").show()}).mouseout(function(){$(".navigation").hide()}),$(".header .title").click(function(){window.location.href=latkeConfig.servePath});var e=$("#top > span").first().text();$(".online-count .text").append(e.substr(1,e.length));var i=$("#admin").data("login");if(i?($(".user .text").html($("#admin > span").text()),$(".login, .register, #login, #register, .logout, .settings").hide()):$(".login, .register, .user, .clear, .logout, .settings, #logout, #settings").hide(),1===$("#dynamic").length)return $(window).scroll(function(){$(window).scrollTop()>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide()}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}),void $("body").css("min-height","inherit");$("#login, .login").attr("href",$("#admin > a").first().attr("href")),$(window).scroll(function(){var t=$(window).scrollTop();t>MetroHot.headerH?i?$(".logout, .settings").show():$(".login, .register").show():i?$(".logout, .settings").hide():$(".login, .register").hide(),t>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide(),$(".side > div").height()<620?t>MetroHot.headerH?$(".side > div").css({position:"fixed",top:"0px",width:"240px"}):$(".side > div").css("position","static"):t+Util.getWinHeight()>$(".side > div").height()+MetroHot.headerH?$(".side > div").css({position:"fixed",top:"auto",bottom:"10px",width:"240px"}):$(".side > div").css("position","static")}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}).resize(function(){var t=window.innerWidth,e="large";460<t&&t<=860?e="mid":window<460&&(e="small"),MetroHot.responsiveType!==e&&($(window).scroll(),MetroHot.responsiveType)}),$(window).scroll()},initArticleList:function(){$(".article-list .article-abstract").each(function(){var t=$(this),e=t.find("img");0<e.length&&(t.addClass("article-image"),e.hide(),t.before("<img onload='MetroHot.loadImg(this);' src='"+$(e[0]).attr("src")+"'/>"))})},loadImg:function(t){t.style.marginTop=(220-t.height)/2+"px"},share:function(){var t=encodeURIComponent($("title").text()),e=window.location.href,i=$(".article-body img").attr("src"),o={};o.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+t+"&url="+e+"&pic="+i,o.sina="http://v.t.sina.com.cn/share/share.php?title="+t+"&url="+e+"&pic="+i,o.google="https://plus.google.com/share?url="+e,o.twitter="https://twitter.com/intent/tweet?status="+t+" "+e,$(".share span").click(function(){var t=$(this).attr("title").toLowerCase();window.open(o[t],"_blank","top=100,left=200,width=648,height=618")})},loadRandomArticles:function(){$.ajax({url:latkeConfig.servePath+"/articles/random",type:"POST",success:function(t,e){var i=t.randomArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' href='"+latkeConfig.servePath+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#randomArticles .text").append(n)}else $("#randomArticles").remove()}})},loadRelevantArticles:function(t){$.ajax({url:latkeConfig.servePath+"/article/id/"+t+"/relevant/articles",type:"GET",success:function(t,e){var i=t.relevantArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' href='"+latkeConfig.servePath+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#relevantArticles .text").append(n)}else $("#relevantArticles").remove()},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(t){var e=this.tips;try{$.ajax({url:"http://rhythm.b3log.org:80/get-articles-by-tags.do?tags="+t+"&blogHost="+e.blogHost+"&paginationPageSize="+e.externalRelevantArticlesDisplayCount,type:"GET",cache:!0,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(t,e){var i=t.articles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' target='_blank' href='"+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#externalRelevantArticles .text").append(n)}else $("#externalRelevantArticles").remove()}})}catch(t){$("#externalRelevantArticles").remove()}},goCmt:function(){$("html, body").animate({scrollTop:$(".comment-disabled").get(0).offsetTop})}};MetroHot.init(),Util.killIE(),0<$(".article-header").length?MetroHot.share():MetroHot.initArticleList();
* 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 <https://www.gnu.org/licenses/>.
*/
var MetroHot={headerH:$("#header").height()+30+($("#header > div").get(1)?30:0),responsiveType:"large",goTranslate:function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)},init:function(){var t="";$("#admin a").each(function(){-1<$(this).attr("href").indexOf("/logout?goto=")&&(t=$(this).attr("href"))}),$("#logout, .logout").attr("href",t),$(".header .title, .navigation").mouseover(function(){$(".navigation").show()}).mouseout(function(){$(".navigation").hide()}),$(".header .title").click(function(){window.location.href=latkeConfig.servePath});var e=$("#top > span").first().text();$(".online-count .text").append(e.substr(1,e.length));var i=$("#admin").data("login");if(i?($(".user .text").html($("#admin > span").text()),$(".login, .register, #login, #register, .logout, .settings").hide()):$(".login, .register, .user, .clear, .logout, .settings, #logout, #settings").hide(),1===$("#dynamic").length)return $(window).scroll(function(){$(window).scrollTop()>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide()}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}),void $("body").css("min-height","inherit");$("#login, .login").attr("href",$("#admin > a").first().attr("href")),$(window).scroll(function(){var t=$(window).scrollTop();t>MetroHot.headerH?i?$(".logout, .settings").show():$(".login, .register").show():i?$(".logout, .settings").hide():$(".login, .register").hide(),t>MetroHot.headerH?$("#goTop").fadeIn("slow"):$("#goTop").hide(),$(".side > div").height()<620?t>MetroHot.headerH?$(".side > div").css({position:"fixed",top:"0px",width:"240px"}):$(".side > div").css("position","static"):t+Util.getWinHeight()>$(".side > div").height()+MetroHot.headerH?$(".side > div").css({position:"fixed",top:"auto",bottom:"10px",width:"240px"}):$(".side > div").css("position","static")}).click(function(t){"title"!==t.target.className&&"title"!==t.target.parentElement.className&&$(".navigation").slideUp()}).resize(function(){var t=window.innerWidth,e="large";460<t&&t<=860?e="mid":window<460&&(e="small"),MetroHot.responsiveType!==e&&($(window).scroll(),MetroHot.responsiveType)}),$(window).scroll()},initArticleList:function(){$(".article-list .article-abstract").each(function(){var t=$(this),e=t.find("img");0<e.length&&(t.addClass("article-image"),e.hide(),t.before("<img onload='MetroHot.loadImg(this);' src='"+$(e[0]).attr("src")+"'/>"))})},loadImg:function(t){t.style.marginTop=(220-t.height)/2+"px"},share:function(){var t=encodeURIComponent($("title").text()),e=window.location.href,i=$(".article-body img").attr("src"),o={};o.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+t+"&url="+e+"&pic="+i,o.sina="http://v.t.sina.com.cn/share/share.php?title="+t+"&url="+e+"&pic="+i,o.google="https://plus.google.com/share?url="+e,o.twitter="https://twitter.com/intent/tweet?status="+t+" "+e,$(".share span").click(function(){var t=$(this).attr("title").toLowerCase();window.open(o[t],"_blank","top=100,left=200,width=648,height=618")})},loadRandomArticles:function(){$.ajax({url:latkeConfig.servePath+"/articles/random",type:"POST",success:function(t,e){var i=t.randomArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' href='"+latkeConfig.servePath+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#randomArticles .text").append(n)}else $("#randomArticles").remove()}})},loadRelevantArticles:function(t){$.ajax({url:latkeConfig.servePath+"/article/id/"+t+"/relevant/articles",type:"GET",success:function(t,e){var i=t.relevantArticles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' href='"+latkeConfig.servePath+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#relevantArticles .text").append(n)}else $("#relevantArticles").remove()},error:function(){$("#relevantArticles").remove()}})},loadExternalRelevantArticles:function(t){var e=this.tips;try{$.ajax({url:"http://rhythm.b3log.org:80/get-articles-by-tags.do?tags="+t+"&blogHost="+e.blogHost+"&paginationPageSize="+e.externalRelevantArticlesDisplayCount,type:"GET",cache:!0,dataType:"jsonp",error:function(){$("#externalRelevantArticles").remove()},success:function(t,e){var i=t.articles;if(i&&0!==i.length){for(var o="",a=0;a<i.length&&a<5;a++){var r=i[a],l=r.articleTitle;o+="<li><a rel='nofollow' title='"+l+"' target='_blank' href='"+r.articlePermalink+"'>"+l+"</a></li>"}var n="<ul>"+o+"</ul>";$("#externalRelevantArticles .text").append(n)}else $("#externalRelevantArticles").remove()}})}catch(t){$("#externalRelevantArticles").remove()}},goCmt:function(){$("html, body").animate({scrollTop:$(".comment-disabled").get(0).offsetTop})}};MetroHot.init(),Util.killIE(),0<$(".article-header").length?MetroHot.share():MetroHot.initArticleList();

View File

@ -22,72 +22,7 @@
<div class="comment-disabled"> <div class="comment-disabled">
<h3>${postCommentsLabel}</h3> <h3>${postCommentsLabel}</h3>
</div> </div>
<textarea rows="3" style="margin-bottom: 20px;width: 80%" placeholder="${postCommentsLabel}" id="comment"></textarea>
<table id="commentForm" class="form">
<tbody>
<#if !isLoggedIn>
<tr>
<td colspan="2">
<input type="text" id="commentName"/>
<label for="commentName">${commentNameLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="commentEmail"/>
<label for="commentEmail">${commentEmailLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="commentURL"/>
<label for="commentURL">${commentURLLabel}</label>
</td>
</tr>
</#if>
<tr>
<td id="emotions" colspan="2">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
<label>${commentEmotionsLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td colspan="2">
<input type="text" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td>
<span id="commentErrorTip" class="tip"></span>
</td>
<td align="right">
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
<#else> <#else>
<div class="comment-disabled"> <div class="comment-disabled">
<h3>${notAllowCommentLabel}</h3> <h3>${notAllowCommentLabel}</h3>
@ -112,38 +47,3 @@
<span id="goTop" onclick="Util.goTop();" data-ico="&#xe042;" class="side-tile"></span> <span id="goTop" onclick="Util.goTop();" data-ico="&#xe042;" class="side-tile"></span>
<span id="goCmt" onclick="MetroHot.goCmt();" data-ico="&#x005b;" class="side-tile"></span> <span id="goCmt" onclick="MetroHot.goCmt();" data-ico="&#x005b;" class="side-tile"></span>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"captchaErrorLabel": "${captchaErrorLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticlesLabel}",
"externalRelevantArticles1Label": "${externalRelevantArticlesLabel}"
});
var replyTo = function(id) {
var commentFormHTML = "<table class='form' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
$("#replyForm label").each(function() {
$this = $(this);
$this.attr("for", $this.attr("for") + "Reply");
});
};
$(document).ready(function() {
page.load();
// emotions
page.replaceCommentsEm("#comments .article-body");
<#nested>
});
</script>
</#macro>

View File

@ -20,6 +20,7 @@
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-side.ftl"> <#include "macro-side.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -56,6 +57,6 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -107,7 +108,7 @@
<@comments commentList=articleComments article=article></@comments> <@comments commentList=articleComments article=article></@comments>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

View File

@ -36,7 +36,7 @@
<div class="comdater"> <div class="comdater">
<!--<span>TODO wptouch_moderate_comment_link(get_comment_ID())</span>--> <!--<span>TODO wptouch_moderate_comment_link(get_comment_ID())</span>-->
${comment.commentDate2?string("yyyy-MM-dd HH:mm:ss")} ${comment.commentDate2?string("yyyy-MM-dd HH:mm:ss")}
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a> <a rel="nofollow" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}');">${replyLabel}</a>
</div> </div>
</#if> </#if>
</div><!--end comtop--> </div><!--end comtop-->

17
mobile/js/l10n.min.js vendored
View File

@ -1,18 +1 @@
/*
* 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 <https://www.gnu.org/licenses/>.
*/
function convertEntities(t){var e,n;if(e=function(t){if(/&[^;]+;/.test(t)){var e=document.createElement("div");return e.innerHTML=t,e.firstChild?e.firstChild.nodeValue:t}return t},"string"==typeof t)return e(t);if("object"==typeof t)for(n in t)"string"==typeof t[n]&&(t[n]=e(t[n]));return t} function convertEntities(t){var e,n;if(e=function(t){if(/&[^;]+;/.test(t)){var e=document.createElement("div");return e.innerHTML=t,e.firstChild?e.firstChild.nodeValue:t}return t},"string"==typeof t)return e(t);if("object"==typeof t)for(n in t)"string"==typeof t[n]&&(t[n]=e(t[n]));return t}

View File

@ -32,148 +32,14 @@
</#list> </#list>
</ol> </ol>
<#if article.commentable> <#if article.commentable>
<div id="textinputwrap"> <div id="textinputwrap" style="margin-left: 10px">
<div id="refresher" style="display:none;"> <div id="refresher" style="display:none;">
<img src="${staticServePath}/skins/${skinDirName}/images/good.png" alt="checkmark" /> <img src="${staticServePath}/skins/${skinDirName}/images/good.png" alt="checkmark" />
<h3>${commentSuccess}</h3> <h3>${commentSuccess}</h3>
<a href="javascript:this.location.reload();">${refresh2CComment}</a> <a href="javascript:this.location.reload();">${refresh2CComment}</a>
</div> </div>
<div id="commentForm"> <textarea id="comment" rows="3" placeholder="${postCommentsLabel}" tabindex="4"></textarea>
<h3 id="respond">${postCommentsLabel}</h3>
<#if !isLoggedIn>
<p>
<input type="text" id="commentName" size="22" tabindex="1"/>
<label for="author">${commentNameLabel} *</label>
</p>
<p>
<input type="text" id="commentEmail" size="22" tabindex="2" />
<label for="email">${commentEmailLabel} *</label>
</p>
<p>
<input type="text" id="commentURL" size="22" tabindex="3" />
<label for="url">${commentURLLabel}</label>
</p>
</#if>
<p>
<span id="commentErrorTip" style="display:none;"></span>
</p>
<p><textarea id="comment" tabindex="4"></textarea></p>
<#if !isLoggedIn>
<p>
<input type="text" id="commentValidate" tabindex="5" />
<label for="url">${captchaLabel}</label>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</p>
</#if>
<p>
<input class="reply-button" id="submitCommentButton" type="submit" onclick="page.submitComment();" value="${submmitCommentLabel}" tabindex="6" />
<div id="loading" style="display:none">
<img src="${staticServePath}/skins/${skinDirName}/themes/core/core-images/comment-ajax-loader.gif" alt="" /> <p>${publishing}</p>
</div>
</p>
</div>
</div> </div>
</#if><!--textinputwrap div--> </#if><!--textinputwrap div-->
</div> </div>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
Page.prototype.submitComment = function(commentId, state) {
if (!state) {
state = '';
}
var tips = this.tips,
type = "article";
if (tips.externalRelevantArticlesDisplayCount === undefined) {
type = "page";
}
if (this.validateComment(state)) {
$("#submitCommentButton" + state).attr("disabled", "disabled");
$("#commentErrorTip" + state).show().html(this.tips.loadingLabel);
var requestJSONObject = {
"oId": tips.oId,
"commentContent": $("#comment" + state).val().replace(/(^\s*)|(\s*$)/g, "")
};
if (!$("#admin").data("login")) {
requestJSONObject = {
"oId": tips.oId,
"commentContent": $("#comment" + state).val().replace(/(^\s*)|(\s*$)/g, ""),
"commentEmail": $("#commentEmail" + state).val(),
"commentURL": Util.proessURL($("#commentURL" + state).val().replace(/(^\s*)|(\s*$)/g, "")),
"commentName": $("#commentName" + state).val().replace(/(^\s*)|(\s*$)/g, ""),
"captcha": $("#commentValidate" + state).val()
};
Cookie.createCookie("commentName", requestJSONObject.commentName, 365);
Cookie.createCookie("commentEmail", requestJSONObject.commentEmail, 365);
Cookie.createCookie("commentURL", $("#commentURL" + state).val().replace(/(^\s*)|(\s*$)/g, ""), 365);
}
if (state === "Reply") {
requestJSONObject.commentOriginalCommentId = commentId;
}
$.ajax({
type: "POST",
url: latkeConfig.servePath + "/" + type + "/comments",
cache: false,
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
success: function(result) {
$("#submitCommentButton" + state).removeAttr("disabled");
if (!result.sc) {
$("#commentValidate" + state).val("").focus();
$("#commentErrorTip" + state).html(result.msg);
$("#captcha" + state).attr("src", "/captcha?code=" + Math.random());
$wpt('#commentErrorTip' + state).show();
$wpt("#loading").fadeOut(400);
return;
}
$wpt("#commentForm").hide();
$wpt("#loading").fadeOut(400);
$wpt("#refresher").fadeIn(400);
$("#comment" + state).val("");
$("#commentValidate" + state).val("");
$("#replyForm").remove();
}, // end success
error: function() {
} //end error
});
}
};
var replyTo = function(id) {
var commentFormHTML = "<div id='replyForm'>";
page.addReplyForm(id, commentFormHTML, "</div>");
};
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
(function() {
page.load();
// emotions
page.replaceCommentsEm("#commentlist .combody");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -36,6 +37,6 @@
<@comments commentList=pageComments article=page></@comments> <@comments commentList=pageComments article=page></@comments>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -126,7 +127,7 @@
</div> </div>
</main> </main>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != externalRelevantArticlesDisplayCount> <#if 0 != externalRelevantArticlesDisplayCount>
page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>"); page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>");

View File

@ -37,7 +37,7 @@
<time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time> <time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time>
</span> </span>
<#if article.commentable> <#if article.commentable>
<a class="fn-right" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a> <a class="fn-right" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}')">${replyLabel}</a>
</#if> </#if>
</div> </div>
<div class="comment-content post-body article-body"> <div class="comment-content post-body article-body">

View File

@ -174,83 +174,6 @@ img {
} }
/* end common */ /* end common */
/* start emotions */
.em00, .em01, .em02, .em03, .em04, .em05, .em06, .em07, .em08, .em09,
.em10, .em11, .em12, .em13, .em14 {
cursor: pointer;
background-image: url("../../../images/emotions/emotions.png");
background-size: 120px;
float: left;
height: 24px;
margin-right: 5px;
width: 24px;
transition: all .2s ease-out;
-webkit-transition: all .2s ease-out;
-moz-transition: all .2s ease-out;
}
#emotions span:hover {
transform: scale(1.2) rotate(360deg);
-webkit-transform: scale(1.2) rotate(360deg);
-moz-transform: scale(1.2) rotate(360deg);
}
.em01 {
background-position: -24px 0;
}
.em02 {
background-position: -48px 0;
}
.em03 {
background-position: -72px 0;
}
.em04 {
background-position: -96px 0;
}
.em05 {
background-position: 0px -24px;
}
.em06 {
background-position: -24px -24px;
}
.em07 {
background-position: -48px -24px;
}
.em08 {
background-position: -72px -24px;
}
.em09 {
background-position: -96px -24px;
}
.em10 {
background-position: 0 -48px;
}
.em11 {
background-position: -24px -48px ;
}
.em12 {
background-position: -48px -48px;
}
.em13 {
background-position: -72px -48px;
}
.em14 {
background-position: -96px -48px;
}
/* end emotions */
/* start framework */ /* start framework */
.wrapper { .wrapper {
max-width: 700px; max-width: 700px;
@ -1000,13 +923,6 @@ ul.comments .comment-meta time {
margin-left: 8px; margin-left: 8px;
padding-left: 12px; padding-left: 12px;
} }
#captcha,
#captchaReply {
height: 27px;
vertical-align: inherit;
}
/* end comments */ /* end comments */
/* start tags */ /* start tags */

19
next/css/next.min.css vendored

File diff suppressed because one or more lines are too long

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

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

View File

@ -24,96 +24,8 @@
</#list> </#list>
</ul> </ul>
<#if article.commentable> <#if article.commentable>
<div class="comment-body fn-wrap"> <div class="form">
<table id="commentForm" class="form"> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" class="normalInput" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" class="normalInput" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text" class="normalInput" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
NexT.initArticle();
// emotions
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -41,6 +42,6 @@
</div> </div>
</main> </main>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -179,7 +180,7 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<#if pjax><!---- pjax {#pjax} start ----></#if> <#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles('<header class="module__header">${randomArticlesLabel}</header>'); page.loadRandomArticles('<header class="module__header">${randomArticlesLabel}</header>');

View File

@ -40,7 +40,7 @@
${comment.commentContent} ${comment.commentContent}
</div> </div>
<#if article?? && article.commentable> <#if article?? && article.commentable>
<a class="fn__right breadcrumb" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a> <a class="fn__right breadcrumb" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}')">${replyLabel}</a>
<#else> <#else>
<a class="fn__right breadcrumb" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a> <a class="fn__right breadcrumb" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</#if> </#if>

View File

@ -1,20 +1,3 @@
/**
* 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 <https://www.gnu.org/licenses/>.
*/
@charset "UTF-8"; @charset "UTF-8";
/** /**
* Solo - A small and beautiful blogging system written in Java. * Solo - A small and beautiful blogging system written in Java.

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -34,99 +34,10 @@
${postCommentsLabel} ${postCommentsLabel}
</div> </div>
<div class="comments__content"> <div class="comments__content">
<table id="commentForm" class="form"> <div class="form">
<tbody> <textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
<#if !isLoggedIn> </div>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions" class="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="5" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text"
id="commentValidate"/>
<img class="comments__captcha" id="captcha" alt="validate" src="${servePath}/captcha"/>
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="ft__red" id="commentErrorTip"></span>
<span class="breadcrumb fn__pointer fn__none" id="cancelCommentButton" onclick="$('#replyForm').remove();page.currentCommentId = ''">${cancelLabel}</span>
<button class="btn tag" id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</#if> </#if>
</#macro> </#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
'nameTooLongLabel': "${nameTooLongLabel}",
'mailCannotEmptyLabel': "${mailCannotEmptyLabel}",
'mailInvalidLabel': "${mailInvalidLabel}",
'commentContentCannotEmptyLabel': "${commentContentCannotEmptyLabel}",
'captchaCannotEmptyLabel': "${captchaCannotEmptyLabel}",
'loadingLabel': "${loadingLabel}",
'oId': "${oId}",
'skinDirName': "${skinDirName}",
'blogHost': "${blogHost}",
'randomArticles1Label': "${randomArticles1Label}",
'externalRelevantArticles1Label': "${externalRelevantArticles1Label}",
})
var replyTo = function (id) {
var commentFormHTML = '<table class=\'form comments__reply comments__content\' id=\'replyForm\'>'
page.addReplyForm(id, commentFormHTML)
};
(function () {
page.load()
Skin.initArticle()
// emotions
page.replaceCommentsEm('#comments .content-reset')
<#nested>
})()
</script>
</#macro>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -48,7 +49,7 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<#if pjax><!---- pjax {#pjax} start ----></#if> <#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId commentable=page.commentable></@comment_script>
<#if pjax><!---- pjax {#pjax} end ----></#if> <#if pjax><!---- pjax {#pjax} end ----></#if>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@
--> -->
<#include "macro-head.ftl"> <#include "macro-head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -125,7 +126,7 @@
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
</div> </div>
<@comment_script oId=article.oId> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount> <#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles(); page.loadRandomArticles();

Some files were not shown because too many files have changed in this diff Show More