diff --git a/src/app.d.ts b/src/app.d.ts index 9649e7b..367926a 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -4,9 +4,9 @@ declare global { namespace App { // interface Error {} // interface Locals {} - interface PageData {} + // interface PageData {} // interface PageState {} - interface Platform {} + // interface Platform {} } } diff --git a/src/lib/layout/MasonryLayout.svelte b/src/lib/layout/MasonryLayout.svelte index 5deaee5..8eacaf7 100644 --- a/src/lib/layout/MasonryLayout.svelte +++ b/src/lib/layout/MasonryLayout.svelte @@ -1,4 +1,6 @@ - <NavDrawer /> -<div class="p-2 md:p-4" in:fade> +<div class="p-2 md:p-4"> <Header /> - - <main> - <slot /> - </main> - + {#if $navigating && $navigating.to?.route.id === '/code'} + <Skel /> + {:else if $navigating} + <div class="flex h-full w-full grow flex-col items-center justify-center"> + <Spinner class="absolute top-1/2 my-auto" size={32} /> + </div> + {:else} + <main> + <slot /> + </main> + {/if} <Footer /> </div> diff --git a/src/routes/code/skel.svelte b/src/routes/code/skel.svelte new file mode 100644 index 0000000..b8fb8fb --- /dev/null +++ b/src/routes/code/skel.svelte @@ -0,0 +1,15 @@ +<script> + import { Skeleton } from 'flowbite-svelte' +</script> + +<div class="m-4 mt-24 grid grid-flow-row gap-4 md:grid-cols-2 lg:grid-cols-3"> + <Skeleton /> + <Skeleton /> + <Skeleton /> + <Skeleton /> + <Skeleton /> + <Skeleton /> + <Skeleton /> + <Skeleton /> + <Skeleton /> +</div>