mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 00:49:40 +08:00
feat(comment): 调整评论区显示逻辑
This commit is contained in:
parent
0e352afb4a
commit
da831d9c20
@ -875,7 +875,7 @@ spec:
|
||||
name: link_comment_id
|
||||
label: 友链页面-评论区ID
|
||||
placeholder: '请输入 ID'
|
||||
help: '友链页面没有 ID,需要指定一个自定义页面的 ID 用于评论,被指定的文章评论区将作为友链的评论区,放空则友链的评论标签将被显示为“未知-未知”。'
|
||||
help: '友链页面没有 ID,需要指定一个自定义页面的 ID 用于评论,被指定的文章评论区将作为友链的评论区,放空则友链界面不显示评论区。'
|
||||
- $formkit: radio
|
||||
name: enable_tags_tag_color
|
||||
label: 标签页面-开启标签颜色
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:insert="~{common/layout :: layout (title = '友链 - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
|
||||
th:with="baseEnableComment = true">
|
||||
th:with="baseEnableComment = ${!#strings.isEmpty(theme.config.page_config.link_comment_id)}">
|
||||
<th:block th:fragment="content"
|
||||
th:with="defaultAvatar = ${#strings.defaultString(theme.config.page_config.links_default_avatar, #theme.assets('/img/avatar.svg'))}">
|
||||
<div class="card">
|
||||
@ -48,7 +48,7 @@
|
||||
</div>
|
||||
<div class="card card-content" id="comment-wrapper" th:if="${enableComment}">
|
||||
<h3 class="comment-title">评论</h3>
|
||||
<div class="widget-comment" th:data-id="${theme.config.page_config.link_comment_id?:'links'}" data-target="SinglePage"></div>
|
||||
<div class="widget-comment" th:data-id="${theme.config.page_config.link_comment_id'}" data-target="SinglePage"></div>
|
||||
</div>
|
||||
</th:block>
|
||||
</th:block>
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply"
|
||||
th:with="url = ${comment.spec.subjectRef.kind == 'SinglePage'?(comment.spec.subjectRef.name == 'links'?'/links':singlePageFinder.getByName(comment.spec.subjectRef.name).status.permalink):(comment.spec.subjectRef.kind == 'Post'?postFinder.getByName(comment.spec.subjectRef.name).status.permalink:comment.spec.subjectRef.kind == 'Moment'?'/moments':'')}">
|
||||
th:with="url = ${comment.spec.subjectRef.kind == 'SinglePage'?(comment.spec.subjectRef.name == theme.config.page_config.link_comment_id?'/links':singlePageFinder.getByName(comment.spec.subjectRef.name).status.permalink):(comment.spec.subjectRef.kind == 'Post'?postFinder.getByName(comment.spec.subjectRef.name).status.permalink:comment.spec.subjectRef.kind == 'Moment'?'/moments':'')}">
|
||||
<a th:href="@{${url}}+'#comment-wrapper'" class="link">[[${comment.spec.content}]]</a>
|
||||
</div>
|
||||
</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user