mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Update navigation loading and NGINX try_file
This commit is contained in:
@@ -3,20 +3,11 @@
|
||||
import { page } from "$app/stores";
|
||||
import type { LayoutServerData } from "./$types";
|
||||
import type { Snippet } from "svelte";
|
||||
import { beforeNavigate, afterNavigate } from "$app/navigation";
|
||||
import { navigating } from "$app/stores";
|
||||
import LoadingSpinner from "$lib/components/LoadingSpinner.svelte";
|
||||
|
||||
const { data, children }: { data: LayoutServerData; children: Snippet } = $props();
|
||||
|
||||
let loading = $state(false);
|
||||
|
||||
beforeNavigate(() => {
|
||||
loading = true;
|
||||
});
|
||||
afterNavigate(() => {
|
||||
loading = false;
|
||||
});
|
||||
|
||||
const isProjectRoute = $derived($page.url.pathname.startsWith("/website") && !$page.error);
|
||||
const routeName = $derived(
|
||||
$page.url.pathname === "/"
|
||||
@@ -25,7 +16,7 @@
|
||||
);
|
||||
</script>
|
||||
|
||||
{#if loading}
|
||||
{#if $navigating}
|
||||
<LoadingSpinner />
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user