design: reorganize profile (#451)

* fix: re-add actions to community header

* impr: reorganize the profile menu

* misc: improve blocks page

* fix: use a better icon for expands

* misc: reorganize some settings
This commit is contained in:
Xylight authored and GitHub committed 2024-09-22 14:48:22 -07:00
1 parent 7c7df02e3d
commit 62e20fcb69
14 files changed
+373 -189

No files matched your search

+37 -5
View File
@@ -1,11 +1,43 @@
<script lang="ts">
import Expandable from '$lib/components/ui/Expandable.svelte'
import { ChevronDown, Icon, Minus, Plus } from 'svelte-hero-icons'
import { backOut, expoOut } from 'svelte/easing'
import { slide } from 'svelte/transition'
export let title: string
export let id: string
export let open = true
</script>
<div
class="flex flex-col min-w-0 divide-y divide-slate-200 dark:divide-zinc-800 *:py-3.5 max-w-full w-full"
>
<h2 class="text-xl font-semibold text-inherit" {id}>{title}</h2>
<slot />
<div class="flex flex-col max-w-full w-full">
<button
class="text-left hover:text-primary-900 dark:hover:text-primary-100
flex items-center justify-between z-0 relative group transition-colors"
on:click={() => (open = !open)}
>
<h2 class="text-xl font-semibold text-inherit" {id}>
<span>{title}</span>
</h2>
<Icon
src={open ? Minus : Plus}
size="16"
micro
class="{open
? ''
: 'rotate-90'} transition-transform duration-500 ease-out"
/>
<div
class="absolute inset-x-0 inset-y-1 opacity-0 rounded-full bg-slate-50 dark:bg-zinc-900
group-hover:-inset-x-3 group-hover:-inset-y-1 group-hover:opacity-100 transition-all -z-10"
></div>
</button>
{#if open}
<div
transition:slide={{ axis: 'y', duration: 500, easing: expoOut }}
class="w-full flex flex-col divide-y divide-slate-200 dark:divide-zinc-800 *:py-3"
>
<slot />
</div>
{/if}
</div>