<script lang="ts">
	// The ordering of these imports is critical to your app working properly
	import '@skeletonlabs/skeleton/themes/theme-crimson.css';
	// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
	import '@skeletonlabs/skeleton/styles/all.css';
	// Most of your app wide CSS should be put in this file
	import '../app.postcss';
	import '$lib/styles/tomorrow-night.css';
	import { AppShell, AppBar } from '@skeletonlabs/skeleton';
	import { fade } from 'svelte/transition';
	export let data;
</script>

<!-- App Shell -->
<AppShell>
	<svelte:fragment slot="header">
		<!-- App Bar -->
		<AppBar>
			<svelte:fragment slot="lead">
				<strong class="text-xl"><a href="/">silentsilas</a></strong>
			</svelte:fragment>
			<svelte:fragment slot="trail">
				<a class="btn btn-sm variant-ringed-primary" href="/rants"> Rants </a>
				<a class="btn btn-sm variant-ringed-primary" href="/writes"> Writes </a>
				<a class="btn btn-sm variant-ringed-primary" href="/works"> Works </a>
			</svelte:fragment>
		</AppBar>
	</svelte:fragment>
	<!-- Page Route Content -->
	{#key data.currentRoute}
		<main
			in:fade={{ duration: 150, delay: 150 }}
			out:fade={{ duration: 150 }}
			style="display: contents"
			class="h-full overflow-hidden"
		>
			<slot />
		</main>
	{/key}
</AppShell>
