This commit is contained in:
Van 2019-02-10 23:15:19 +08:00
parent bb908f1974
commit 4b5e8d897d
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
5 changed files with 9 additions and 203 deletions

View File

@ -19,6 +19,7 @@
-->
<#include "macro-head.ftl">
<#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html>
<html>
<head>
@ -225,7 +226,7 @@
<script type="text/javascript"
src="${staticServePath}/skins/${skinDirName}/js/jquery.qrcode${miniPostfix}.js"></script>
<#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=article.oId>
<@comment_script oId=article.oId commentable=article.commentable>
Skin.initArticle()
Skin.initComment = function (articleOId, articleTags) {
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";

View File

@ -42,7 +42,7 @@
<#if article.commentable>
<a class="fn-right ft-green" href="javascript:replyTo('${comment.oId}')">
<a class="fn-right ft-green" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}')">
<svg><use xlink:href="#icon-reply"></use></svg> ${reply1Label}
</a>
</#if>

View File

@ -1085,91 +1085,6 @@ blockquote {
display: none;
}
.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: 10px;
margin-bottom: 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: 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
}
#commentForm,
#replyForm {
width: 100%;
}
#replyForm {
margin-top: 20px;
}
.comment__textarea {
background-color: rgb(255, 255, 255);
box-shadow: rgba(0, 0, 0, 0.04) 0px 1px 4px;
@ -1179,30 +1094,8 @@ blockquote {
margin: 0 0 5px;
width: 100%;
box-sizing: border-box;
}
.captcha {
height: 35px;
margin: -5px 0 0 7px;
border: 1px solid rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
#submitCommentButton,
#submitCommentButtonReply {
background-color: #fff;
border: 1px solid #03a87c;
color: #03a87c;
border-radius: 3px;
padding: 5px 10px;
transition: all 0.1s;
}
#submitCommentButton:hover,
#submitCommentButtonReply:hover {
background-color: #fff;
border-color: #018f69;
color: #018f69;
cursor: pointer;
resize: none;
}
.article__toolbar {

View File

@ -26,97 +26,8 @@
</#list>
</div>
<#if article.commentable>
<table id="commentForm">
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" class="comment__textarea" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" class="comment__textarea" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" class="comment__textarea" 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" placeholder="${commentContentCannotEmptyLabel}"
class="comment__textarea" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text" class="comment__textarea"
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>
<textarea rows="3" placeholder="${postCommentsLabel}"
class="comment__textarea" id="comment"></textarea>
</#if>
</div>
</#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 .content-reset");
<#nested>
})();
</script>
</#macro>

View File

@ -19,6 +19,7 @@
-->
<#include "macro-head.ftl">
<#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html>
<html>
<head>
@ -56,7 +57,7 @@
</div>
<#include "footer.ftl">
<#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>
</body>
</html>