35 lines
818 B
Svelte
35 lines
818 B
Svelte
<script lang="ts">
|
|
import { onMount, tick } from 'svelte';
|
|
import { afterNavigate } from '$app/navigation';
|
|
import { initScroll, destroyScroll } from '$lib/lib/locomotive';
|
|
import Theme from '$lib/components/Theme/Theme.svelte';
|
|
import SiteHeader from '$lib/components/SiteHeader/SiteHeader.svelte';
|
|
import SiteFooter from '$lib/components/SiteFooter/SiteFooter.svelte';
|
|
import '$lib/scss/main.scss';
|
|
|
|
let { children } = $props();
|
|
|
|
onMount(() => {
|
|
initScroll();
|
|
return destroyScroll;
|
|
});
|
|
|
|
afterNavigate(async () => {
|
|
await tick();
|
|
initScroll();
|
|
});
|
|
</script>
|
|
|
|
<Theme base="dark">
|
|
<SiteHeader />
|
|
<div id="main-content" class="site-content">
|
|
{@render children()}
|
|
</div>
|
|
<SiteFooter />
|
|
</Theme>
|
|
|
|
<style lang="scss">
|
|
.site-content {
|
|
min-height: 70vh;
|
|
}
|
|
</style>
|