mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 02:53:51 +00:00
mobile optimizations
This commit is contained in:
@@ -49,6 +49,17 @@ const ogImage = "https://timmypidashev.dev/og-image.jpg";
|
|||||||
</style>
|
</style>
|
||||||
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
||||||
<script is:inline set:html={ANIMATION_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>
|
</head>
|
||||||
<body class="bg-background text-foreground min-h-screen flex flex-col">
|
<body class="bg-background text-foreground min-h-screen flex flex-col">
|
||||||
<Header client:load />
|
<Header client:load />
|
||||||
|
|||||||
@@ -38,8 +38,27 @@ const ogImage = "https://timmypidashev.dev/og-image.jpg";
|
|||||||
<link rel="icon" type="image/jpeg" href="/me.jpeg" />
|
<link rel="icon" type="image/jpeg" href="/me.jpeg" />
|
||||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
<ClientRouter />
|
<ClientRouter />
|
||||||
|
<style>
|
||||||
|
::view-transition-new(:root) {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
::view-transition-old(:root) {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
||||||
<script is:inline set:html={ANIMATION_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>
|
</head>
|
||||||
<body class="bg-background text-foreground overflow-hidden h-screen">
|
<body class="bg-background text-foreground overflow-hidden h-screen">
|
||||||
<Header client:load transparent />
|
<Header client:load transparent />
|
||||||
|
|||||||
@@ -49,6 +49,17 @@ const ogImage = "https://timmypidashev.dev/og-image.jpg";
|
|||||||
</style>
|
</style>
|
||||||
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
||||||
<script is:inline set:html={ANIMATION_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>
|
</head>
|
||||||
<body class="bg-background text-foreground min-h-screen flex flex-col">
|
<body class="bg-background text-foreground min-h-screen flex flex-col">
|
||||||
<main class="flex-1 flex flex-col">
|
<main class="flex-1 flex flex-col">
|
||||||
|
|||||||
Reference in New Issue
Block a user