mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 00:49:40 +08:00
32 lines
1.6 KiB
HTML
32 lines
1.6 KiB
HTML
<div xmlns:th="https://www.thymeleaf.org"
|
|
th:fragment="widget (hide)"
|
|
th:class="'card widget recent-comments ' + ${hide}">
|
|
<div class="card-title">
|
|
<i class="fa fa-commenting-o card-title-label"></i><span>最新评论</span>
|
|
</div>
|
|
<@commentTag method="latest" top="${settings.recent_comments_num!5}">
|
|
<#if comments.content?size gt 0>
|
|
<div class="card-content">
|
|
<ul class="widget-comment">
|
|
<#list comments.content as comment>
|
|
<li class="item">
|
|
<div class="user">
|
|
<img width="35" height="35" class="avatar" src="${(settings.priority_qq_avatar!false)?then(comment.avatar?replace('^.*(\\w{32}\\?)', 'https://cravatar.cn/avatar/$1', 'r'),comment.avatar!)}"
|
|
alt="${comment.author!}">
|
|
<div class="info">
|
|
<div class="author">${comment.author!}</div>
|
|
<span class="date">${comment.createTime?string("yyyy-MM-dd")}</span>
|
|
</div>
|
|
</div>
|
|
<div class="reply">
|
|
<a class="link" href="${comment.post.fullPath!}#comment-wrapper">${comment.content!}</a>
|
|
</div>
|
|
</li>
|
|
</#list>
|
|
</ul>
|
|
</div>
|
|
<#else>
|
|
<div class="card-empty">暂无评论</div>
|
|
</#if>
|
|
</@commentTag>
|
|
</div> |