set dev title + setup for future logic

This commit is contained in:
2026-09-17 05:39:44 +00:00
parent 247e65324e
commit 3f9190041f
2 changed files with 13 additions and 0 deletions

9
src/lib/title.ts Normal file
View File

@@ -0,0 +1,9 @@
import { dev } from "$app/env";
export function getTitle(path: string): string {
let builtTitle = "Stan Runge";
if (dev) builtTitle = "(DEV) " + builtTitle;
return builtTitle;
}

View File

@@ -20,6 +20,8 @@
import SiWhatsapp from '~icons/simple-icons/whatsapp';
import { resolve } from '$app/paths';
import { dev } from '$app/environment';
import { getTitle } from '$lib/title';
import { page } from '$app/state';
let { children } = $props();
@@ -57,6 +59,8 @@
data-website-id="47f2b385-188a-4776-a287-4889008ebac5"
></script>
{/if}
<title>{getTitle(page.url.pathname)}</title>
</svelte:head>
<div class="flex flex-col min-h-screen">