mobile optimizations

This commit is contained in:
2026-04-06 14:15:26 -07:00
parent 14f9ef3ffd
commit dc7ca40b9b
3 changed files with 42 additions and 1 deletions

View File

@@ -49,6 +49,17 @@ const ogImage = "https://timmypidashev.dev/og-image.jpg";
</style>
<script is:inline set:html={THEME_LOADER_SCRIPT} />
<script is:inline set:html={ANIMATION_LOADER_SCRIPT} />
<script>
document.addEventListener('astro:before-swap', (e) => {
// Instantly hide old page to prevent flash
document.documentElement.style.opacity = '0';
});
document.addEventListener('astro:after-swap', () => {
// Show new page immediately
document.documentElement.style.opacity = '1';
});
</script>
</head>
<body class="bg-background text-foreground min-h-screen flex flex-col">
<Header client:load />