part of skeleton

This commit is contained in:
Jonas_Jones 2024-06-07 00:26:22 +02:00
parent b550b19aae
commit 68f6de3e11
24 changed files with 2375 additions and 119 deletions

40
src/App.svelte Normal file
View file

@ -0,0 +1,40 @@
<script>
import Router from 'svelte-spa-router';
import routes from './routes';
import Title from './components/Title.svelte';
import Navbar from './components/Navbar.svelte';
import { onMount } from 'svelte';
let showTitle = true;
function handleScroll() {
if (window.scrollY > 50) {
showTitle = false;
} else {
showTitle = true;
}
}
onMount(() => {
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
});
</script>
<Title visible={showTitle} />
<Navbar />
<main>
<div class="content">
<Router {routes} />
</div>
</main>
<style>
@media (min-width: 640px) {
main {
max-width: none;
}
}
</style>