Skip to content

Commit

Permalink
refactor: comment visible condition (#110)
Browse files Browse the repository at this point in the history
修改评论功能是否可用的判断方式。

see halo-dev/halo#4271

/kind improvement

```release-note
修改评论功能是否可用的判断方式。
```
  • Loading branch information
ruibaby committed Sep 18, 2023
1 parent 8bebbd8 commit 1957948
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions templates/page.html
Expand Up @@ -63,11 +63,8 @@ <h1 class="my-3 text-2xl font-medium dark:text-slate-50" th:text="${singlePage.s
class="prose prose-base mt-4 !max-w-none break-words dark:prose-invert"
th:utext="${singlePage.content.content}"
></article>
<hr class="my-10 dark:border-slate-700" />
<!-- https://github.com/halo-sigs/plugin-comment-widget -->
<div
th:if="${pluginFinder.available('PluginCommentWidget')} and ${singlePage.spec.allowComment} and ${site.comment.enable}"
>
<hr th:if="${haloCommentEnabled}" class="my-10 dark:border-slate-700" />
<div th:if="${haloCommentEnabled}">
<h2 class="mb-2 text-base font-medium text-gray-900 dark:text-slate-50">评论</h2>
<halo:comment
group="content.halo.run"
Expand Down
7 changes: 2 additions & 5 deletions templates/post.html
Expand Up @@ -130,11 +130,8 @@ <h1 class="my-3 text-2xl font-medium dark:text-slate-50" th:text="${post.spec.ti
</a>
</div>
</div>
<hr class="my-10 dark:border-slate-700" />
<!-- https://github.com/halo-sigs/plugin-comment-widget -->
<div
th:if="${pluginFinder.available('PluginCommentWidget')} and ${post.spec.allowComment} and ${site.comment.enable}"
>
<hr th:if="${haloCommentEnabled}" class="my-10 dark:border-slate-700" />
<div th:if="${haloCommentEnabled}">
<h2 class="mb-2 text-base font-medium text-gray-900 dark:text-slate-50">评论</h2>
<halo:comment
group="content.halo.run"
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Expand Up @@ -14,4 +14,4 @@ spec:
settingName: "theme-earth-setting"
configMapName: "theme-earth-configMap"
version: 1.5.0
require: ">=2.6.0"
require: ">=2.8.0"

0 comments on commit 1957948

Please sign in to comment.