design: improve comment/crosspost design

This commit is contained in:
Xyphyn committed 2023-10-11 17:26:19 -07:00
1 parent 1ce576302a
commit c1c138680d
1 file changed
+14 -17
@@ -20,6 +20,7 @@
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte' import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
import { import {
Badge, Badge,
Disclosure,
Material, Material,
Select, Select,
Spinner, Spinner,
@@ -211,19 +212,17 @@
/> />
</div> </div>
{#if post.cross_posts?.length > 0} {#if post.cross_posts?.length > 0}
<details <Disclosure
class="text-sm font-bold mt-2 w-full cursor-pointer" class="text-base font-bold mt-2 w-full cursor-pointer"
open={post.cross_posts?.length <= 3} open={post.cross_posts?.length <= 3}
> >
<summary class="inline-block w-full"> <div
<SectionTitle class="text-inherit dark:text-inherit"> slot="summary"
Crossposts <span class="inline-block w-full text-left text-base font-normal"
class="text-slate-600 dark:text-zinc-400 text-xs ml-1"
> >
{post.cross_posts.length} <span class="font-bold">{post.cross_posts.length}</span>
</span> crosspost
</SectionTitle> </div>
</summary>
<div class="divide-y divide-slate-200 dark:divide-zinc-800 flex flex-col"> <div class="divide-y divide-slate-200 dark:divide-zinc-800 flex flex-col">
{#each post.cross_posts as crosspost} {#each post.cross_posts as crosspost}
<div class="py-2.5 flex flex-col gap-1"> <div class="py-2.5 flex flex-col gap-1">
@@ -243,7 +242,7 @@
</div> </div>
{/each} {/each}
</div> </div>
</details> </Disclosure>
{/if} {/if}
</div> </div>
{#if data.singleThread} {#if data.singleThread}
@@ -260,13 +259,11 @@
{/if} {/if}
<div class="mt-4 flex flex-col gap-2 w-full"> <div class="mt-4 flex flex-col gap-2 w-full">
<div class="flex flex-row justify-between flex-wrap gap-2"> <div class="flex flex-row justify-between flex-wrap gap-2">
<div class="font-bold opacity-80 text-base flex items-center gap-2"> <div class="text-base">
Comments <Badge <span class="font-bold">
color="blue-subtle"
class="min-w-[1rem] justify-center !font-bold"
>
<FormattedNumber number={post.post_view.counts.comments} /> <FormattedNumber number={post.post_view.counts.comments} />
</Badge> </span>
comments
</div> </div>
<div class="gap-2 flex items-center h-8"> <div class="gap-2 flex items-center h-8">
<Select <Select