aboutsummaryrefslogtreecommitdiffstats
path: root/clients/www/src/routes/+layout.svelte
blob: a80d9aa828bd0c49bc5362f76823a3a4c31699a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script lang="ts">
	import "iconify-icon";
	import { base } from '$app/paths';
	import '../app.postcss';
	import { AppShell, AppBar, LightSwitch, initializeStores, Toast } from '@skeletonlabs/skeleton';

	import { pwaInfo } from 'virtual:pwa-info';

	$: webManifest = pwaInfo ? pwaInfo.webManifest.linkTag : '';

	initializeStores();
</script>

<svelte:head>
	<!-- eslint-disable-next-line svelte/no-at-html-tags VitePWA can probably be trusted -->
	{@html webManifest}
</svelte:head>

<Toast />

<!-- App Shell -->
<AppShell>
	<svelte:fragment slot="header">
		<!-- App Bar -->
		<AppBar gridColumns="grid-cols-3" slotDefault="place-self-center" slotTrail="place-content-end">
			<svelte:fragment slot="lead">
				<LightSwitch />
			</svelte:fragment>
			<a href="{base}/">Zelda: Oracle Password Generator</a>
			<svelte:fragment slot="trail">
				<a href="https://github.com/RosstheRoss/zorascript">
					<iconify-icon icon="mdi:github" height="auto" />
				</a>
			</svelte:fragment>
		</AppBar>
	</svelte:fragment>
	<!-- Page Route Content -->
	<slot />
</AppShell>

{#await import('$lib/components/ReloadPrompt.svelte') then { default: ReloadPrompt }}
	<ReloadPrompt />
{/await}