From 5cb0b9eb53dbf79cb8a81077d8d25bb169d1eeb4 Mon Sep 17 00:00:00 2001 From: Zias van Nes Date: Fri, 3 Oct 2025 15:58:38 +0200 Subject: [PATCH] use:skeleton for loading in content --- src/lib/components/LocationButton.svelte | 18 ++-- src/lib/components/Map.svelte | 90 +++++++++++++++---- src/lib/components/ProfilePanel.svelte | 83 ++++++++++++----- .../components/avatar/avatar-fallback.svelte | 20 +++-- src/lib/components/skeleton/index.ts | 4 +- .../skeleton/skeleton-variants.svelte | 67 ++++++++++++++ src/lib/index.ts | 3 + src/routes/+layout.svelte | 36 ++++++++ 8 files changed, 265 insertions(+), 56 deletions(-) create mode 100644 src/lib/components/skeleton/skeleton-variants.svelte diff --git a/src/lib/components/LocationButton.svelte b/src/lib/components/LocationButton.svelte index 431cd5c..3d74d1f 100644 --- a/src/lib/components/LocationButton.svelte +++ b/src/lib/components/LocationButton.svelte @@ -6,6 +6,7 @@ locationError, isLocationLoading } from '$lib/stores/location'; + import { Skeleton } from './skeleton'; interface Props { class?: string; @@ -55,11 +56,9 @@ > {#if $isLocationLoading} - - - +
+ +
{:else if $locationStatus === 'success'}
- - {#if $coordinates} - -
-
-
-
-
-
-
- {/if} -
- - {#if showLocationButton} -
- + {#if !mapReady} +
+ +
+ + +
{/if} + +
+ + {#if $coordinates} + +
+
+
+
+
+
+
+ {/if} +
+ + {#if showLocationButton} +
+ +
+ {/if} +