design: use commonlist for sidebar items
This commit is contained in:
8 files changed
+174
-192
No files matched your search
@@ -59,7 +59,7 @@
|
||||
style: 'grid-area: sidebar; width: 100% !important;',
|
||||
})}
|
||||
{@render main?.({
|
||||
class: `w-full bg-slate-50 dark:bg-zinc-925 justify-self-center border-x border-slate-200 dark:border-zinc-900 max-lg:pb-22`,
|
||||
class: `w-full bg-slate-50 dark:bg-zinc-925 justify-self-center border-x border-slate-200 dark:border-zinc-900 max-lg:pb-22 pb-3 sm:pb-6`,
|
||||
style: 'grid-area: main',
|
||||
})}
|
||||
{@render suffix?.({
|
||||
|
||||
@@ -117,11 +117,12 @@
|
||||
{#snippet item(prof, index)}
|
||||
<ProfileButton {index} {prof} />
|
||||
{/snippet}
|
||||
<li class="xs px-1 py-0.5">
|
||||
<SidebarButton href="/accounts" icon={UserGroup}>
|
||||
{$t('account.accounts')}
|
||||
</SidebarButton>
|
||||
</li>
|
||||
</CommonList>
|
||||
<div class="my-2"></div>
|
||||
<SidebarButton href="/accounts" icon={UserGroup}>
|
||||
{$t('account.accounts')}
|
||||
</SidebarButton>
|
||||
</Expandable>
|
||||
{/if}
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
@@ -143,9 +144,37 @@
|
||||
</EndPlaceholder>
|
||||
</span>
|
||||
{/snippet}
|
||||
<CommunityList
|
||||
items={profile.current.user.moderates.map(i => i.community)}
|
||||
/>
|
||||
<CommonList
|
||||
animate={false}
|
||||
size="xs"
|
||||
items={profile.current.user.moderates}
|
||||
class="px-1 py-0.5"
|
||||
>
|
||||
{#snippet item(moderate)}
|
||||
<SidebarButton
|
||||
class="font-normal w-full h-max"
|
||||
color="none"
|
||||
alignment="left"
|
||||
href={communityLink(moderate.community)}
|
||||
>
|
||||
{#snippet customIcon()}
|
||||
<Avatar
|
||||
url={moderate.community.icon}
|
||||
alt={moderate.community.name}
|
||||
title={moderate.community.title}
|
||||
width={28}
|
||||
/>{/snippet}
|
||||
{#snippet label()}
|
||||
<div class="flex flex-col max-w-full break-words">
|
||||
<span>{moderate.community.title}</span>
|
||||
<span class="text-xs text-slate-600 dark:text-zinc-400">
|
||||
{new URL(moderate.community.actor_id).hostname}
|
||||
</span>
|
||||
</div>
|
||||
{/snippet}
|
||||
</SidebarButton>
|
||||
{/snippet}
|
||||
</CommonList>
|
||||
</Expandable>
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user