mirror of https://github.com/halo-dev/halo
Refactor comment module
parent
9b7227dc80
commit
078b6ab9c7
|
@ -32,23 +32,23 @@ ${options.native_css!}
|
|||
<#macro childComments comments>
|
||||
<ul class="comment-list" style="margin-left: 30px; border-left: 1px solid #f1f1f1">
|
||||
<#if comments?? && comments?size gt 0>
|
||||
<#list comments?sort_by("commentDate") as comment>
|
||||
<li class="comment-list-one" id="comment-id-${comment.commentId?c}" style="margin-left: 5px;">
|
||||
<img class="comment-list-one-img" src="//gravatar.loli.net/avatar/${comment.commentAuthorAvatarMd5!}?s=256&d=${options.native_comment_avatar!'mm'}">
|
||||
<#list comments?sort_by("createTime") as comment>
|
||||
<li class="comment-list-one" id="comment-id-${comment.id?c}" style="margin-left: 5px;">
|
||||
<img class="comment-list-one-img" src="//gravatar.loli.net/avatar/${comment.gavatarMd5!}?s=256&d=${options.native_comment_avatar!'mm'}">
|
||||
<section>
|
||||
<div class="comment-list-one-head">
|
||||
<a class="comment-list-one-head-name" rel="nofollow" href="${comment.commentAuthorUrl!}">${comment.commentAuthor!}</a>
|
||||
<span class="comment-ua-info" style="display: none">${comment.commentAgent!}</span>
|
||||
<a class="comment-list-one-head-name" rel="nofollow" href="${comment.authorUrl!}">${comment.author!}</a>
|
||||
<span class="comment-ua-info" style="display: none">${comment.userAgent!}</span>
|
||||
<#if comment.isAdmin==1>
|
||||
<span class="comment-list-one-head-admin">博主</span>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="comment-list-one-content">
|
||||
<p>${comment.commentContent!}</p>
|
||||
<p>${comment.content!}</p>
|
||||
</div>
|
||||
<div class="comment-list-one-footer">
|
||||
<span class="comment-list-one-footer-time">${comment.commentDate?string("yyyy-MM-dd HH:mm")}</span>
|
||||
<span at="${comment.commentId?c}" class="comment-list-one-footer-reback">回复</span>
|
||||
<span class="comment-list-one-footer-time">${comment.createTime?string("yyyy-MM-dd HH:mm")}</span>
|
||||
<span at="${comment.id?c}" class="comment-list-one-footer-reback">回复</span>
|
||||
</div>
|
||||
</section>
|
||||
<#if comment.childComments?? && comment.childComments?size gt 0>
|
||||
|
@ -61,23 +61,23 @@ ${options.native_css!}
|
|||
</#macro>
|
||||
<ul class="comment-list" id="comments-list">
|
||||
<#if comments?? && comments.getPageList()?size gt 0>
|
||||
<#list comments.getPageList()?sort_by("commentDate")?reverse as comment>
|
||||
<li class="comment-list-one" id="comment-id-${comment.commentId?c}">
|
||||
<img class="comment-list-one-img" src="//gravatar.loli.net/avatar/${comment.commentAuthorAvatarMd5!}?s=256&d=${options.native_comment_avatar!'mm'}">
|
||||
<#list comments.getPageList()?sort_by("createTime")?reverse as comment>
|
||||
<li class="comment-list-one" id="comment-id-${comment.id?c}">
|
||||
<img class="comment-list-one-img" src="//gravatar.loli.net/avatar/${comment.gavatarMd5!}?s=256&d=${options.native_comment_avatar!'mm'}">
|
||||
<section>
|
||||
<div class="comment-list-one-head">
|
||||
<a class="comment-list-one-head-name" rel="nofollow" href="${comment.commentAuthorUrl!}">${comment.commentAuthor!}</a>
|
||||
<span class="comment-ua-info" style="display: none">${comment.commentAgent!}</span>
|
||||
<a class="comment-list-one-head-name" rel="nofollow" href="${comment.authorUrl!}">${comment.author!}</a>
|
||||
<span class="comment-ua-info" style="display: none">${comment.userAgent!}</span>
|
||||
<#if comment.isAdmin==1>
|
||||
<label class="comment-list-one-head-admin">博主</label>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="comment-list-one-content">
|
||||
<p>${comment.commentContent!}</p>
|
||||
<p>${comment.content!}</p>
|
||||
</div>
|
||||
<div class="comment-list-one-footer">
|
||||
<span class="comment-list-one-footer-time">${comment.commentDate?string("yyyy-MM-dd HH:mm")}</span>
|
||||
<span at="${comment.commentId?c}" class="comment-list-one-footer-reback">回复</span>
|
||||
<span class="comment-list-one-footer-time">${comment.createTime?string("yyyy-MM-dd HH:mm")}</span>
|
||||
<span at="${comment.id?c}" class="comment-list-one-footer-reback">回复</span>
|
||||
</div>
|
||||
</section>
|
||||
<#if comment.childComments?? && comment.childComments?size gt 0>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<title>${options.blog_title!}</title>
|
||||
<atom:link href="${options.blog_url!}/atom.xml" rel="self" type="application/rss+xml"/>
|
||||
<link>${options.blog_url!}</link>
|
||||
<description>${user.userDesc!}</description>
|
||||
<description>${user.description!}</description>
|
||||
<language>zh-CN</language>
|
||||
<sy:updatePeriod>hourly</sy:updatePeriod>
|
||||
<sy:updateFrequency>1</sy:updateFrequency>
|
||||
|
@ -19,25 +19,25 @@
|
|||
<#if posts?? && posts?size gt 0>
|
||||
<#list posts as post>
|
||||
<item>
|
||||
<title>${post.postTitle!}</title>
|
||||
<link>${options.blog_url!}/archives/${post.postUrl!}</link>
|
||||
<comments>${options.blog_url!}/archives/${post.postUrl!}#comments</comments>
|
||||
<pubDate>${post.postDate}</pubDate>
|
||||
<dc:creator><![CDATA[${user.userDisplayName!}]]></dc:creator>
|
||||
<title>${post.title!}</title>
|
||||
<link>${options.blog_url!}/archives/${post.url!}</link>
|
||||
<comments>${options.blog_url!}/archives/${post.url!}#comments</comments>
|
||||
<pubDate>${post.createTime}</pubDate>
|
||||
<dc:creator><![CDATA[${user.nickName!}]]></dc:creator>
|
||||
|
||||
<#if post.categories?? && post.categories?size gt 0>
|
||||
<#list post.categories as cate>
|
||||
<category><![CDATA[${cate.cateName!}]]></category>
|
||||
<category><![CDATA[${cate.name!}]]></category>
|
||||
</#list>
|
||||
</#if>
|
||||
<description>
|
||||
<![CDATA[
|
||||
${post.postSummary!}
|
||||
${post.summary!}
|
||||
]]>
|
||||
</description>
|
||||
<content:encoded>
|
||||
<![CDATA[
|
||||
${post.postContent!}
|
||||
${post.formatContent!}
|
||||
]]>
|
||||
</content:encoded>
|
||||
<slash:comments>${post.comments?size}</slash:comments>
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
<channel>
|
||||
<title>${options.blog_title!}</title>
|
||||
<link>${options.blog_url!}</link>
|
||||
<#if user.userDesc??>
|
||||
<description>${user.userDesc!}</description>
|
||||
<#if user.description??>
|
||||
<description>${user.description!}</description>
|
||||
</#if>
|
||||
<language>zh-CN</language>
|
||||
<#if posts?? && posts?size gt 0>
|
||||
<#list posts as post>
|
||||
<item>
|
||||
<title>${post.postTitle!}</title>
|
||||
<link>${options.blog_url}/archives/${post.postUrl!}</link>
|
||||
<title>${post.title!}</title>
|
||||
<link>${options.blog_url}/archives/${post.url!}</link>
|
||||
<content:encoded>
|
||||
<![CDATA[
|
||||
${post.postContent!}
|
||||
${post.formatContent!}
|
||||
]]>
|
||||
</content:encoded>
|
||||
<pubDate>${post.postDate}</pubDate>
|
||||
<pubDate>${post.createTime}</pubDate>
|
||||
</item>
|
||||
</#list>
|
||||
</#if>
|
||||
|
|
|
@ -147,8 +147,8 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
|
|||
<#if posts?? && posts?size gt 0>
|
||||
<#list posts as post>
|
||||
<li>
|
||||
<div class="T1 pull-left"><a href="${options.blog_url!}/archives/${post.postUrl!}" title="${post.postTitle!}">${post.postTitle!} | ${options.blog_title!}</a></div>
|
||||
<div class="T2 pull-right">${post.postDate?string('yyyy-MM-dd')}</div>
|
||||
<div class="T1 pull-left"><a href="${options.blog_url!}/archives/${post.url!}" title="${post.title!}">${post.title!} | ${options.blog_title!}</a></div>
|
||||
<div class="T2 pull-right">${post.createTime?string('yyyy-MM-dd')}</div>
|
||||
<div class="T3 pull-right">daily</div>
|
||||
<div class="T4 pull-right">0.6</div>
|
||||
</li>
|
||||
|
@ -164,8 +164,8 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
|
|||
<#if categories?? && categories?size gt 0>
|
||||
<#list categories as cate>
|
||||
<li>
|
||||
<div class="T1 pull-left"><a href="${options.blog_url}/categories/${cate.cateUrl!}" title="前端编程">${cate.cateName} | ${options.blog_title!}</a></div>
|
||||
<div class="T2 pull-right">${options.blog_start!}</div>
|
||||
<div class="T1 pull-left"><a href="${options.blog_url}/categories/${cate.url!}" title="前端编程">${cate.name} | ${options.blog_title!}</a></div>
|
||||
<div class="T2 pull-right">${cate.createTime?string('yyyy-MM-dd')}</div>
|
||||
<div class="T3 pull-right">daily</div>
|
||||
<div class="T4 pull-right">0.6</div>
|
||||
</li>
|
||||
|
@ -182,8 +182,8 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
|
|||
<#if tags?? && tags?size gt 0>
|
||||
<#list tags as tag>
|
||||
<li>
|
||||
<div class="T1 pull-left"><a href="${options.blog_url}/tags/${tag.tagUrl!}" title="前端编程">${tag.tagName} | ${options.blog_title!}</a></div>
|
||||
<div class="T2 pull-right">${options.blog_start!}</div>
|
||||
<div class="T1 pull-left"><a href="${options.blog_url}/tags/${tag.url!}" title="前端编程">${tag.name} | ${options.blog_title!}</a></div>
|
||||
<div class="T2 pull-right">${tag.createTime?string('yyyy-MM-dd')}</div>
|
||||
<div class="T3 pull-right">daily</div>
|
||||
<div class="T4 pull-right">0.6</div>
|
||||
</li>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<#if posts?? && posts?size gt 0>
|
||||
<#list posts as post>
|
||||
<url>
|
||||
<loc>${options.blog_url!}/archives/${post.postUrl!}</loc>
|
||||
<lastmod>${post.postDate?iso_local}</lastmod>
|
||||
<loc>${options.blog_url!}/archives/${post.url!}</loc>
|
||||
<lastmod>${post.createTime?iso_local}</lastmod>
|
||||
</url>
|
||||
</#list>
|
||||
</#if>
|
||||
|
|
Loading…
Reference in New Issue