66 lines
1,020 B
Svelte
66 lines
1,020 B
Svelte
<script>
|
|
import Header from './Header.svelte';
|
|
import './styles.css';
|
|
import { onNavigate } from '$app/navigation';
|
|
|
|
onNavigate((navigation) => {
|
|
// @ts-ignore
|
|
if (!document.startViewTransition) return;
|
|
|
|
return new Promise((resolve) => {
|
|
// @ts-ignore
|
|
document.startViewTransition(async () => {
|
|
resolve();
|
|
await navigation.complete;
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<div class="app">
|
|
|
|
<main>
|
|
<slot />
|
|
<footer>
|
|
© 2024 Aleks Rūtiņš
|
|
</footer>
|
|
</main>
|
|
</div>
|
|
|
|
<style>
|
|
.app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
main {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 1rem;
|
|
width: 100%;
|
|
max-width: 64rem;
|
|
margin: 0 auto;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
footer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 12px;
|
|
margin-top: 25px;
|
|
border-top: 1px solid var(--color-text);
|
|
}
|
|
|
|
footer a {
|
|
font-weight: bold;
|
|
}
|
|
|
|
@media (min-width: 480px) {
|
|
footer {
|
|
padding: 12px 0;
|
|
}
|
|
}
|
|
</style>
|