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 SiWhatsapp from '~icons/simple-icons/whatsapp';
|
||||||
import { resolve } from '$app/paths';
|
import { resolve } from '$app/paths';
|
||||||
import { dev } from '$app/environment';
|
import { dev } from '$app/environment';
|
||||||
|
import { getTitle } from '$lib/title';
|
||||||
|
import { page } from '$app/state';
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
@@ -57,6 +59,8 @@
|
|||||||
data-website-id="47f2b385-188a-4776-a287-4889008ebac5"
|
data-website-id="47f2b385-188a-4776-a287-4889008ebac5"
|
||||||
></script>
|
></script>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<title>{getTitle(page.url.pathname)}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="flex flex-col min-h-screen">
|
<div class="flex flex-col min-h-screen">
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
import { resolve } from '$app/paths';
|
import { resolve } from '$app/paths';
|
||||||
</script>
|
</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="flex justify-around py-8">
|
||||||
<div class="max-w-100">
|
<div class="max-w-100">
|
||||||
|
|||||||
Reference in New Issue
Block a user