Skip to content

Commit

Permalink
chore: cleanup inject code of comment widget (#137)
Browse files Browse the repository at this point in the history
移除评论组件代码注入的 colorScheme 参数,在最新的评论插件中,已经可以通过 css 变量来控制配色,所以此参数不再有效。

/kind cleanup

```release-note
None
```
  • Loading branch information
ruibaby committed Apr 11, 2024
1 parent 44427b8 commit 42a2546
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
9 changes: 2 additions & 7 deletions templates/moments.html
Expand Up @@ -38,7 +38,7 @@ <h1 class="mb-9 text-2xl font-medium dark:text-slate-50">瞬间</h1>
th:with="content=${moment.spec.content}"
class="animated fadeIn flex w-full items-start gap-2 py-5"
>
<img
<img
th:src="${moment.owner.avatar ?: #theme.assets('/images/default-avatar.svg')}"
th:title="${moment.owner.displayName}"
th:alt="${moment.owner.displayName}"
Expand Down Expand Up @@ -148,12 +148,7 @@ <h1 class="mb-9 text-2xl font-medium dark:text-slate-50">瞬间</h1>
</div>

<div class="mt-2" x-show="showComment">
<halo:comment
group="moment.halo.run"
kind="Moment"
th:attr="name=${moment.metadata.name}"
colorScheme="window.main.currentColorScheme"
/>
<halo:comment group="moment.halo.run" kind="Moment" th:attr="name=${moment.metadata.name}" />
</div>
</div>
</li>
Expand Down
7 changes: 1 addition & 6 deletions templates/page.html
Expand Up @@ -71,12 +71,7 @@ <h1 class="my-3 text-2xl font-medium dark:text-slate-50" th:text="${singlePage.s
<hr th:if="${haloCommentEnabled}" class="my-10 dark:border-slate-700" />
<div id="comment" 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"
kind="SinglePage"
th:attr="name=${singlePage.metadata.name}"
colorScheme="window.main.currentColorScheme"
/>
<halo:comment group="content.halo.run" kind="SinglePage" th:attr="name=${singlePage.metadata.name}" />
</div>
</div>

Expand Down
7 changes: 1 addition & 6 deletions templates/post.html
Expand Up @@ -157,12 +157,7 @@ <h1 class="my-3 text-2xl font-medium dark:text-slate-50" th:text="${post.spec.ti
<hr th:if="${haloCommentEnabled}" class="my-10 dark:border-slate-700" />
<div id="comment" 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"
kind="Post"
th:attr="name=${post.metadata.name}"
colorScheme="window.main.currentColorScheme"
/>
<halo:comment group="content.halo.run" kind="Post" th:attr="name=${post.metadata.name}" />
</div>
</div>

Expand Down

0 comments on commit 42a2546

Please sign in to comment.