dev #33
9
src/lib/title.ts
Normal file
9
src/lib/title.ts
Normal 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;
|
||||
}
|
||||
@@ -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">
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
import { resolve } from '$app/paths';
|
||||
</script>
|
||||
|
||||
<div class="text-center py-2 font-bold text-xl underline">
|
||||
<a href={resolve('/blog')}>Blog</a>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-around py-8">
|
||||
<div class="max-w-100">
|
||||
|
||||
Reference in New Issue
Block a user