Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup inject code of comment widget #137

Merged
merged 1 commit into from Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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