Skip to content

Commit

Permalink
take two
Browse files Browse the repository at this point in the history
  • Loading branch information
mallsoft committed Oct 17, 2024
1 parent 0908a7f commit ef8a60d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-prefetch>
<body data-sveltekit-prefetch style="opacity: 0">
<div id="mallsoftapp" style="display: contents">%sveltekit.body%</div>
</body>
</html>
14 changes: 14 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
import '@fontsource/space-grotesk';
import '../app.css';
import Meta from '$lib/components/layout/Meta.svelte';
import { onMount } from 'svelte';
onMount(() => {
document.body.style.transition = 'opacity 0.2s';
document.body.style.opacity = '1';
});
</script>

<Meta />

<slot />

<noscript>
<style>
body {
opacity: 1 !important;
}
</style>
</noscript>

0 comments on commit ef8a60d

Please sign in to comment.