1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 22:09:36 +02:00
AdventureLog/frontend/src/routes/+layout.svelte

20 lines
516 B
Svelte

<script>
import Navbar from '$lib/components/Navbar.svelte';
import Toast from '$lib/components/Toast.svelte';
import 'tailwindcss/tailwind.css';
export let data;
const enableAnalytics = process.env['ENABLE_ANALYTICS'] || 'false';
const unamiKey = process.env['UNAMI_KEY'] || '';
</script>
<svelte:head>
{#if enableAnalytics === 'true' && unamiKey}
<script defer src="https://cloud.umami.is/script.js" data-website-id={unamiKey}></script>
{/if}
</svelte:head>
<Navbar {data} />
<Toast />
<slot></slot>