|
1 | 1 | <script lang="ts">
|
2 | 2 | import { browser } from '$app/environment';
|
3 |
| - import { page } from '$app/stores'; |
| 3 | + import { page } from '$app/state'; |
4 | 4 | import {
|
5 | 5 | PUBLIC_FATHOM_ID,
|
6 | 6 | PUBLIC_FATHOM_URL,
|
|
12 | 12 | import '../app.css';
|
13 | 13 | import '../prism.css';
|
14 | 14 |
|
15 |
| - export let data; |
| 15 | + let { data, children } = $props(); |
16 | 16 |
|
17 | 17 | onMount(() => {
|
18 | 18 | Fathom.load(PUBLIC_FATHOM_ID, {
|
19 | 19 | url: PUBLIC_FATHOM_URL,
|
20 | 20 | });
|
21 | 21 | });
|
22 | 22 |
|
23 |
| - $: $page.url.pathname, browser && Fathom.trackPageview(); |
| 23 | + $effect(() => { |
| 24 | + page.url.pathname, browser && Fathom.trackPageview(); |
| 25 | + }); |
24 | 26 | </script>
|
25 | 27 |
|
26 | 28 | <header class="text-right">
|
|
31 | 33 | <div class="flex-none items-center">
|
32 | 34 | <a
|
33 | 35 | aria-label="Github"
|
34 |
| - on:click={() => |
35 |
| - Fathom.trackEvent(`GitHub project link click`)} |
| 36 | + onclick={() => Fathom.trackEvent(`GitHub project link click`)} |
36 | 37 | target="_blank"
|
37 | 38 | href="https://github.com/spences10/sveltekit-embed"
|
38 | 39 | rel="noopener noreferrer"
|
|
71 | 72 | {/if}
|
72 | 73 |
|
73 | 74 | <main class="prose prose-xl container mx-auto mb-20 max-w-3xl px-4">
|
74 |
| - <slot /> |
| 75 | + {@render children?.()} |
75 | 76 | </main>
|
76 | 77 |
|
77 | 78 | <footer
|
78 |
| - class="footer footer-center bg-primary text-primary-content p-10" |
| 79 | + class="footer footer-horizontal footer-center bg-primary text-primary-content p-10" |
79 | 80 | >
|
80 | 81 | <div class="text-xl">
|
81 | 82 | <img
|
|
87 | 88 | Made with <span role="img" aria-label="red heart">❤️</span> by
|
88 | 89 | <a
|
89 | 90 | class="link hover:text-secondary transition"
|
90 |
| - on:click={() => Fathom.trackEvent(`scottspence.com click`)} |
| 91 | + onclick={() => Fathom.trackEvent(`scottspence.com click`)} |
91 | 92 | href="https://scottspence.com"
|
92 | 93 | target="_blank"
|
93 | 94 | rel="noopener noreferrer"
|
|
105 | 106 | <div class="grid grid-flow-col gap-4">
|
106 | 107 | <a
|
107 | 108 | aria-label="Twitter"
|
108 |
| - on:click={() => Fathom.trackEvent(`spences10 Twitter click`)} |
| 109 | + onclick={() => Fathom.trackEvent(`spences10 Twitter click`)} |
109 | 110 | target="_blank"
|
110 | 111 | rel="noopener noreferrer"
|
111 | 112 | href="https://twitter.com/spences10"
|
|
114 | 115 | </a>
|
115 | 116 | <a
|
116 | 117 | aria-label="GitHub"
|
117 |
| - on:click={() => |
| 118 | + onclick={() => |
118 | 119 | Fathom.trackEvent(`spences10 GitHub link click`)}
|
119 | 120 | target="_blank"
|
120 | 121 | rel="noopener noreferrer"
|
|
124 | 125 | </a>
|
125 | 126 | <a
|
126 | 127 | aria-label="YouTube"
|
127 |
| - on:click={() => Fathom.trackEvent(`spences10 YouTube click`)} |
| 128 | + onclick={() => Fathom.trackEvent(`spences10 YouTube click`)} |
128 | 129 | target="_blank"
|
129 | 130 | rel="noopener noreferrer"
|
130 | 131 | href="https://ss10/yt"
|
|
0 commit comments