aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)/+layout.svelte
blob: a0061a19c088ccaf8cdb823f22dc451e5890001f (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
<script>
  import { run } from 'svelte/legacy';

  import Nostr from "$comp/Nostr.svelte";
  import { SvelteToast } from "@zerodevx/svelte-toast";
  import Footer from "$comp/Footer.svelte";
  import LandingHeader from "$comp/LandingHeader.svelte";
  import { theme as themeStore } from "$lib/store";

  let { data, children } = $props();
  let { theme } = $state(data);
  let { user } = $derived(data);
  run(() => {
    theme = $themeStore;
  });
</script>

<SvelteToast options={{ reversed: true, intro: { y: 192 } }} />
<LandingHeader {user} />
<Nostr />
<main
  class="container flex px-4 md:px-40 mx-auto min-h-[600px]"
  data-theme={theme}
>
  {@render children?.()}
</main>
<Footer />