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>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="flex flex-col gap-1">
|
||||||
class="flex flex-col [&>*]:py-3 divide-y divide-slate-200 dark:divide-zinc-900"
|
|
||||||
>
|
|
||||||
{#if taglines && taglines.length > 0}
|
{#if taglines && taglines.length > 0}
|
||||||
<Markdown
|
<Markdown
|
||||||
class="!pt-0"
|
class="!pt-0"
|
||||||
@@ -89,21 +87,23 @@
|
|||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
<Expandable bind:open={$userSettings.expand.about}>
|
<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 />
|
<Icon src={InformationCircle} size="16" mini />
|
||||||
{$t('cards.site.about')}
|
{$t('cards.site.about')}
|
||||||
</svelte:fragment>
|
</span>
|
||||||
<Markdown source={site.site.description} />
|
<Markdown source={site.site.description} />
|
||||||
<div class="my-4" />
|
<div class="my-4" />
|
||||||
<Markdown source={site.site.sidebar} />
|
<Markdown source={site.site.sidebar} />
|
||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
<Expandable bind:open={$userSettings.expand.stats}>
|
<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 />
|
<Icon src={ChartBar} size="16" mini />
|
||||||
{$t('cards.site.stats')}
|
{$t('cards.site.stats')}
|
||||||
</svelte:fragment>
|
</span>
|
||||||
<div class="flex flex-row gap-4 flex-wrap">
|
<div class="flex flex-row gap-4 flex-wrap">
|
||||||
<LabelStat
|
<LabelStat
|
||||||
label={$t('content.users')}
|
label={$t('content.users')}
|
||||||
@@ -124,11 +124,12 @@
|
|||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
{#if admins}
|
{#if admins}
|
||||||
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
<Expandable bind:open={$userSettings.expand.team}>
|
<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 />
|
<Icon src={UserGroup} size="16" mini />
|
||||||
{$t('cards.site.admins')}
|
{$t('cards.site.admins')}
|
||||||
</svelte:fragment>
|
</span>
|
||||||
<ItemList
|
<ItemList
|
||||||
items={admins.map((a) => ({
|
items={admins.map((a) => ({
|
||||||
id: a.person.id,
|
id: a.person.id,
|
||||||
|
|||||||
@@ -161,22 +161,22 @@
|
|||||||
/>
|
/>
|
||||||
</Entity>
|
</Entity>
|
||||||
|
|
||||||
<div
|
<div class="flex flex-col gap-1">
|
||||||
class="flex flex-col divide-y divide-slate-200 dark:divide-zinc-800 [&>*]:py-3"
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
>
|
|
||||||
<Expandable bind:open={$userSettings.expand.about} class="!pt-0">
|
<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 />
|
<Icon src={InformationCircle} size="15" mini />
|
||||||
{$t('cards.site.about')}
|
{$t('cards.site.about')}
|
||||||
</svelte:fragment>
|
</span>
|
||||||
<Markdown source={community_view.community.description} />
|
<Markdown source={community_view.community.description} />
|
||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
<Expandable bind:open={$userSettings.expand.stats}>
|
<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 />
|
<Icon src={ChartBar} size="15" mini />
|
||||||
{$t('cards.site.stats')}
|
{$t('cards.site.stats')}
|
||||||
</svelte:fragment>
|
</span>
|
||||||
<div class="flex flex-row gap-4 flex-wrap">
|
<div class="flex flex-row gap-4 flex-wrap">
|
||||||
<LabelStat
|
<LabelStat
|
||||||
label={$t('cards.community.members')}
|
label={$t('cards.community.members')}
|
||||||
@@ -192,11 +192,12 @@
|
|||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
{#if moderators && moderators.length > 0}
|
{#if moderators && moderators.length > 0}
|
||||||
|
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||||
<Expandable bind:open={$userSettings.expand.team}>
|
<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 />
|
<ShieldIcon width={15} filled />
|
||||||
{$t('cards.community.moderators')}
|
{$t('cards.community.moderators')}
|
||||||
</svelte:fragment>
|
</span>
|
||||||
<ItemList
|
<ItemList
|
||||||
items={moderators.map((m) => ({
|
items={moderators.map((m) => ({
|
||||||
id: m.moderator.id,
|
id: m.moderator.id,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div
|
<div
|
||||||
slot="summary"
|
slot="summary"
|
||||||
class="font-medium w-full text-left flex flex-row items-center justify-between hover:text-primary-900
|
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">
|
<div class="flex flex-row gap-1 items-center w-full">
|
||||||
<slot name="title" />
|
<slot name="title" />
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
micro
|
micro
|
||||||
class="{open ? 'rotate-180' : ''} transition-transform"
|
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>
|
</div>
|
||||||
<slot name="content">
|
<slot name="content">
|
||||||
<div class="pt-2 text-slate-900 dark:text-zinc-100">
|
<div class="pt-2 text-slate-900 dark:text-zinc-100">
|
||||||
|
|||||||
Reference in new issue
Block a user