summaryrefslogtreecommitdiffstats
path: root/src/routes/+layout.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/+layout.svelte')
-rw-r--r--src/routes/+layout.svelte28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
new file mode 100644
index 0000000..cf931d8
--- /dev/null
+++ b/src/routes/+layout.svelte
@@ -0,0 +1,28 @@
+<script lang="ts">
+ import '../app.css';
+
+ import { selectedDomain } from '$lib/stores/mirror';
+ import type { Snippet } from 'svelte';
+ import type { LayoutData } from './$types';
+
+ import Footer from '$lib/components/Footer.svelte';
+
+ interface Props {
+ children: Snippet;
+ data: LayoutData;
+ }
+
+ let { children, data }: Props = $props();
+
+ let { source, commitLink, latestCommitHash, domains } = $derived(data);
+
+ $effect(() => {
+ if (domains && domains.length > 0) {
+ selectedDomain.update((d) => d || domains[0]);
+ }
+ });
+</script>
+
+{@render children()}
+
+<Footer {source} {commitLink} {latestCommitHash} />