misc: Tweak design

This commit is contained in:
Xyphyn committed 2023-07-19 15:36:01 -07:00
1 parent 42a429326a
commit 4c3b5fae6a
10 files changed
+65 -24

No files matched your search

+24 -11
View File
@@ -21,19 +21,25 @@
Plus,
UserCircle,
} from 'svelte-hero-icons'
import { get } from 'svelte/store'
let scrollY = 0
</script>
<svelte:window bind:scrollY />
<nav
class="flex flex-row gap-2 items-center sticky top-0 bg-slate-50/80
lg:bg-white/80 lg:rounded-b-md
dark:bg-zinc-950/80 lg:dark:bg-zinc-900/80 backdrop-blur-3xl max-w-5xl
w-full mx-auto px-4 py-2 z-50 lg:border-x lg:border-b transition-all
border-slate-200 dark:border-zinc-800 box-border"
class="flex flex-row gap-2 items-center sticky top-0 bg-slate-100
dark:bg-black {scrollY > 0
? 'bg-slate-100/80 dark:bg-black/80'
: ''} backdrop-blur-3xl
w-full mx-auto px-4 py-2 z-50 border-b transition-all
border-slate-200 dark:border-zinc-900 box-border"
>
<div class="flex flex-row gap-2 items-center mr-auto">
<a href="/" class="flex flex-row items-center gap-2">
<Logo width={40} />
<span class="opacity-30 text-lg">/</span>
<span class="opacity-30 text-xl">/</span>
<span class="text-sm font-bold">
{$instance}
</span>
@@ -69,6 +75,11 @@
slot="button"
on:click={toggleOpen}
>
{#if $user === undefined}
<div class="w-full h-full grid place-items-center">
<Spinner width={20} />
</div>
{/if}
{#if $user}
<img
src={$user.person.avatar ??
@@ -86,11 +97,7 @@
<li class="text-xs opacity-80 text-left mx-4 my-1 py-1">
{$user ? $user.person.name : 'Profile'}
</li>
{#if !$user || !$authData}
<MenuButton link href="/login">
<Icon src={ArrowLeftOnRectangle} mini width={16} /> Log in
</MenuButton>
{:else}
{#if $user && $authData}
<MenuButton link href="/u/{$user.person.name}@{$authData.instance}">
<Icon src={UserCircle} mini width={16} /> Profile
</MenuButton>
@@ -118,6 +125,12 @@
<Icon src={ArrowRightOnRectangle} mini width={16} />Log out
</MenuButton>
{/if}
{#if !$user || !$authData}
<MenuButton link href="/login">
<Icon src={ArrowLeftOnRectangle} mini width={16} />
Log in
</MenuButton>
{/if}
<hr class="dark:opacity-10 w-[90%] my-2 mx-auto" />
<li class="text-xs px-4 py-1 my-1 opacity-80">App</li>
<MenuButton link href="/settings">
+2 -2
View File
@@ -1,8 +1,8 @@
<aside
class="sticky top-20 border bg-white border-slate-200
dark:border-zinc-800 dark:bg-zinc-900 break-words flex
flex-col gap-4 p-6 w-[20rem] rounded-md h-max max-h-[calc(100vh-6rem)]
overflow-auto"
flex-col gap-4 p-6 w-[22rem] rounded-md h-max max-h-[calc(100vh-6rem)]
overflow-auto text-sm"
>
<slot />
</aside>
+2 -2
View File
@@ -39,7 +39,7 @@
? ExclamationCircle
: ExclamationCircle}
/>
<div class="flex flex-col p-4 pl-0 mr-auto">
<div class="flex flex-col p-4 pl-0 break-words max-w-full">
{#if toast.title}
<h1 class="text-base font-bold">{toast.title}</h1>
{/if}
@@ -49,7 +49,7 @@
on:click={() => {
toasts.update((toasts) => toasts.filter((t) => t.id != toast.id))
}}
class="rounded-lg transition-colors hover:bg-slate-200 hover:dark:bg-zinc-800 p-2 m-2"
class="rounded-lg ml-auto w-max transition-colors hover:bg-slate-200 hover:dark:bg-zinc-800 p-2 m-2"
>
<Icon src={XMark} size="16" mini />
</button>
+1 -1
View File
@@ -1,7 +1,7 @@
import { writable } from 'svelte/store'
export enum ToastType {
'error' = 'bg-red-500 text-black border border-red-600',
'error' = 'bg-red-500 text-white border border-red-600',
'warning' = 'bg-yellow-400 text-black border border-yellow-500',
'success' = 'bg-green-400 text-black border border-green-500',
'info' = 'dark:bg-zinc-900 bg-white border border-slate-200 dark:border-zinc-800 shadow-lg',