halo-theme-hao/templates/modules/widgets/aside/comments.html
UPToZ d19c1191ef 修改侧栏图标颜色
detailed:
1.增加了侧栏中的小板报、最新评论、最近发布、爱发电、广告、文章目录、分类的图标颜色。
2.增加了对侧栏的广告图片鼠标移入图片轻微放大的效果。
3.增加了爱发电API请求失败时的默认显示。
4.修改了侧栏中的标题与图标之间的间距。
5.修改了侧栏中爱发电内容区域的边距。
2024-05-11 18:09:07 +08:00

39 lines
2.6 KiB
HTML

<!-- 最新评论 -->
<div class="card-widget card-recent-post card-comment" >
<a th:if="${not #strings.isEmpty(theme.config.sidebar.newcomment.newcommentUrl)}"
th:onclick="pjax.loadUrl([[${theme.config.sidebar.newcomment.newcommentUrl}]])"
title="查看更多"
class="card-more-btn"
style="cursor:pointer" draggable="false"><i class="haofont hao-icon-chevron-right"></i></a>
<div class="item-headline"><i class="haofont hao-icon-chat--fill" style="font-size: 19px;"></i><span>最新评论</span></div>
<div class="aside-list" id="newcomm">
<th:block th:if="${#strings.equals(theme.config.comments.use, 'commentWidget') }"
th:with="newcommentnumber = ${#conversions.convert(theme.config.sidebar.newcomment.newcommentnumber, 'java.lang.Integer') >= 0 ? theme.config.sidebar.newcomment.newcommentnumber : 5}">
<div th:each="comment,iterStat : ${commentFinder.list(null, 1, newcommentnumber)}" class="aside-list-item"
th:with="page = ${comment.spec.subjectRef.kind == 'Post' ? postFinder.getByName(comment.spec.subjectRef.name) :
comment.spec.subjectRef.kind == 'SinglePage' && not #strings.contains('photos,links,moments,equipment', comment.spec.subjectRef.name) ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
url = ${page == null? '/' : page.status.permalink + '#comment-' + comment.metadata.name}">
<span th:text="${commentIndex}"></span>
<a class="thumbnail" th:href="${url}" data-pjax-state="">
<img alt="头像"
th:with=" img =${#strings.isEmpty(comment.owner.avatar)?'https://cravatar.cn/avatar/?d=mp':comment.owner.avatar}"
th:src="${isLazyload ? loadingImg : img}" th:data-lazy-src="${ isLazyload ? img : ''}">
</a>
<div class="content">
<a class="comment"
style="display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow: hidden;"
th:href="${url}" th:title="${comment.spec.content}" th:text="${comment.spec.content}"
data-pjax-state="">
</a>
<div class="name">
<span th:text="${comment.owner.displayName + ' / '}">stonewu / </span>
<time
th:datetime="${#dates.format(comment.metadata.creationTimestamp, 'yyyy-MM-dd HH:mm:ss')}"></time>
</div>
</div>
</div>
</th:block>
</div>
</div>