design: add more visual feedback to expandables
This commit is contained in:
1 parent
ff335fd580
commit
eb37a64a5a
3 files changed
+25
-19
No files matched your search
@@ -79,9 +79,7 @@
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex flex-col [&>*]:py-3 divide-y divide-slate-200 dark:divide-zinc-900"
|
||||
>
|
||||
<div class="flex flex-col gap-1">
|
||||
{#if taglines && taglines.length > 0}
|
||||
<Markdown
|
||||
class="!pt-0"
|
||||
@@ -89,21 +87,23 @@
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={$userSettings.expand.about}>
|
||||
<svelte:fragment slot="title">
|
||||
<span class="flex items-center gap-1 py-1 px-2" slot="title">
|
||||
<Icon src={InformationCircle} size="16" mini />
|
||||
{$t('cards.site.about')}
|
||||
</svelte:fragment>
|
||||
</span>
|
||||
<Markdown source={site.site.description} />
|
||||
<div class="my-4" />
|
||||
<Markdown source={site.site.sidebar} />
|
||||
</Expandable>
|
||||
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={$userSettings.expand.stats}>
|
||||
<svelte:fragment slot="title">
|
||||
<span class="flex items-center gap-1 py-1 px-2" slot="title">
|
||||
<Icon src={ChartBar} size="16" mini />
|
||||
{$t('cards.site.stats')}
|
||||
</svelte:fragment>
|
||||
</span>
|
||||
<div class="flex flex-row gap-4 flex-wrap">
|
||||
<LabelStat
|
||||
label={$t('content.users')}
|
||||
@@ -124,11 +124,12 @@
|
||||
</Expandable>
|
||||
|
||||
{#if admins}
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={$userSettings.expand.team}>
|
||||
<svelte:fragment slot="title">
|
||||
<span class="flex items-center gap-1 py-1 px-2" slot="title">
|
||||
<Icon src={UserGroup} size="16" mini />
|
||||
{$t('cards.site.admins')}
|
||||
</svelte:fragment>
|
||||
</span>
|
||||
<ItemList
|
||||
items={admins.map((a) => ({
|
||||
id: a.person.id,
|
||||
|
||||
@@ -161,22 +161,22 @@
|
||||
/>
|
||||
</Entity>
|
||||
|
||||
<div
|
||||
class="flex flex-col divide-y divide-slate-200 dark:divide-zinc-800 [&>*]:py-3"
|
||||
>
|
||||
<div class="flex flex-col gap-1">
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={$userSettings.expand.about} class="!pt-0">
|
||||
<svelte:fragment slot="title">
|
||||
<span slot="title" class="py-1 px-1 flex gap-1 items-center">
|
||||
<Icon src={InformationCircle} size="15" mini />
|
||||
{$t('cards.site.about')}
|
||||
</svelte:fragment>
|
||||
</span>
|
||||
<Markdown source={community_view.community.description} />
|
||||
</Expandable>
|
||||
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={$userSettings.expand.stats}>
|
||||
<svelte:fragment slot="title">
|
||||
<span slot="title" class="py-1 px-1 flex gap-1 items-center">
|
||||
<Icon src={ChartBar} size="15" mini />
|
||||
{$t('cards.site.stats')}
|
||||
</svelte:fragment>
|
||||
</span>
|
||||
<div class="flex flex-row gap-4 flex-wrap">
|
||||
<LabelStat
|
||||
label={$t('cards.community.members')}
|
||||
@@ -192,11 +192,12 @@
|
||||
</Expandable>
|
||||
|
||||
{#if moderators && moderators.length > 0}
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={$userSettings.expand.team}>
|
||||
<svelte:fragment slot="title">
|
||||
<span slot="title" class="py-1 px-1 flex gap-1 items-center">
|
||||
<ShieldIcon width={15} filled />
|
||||
{$t('cards.community.moderators')}
|
||||
</svelte:fragment>
|
||||
</span>
|
||||
<ItemList
|
||||
items={moderators.map((m) => ({
|
||||
id: m.moderator.id,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div
|
||||
slot="summary"
|
||||
class="font-medium w-full text-left flex flex-row items-center justify-between hover:text-primary-900
|
||||
hover:dark:text-primary-100 transition-colors h-full"
|
||||
hover:dark:text-primary-100 transition-colors h-full z-0 group relative"
|
||||
>
|
||||
<div class="flex flex-row gap-1 items-center w-full">
|
||||
<slot name="title" />
|
||||
@@ -22,6 +22,10 @@
|
||||
micro
|
||||
class="{open ? 'rotate-180' : ''} transition-transform"
|
||||
/>
|
||||
<div
|
||||
class="inset-0 -z-10 opacity-0 absolute bg-slate-100 dark:bg-zinc-900 rounded-full
|
||||
group-hover:opacity-100 group-hover:-inset-1 group-hover:-inset-x-2 transition-all"
|
||||
/>
|
||||
</div>
|
||||
<slot name="content">
|
||||
<div class="pt-2 text-slate-900 dark:text-zinc-100">
|
||||
|
||||
Reference in new issue
Block a user