feat: make crossposts collapsible
This commit is contained in:
1 parent
f9a8f13d63
commit
6516e99fe0
2 files changed
+15
-8
No files matched your search
@@ -188,12 +188,19 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#if post.cross_posts?.length > 0}
|
{#if post.cross_posts?.length > 0}
|
||||||
<div class="text-sm font-bold mt-2">
|
<details
|
||||||
<SectionTitle class="text-inherit dark:text-inherit">
|
class="text-sm font-bold mt-2 w-full cursor-pointer"
|
||||||
Crossposts <span class="text-slate-600 dark:text-zinc-400 text-xs ml-1">
|
open={post.cross_posts?.length <= 3}
|
||||||
{post.cross_posts.length}
|
>
|
||||||
</span>
|
<summary class="inline-block w-full">
|
||||||
</SectionTitle>
|
<SectionTitle class="text-inherit dark:text-inherit">
|
||||||
|
Crossposts <span
|
||||||
|
class="text-slate-600 dark:text-zinc-400 text-xs ml-1"
|
||||||
|
>
|
||||||
|
{post.cross_posts.length}
|
||||||
|
</span>
|
||||||
|
</SectionTitle>
|
||||||
|
</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">
|
||||||
@@ -213,7 +220,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</details>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 flex flex-col gap-2">
|
<div class="mt-4 flex flex-col gap-2">
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ export default {
|
|||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
'zinc': {
|
'zinc': {
|
||||||
700: '#313139',
|
700: '#34343b',
|
||||||
800: '#1f1f24',
|
800: '#1f1f24',
|
||||||
900: '#121215'
|
900: '#121215'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user