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

+2
View File
@@ -39,12 +39,14 @@
class="aspect-square object-cover overflow-hidden {$$props.class}"
style="width: {width}px; height: {width}px;"
class:rounded-full={circle}
class:rounded-md={!circle}
/>
{:else}
<div
style="width: {width}px; height: {width}px;"
class="aspect-square object-cover overflow-hidden {$$props.class}"
class:rounded-full={circle}
class:rounded-md={!circle}
>
{@html createAvatar(initials, {
seed: alt,
+4 -2
View File
@@ -7,9 +7,11 @@
</script>
<div class="flex flex-row gap-2 items-center">
<Avatar url={icon} width={32} />
<slot name="icon">
<Avatar url={icon} width={32} />
</slot>
<div class="flex flex-col">
<span class="font-medium">{name}</span>
<span class="font-bold text-base">{name}</span>
<span class="text-sm">{label}</span>
</div>
</div>
@@ -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