Commit 9b458639 authored by Van's avatar Van

#12180 dynamic

parent 2d54f891
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<#else> <#else>
<a class="user-name" href="${comment.commentURL}" target="_blank">${comment.commentName}</a> <a class="user-name" href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if> </#if>
<#if true> comment.isReply <#if false> comment.isReply
@ @
<a class="user-name" href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}" <a class="user-name" href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 23);" onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 23);"
......
...@@ -9,40 +9,24 @@ ...@@ -9,40 +9,24 @@
</head> </head>
<body> <body>
<#include "header.ftl"> <#include "header.ftl">
<main class="main wrapper"> <div class="wrapper">
<div class="content"> <div class="main-wrap">
<#if 0 != recentComments?size> <main>
<ul class="comments" id="comments"> <#if 0 != recentComments?size>
<#list recentComments as comment> <ul class="comments" id="comments">
<li class="fn-clear"> <#list recentComments as comment>
<img class="avatar-48" title="${comment.commentName}" src="${comment.commentThumbnailURL}"> <#include 'common-comment.ftl'/>
<div class="comment-body"> </#list>
<div class="fn-clear comment-meta"> </ul>
<span class="fn-left"> </#if>
<#if "http://" == comment.commentURL> </main>
<span>${comment.commentName}</span> <#include "side.ftl">
<#else>
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
<time>${comment.commentDate?string("yyyy-MM-dd HH:mm")}</time>
</span>
<a class="fn-right" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</div>
<div class="comment-content post-body article-body">
${comment.commentContent}
</div>
</div>
</li>
</#list>
</ul>
</#if>
</div> </div>
<#include "side.ftl"> </div>
</main>
<#include "footer.ftl"> <#include "footer.ftl">
<script> <script>
var $commentContents = $(".comments .comment-content"); var $commentContents = $(".comments .content-reset");
for (var i = 0; i < $commentContents.length; i++) { for (var i = 0; i < $commentContents.length; i++) {
var str = $commentContents[i].innerHTML; var str = $commentContents[i].innerHTML;
$commentContents[i].innerHTML = Util.replaceEmString(str); $commentContents[i].innerHTML = Util.replaceEmString(str);
......
<#macro comments commentList article> <#macro comments commentList article>
<#if commentList?size gt 0> <header class='title'><h2>${commentLabel}</h2></header>
<header class='title'><h2>${commentList?size} ${commentLabel}</h2></header>
</#if>
<ul class="comments" id="comments"> <ul class="comments" id="comments">
<#list commentList as comment> <#list commentList as comment>
<#include 'common-comment.ftl'/> <#include 'common-comment.ftl'/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment