feat: add support for distinguished comments

This commit is contained in:
Xylight committed 2024-07-01 18:57:20 -07:00
1 parent 1cde3a1f78
commit 2610c87089
2 files changed
+11 -3

No files matched your search

@@ -102,7 +102,9 @@
{/if}
<li
class="py-3 {highlight} {$$props.class}"
class="py-3 relative {node.comment_view.comment.distinguished
? ' text-primary-900 dark:text-primary-100'
: ''} {highlight} {$$props.class}"
id="#{node.comment_view.comment.id.toString()}"
>
<Disclosure bind:open class="flex flex-col">
@@ -160,8 +162,14 @@
</div>
<div
class="flex flex-col whitespace-pre-wrap
max-w-full gap-1 mt-1"
max-w-full gap-1 mt-1 relative"
>
{#if node.comment_view.comment.distinguished}
<div
class="-z-10 bg-slate-200 dark:bg-zinc-900 absolute -top-9 -bottom-1.5
-inset-x-6 -right-6"
/>
{/if}
<div class="max-w-full mt-0.5 break-words text-sm">
<Markdown source={node.comment_view.comment.content} />
</div>
@@ -42,7 +42,7 @@
<Translation bind:open={translating} />
{/if}
<div class="flex flex-row items-center gap-0.5 h-7 relative">
<div class="flex flex-row items-center gap-0.5 h-7">
<CommentVote
bind:upvotes={comment.counts.upvotes}
bind:downvotes={comment.counts.downvotes}