aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/AppHeader.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-04 23:06:35 -0800
committerAdam Soltys <[email protected]>2026-03-04 23:06:35 -0800
commite5f37b003d93a17c2a9958697269b2d3228d8830 (patch)
treee2c3a3c4d1bec48d323e830f5be35d5832845a9a /src/components/AppHeader.svelte
parente6882c6a8987e23215a2538b242431ae603c7101 (diff)
downloadcoinos-ui-e5f37b003d93a17c2a9958697269b2d3228d8830.tar.gz
coinos-ui-e5f37b003d93a17c2a9958697269b2d3228d8830.zip
tuning
Diffstat (limited to 'src/components/AppHeader.svelte')
-rw-r--r--src/components/AppHeader.svelte12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index a12c656e..0d70bf49 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -4,12 +4,12 @@
import { goto } from "$app/navigation";
import Avatar from "$comp/Avatar.svelte";
import Menu from "$comp/Menu.svelte";
- import { loading, t } from "$lib/translations";
+ import { t } from "$lib/translations";
import { page } from "$app/stores";
let { user, subject = $bindable() } = $props();
- let w: number | undefined = $state();
+ let w: number = $state(globalThis.innerWidth || 1024);
$effect(() => (subject = subject || user));
let bg = $derived(
@@ -69,7 +69,6 @@
<svelte:window bind:innerWidth={w} />
-{#if !$loading}
<header
class="bg-gradient-to-r bg-primary bg-accent h-[175px] w-full relative bg-cover mb-20 !z-30"
style:background-image={bg}
@@ -79,7 +78,7 @@
{#each links as { href, icon: Icon, label }}
<a {href} data-sveltekit-preload-data="tap" aria-label={label}>
<button class="flex justify-center items-center bg-base-100 p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl {opacity(href)}" aria-label={label}>
- <Icon width={(w ?? 0) > 640 ? 32 : 24} />
+ <Icon width={w > 640 ? 32 : 24} />
</button>
</a>
{/each}
@@ -90,15 +89,14 @@
</a>
{/if}
</nav>
- {#if subject}
+ {#if subject || user}
<div
class="absolute md:w-[64px] md:mx-auto lg:left-[154px] xl:left-[194px] left-[calc(50vw-64px)] -bottom-[64px] z-30"
>
- <Avatar user={subject} />
+ <Avatar user={subject || user} />
</div>
{/if}
</header>
-{/if}
<style>
header {