misc: make community cards consistent

This commit is contained in:
Xylight committed 2024-06-12 14:00:41 -07:00
1 parent dd1dce9b6b
commit eef339bf4c
9 files changed
+47 -131

No files matched your search

@@ -101,73 +101,6 @@
</div>
{/if}
<div class="flex flex-row gap-2 py-2 px-2 items-center w-full">
{#if $profile}
<div
class="px-2 border-r border-l border-slate-200 dark:border-zinc-900
flex flex-row items-center gap-2 [&>*]:flex-shrink-0 overflow-x-auto overflow-y-hidden
md:max-w-64 sm:max-w-48 max-w-36 w-full max-[424px]:hidden"
>
{#each $profile.favorites ?? [] as favorite (favorite.id)}
<div
class="h-10 w-10 flex"
transition:scale={{
start: 0.7,
easing: backOut,
duration: 400,
delay: 0,
}}
animate:flip={{
easing: backOut,
duration: 400,
delay: 0,
}}
>
<NavButton
class="w-full h-full bg-slate-100 dark:bg-zinc-900 relative"
title={favorite.name}
href={favorite.url.toString()}
label={favorite.name}
>
{#if favorite.type == 'post'}
<div
class="relative w-full h-full grid place-items-center overflow-visible"
>
{#if favorite.subdivision}
<Avatar
alt={favorite.subdivision.name}
url={favorite.subdivision.avatar}
width={32}
res={64}
class=""
/>
<Icon
src={PencilSquare}
mini
size="20"
class="absolute -bottom-1 -right-1 rounded-full bg-slate-100 dark:bg-zinc-900 p-0.5"
/>
{/if}
</div>
{:else}
<Avatar
alt={favorite.name}
url={favorite.avatar}
res={64}
width={32}
class="w-full"
/>
<Icon
src={Newspaper}
mini
size="20"
class="absolute -bottom-1 -right-1 rounded-full bg-slate-100 dark:bg-zinc-900 p-0.5"
/>
{/if}
</NavButton>
</div>
{/each}
</div>
{/if}
<div class="ml-auto" />
{#if $profile?.user && isAdmin($profile.user)}
<NavButton