Use SvelteKit render function for templating and add error page

This commit is contained in:
thiloho
2024-08-17 19:29:10 +02:00
parent e41b963666
commit f3278fb1f6
11 changed files with 141 additions and 154 deletions

View File

@@ -6,7 +6,7 @@
const { data, children } = $props<{ data: LayoutServerData; children: Snippet }>();
const isProjectRoute = $derived($page.url.pathname.startsWith("/website"));
const isProjectRoute = $derived($page.url.pathname.startsWith("/website") && !$page.error);
const routeName = $derived(
$page.url.pathname === "/"
? "Dashboard"
@@ -39,7 +39,7 @@
</ul>
</nav>
{#if !isProjectRoute}
{#if !isProjectRoute && !$page.error}
<header>
<h1>{routeName}</h1>
</header>