another small fix
This commit is contained in:
parent
cbb1da50df
commit
0d4d348979
@ -62,3 +62,11 @@ body {
|
||||
animation-timing-function: linear;
|
||||
animation-duration: 1s;
|
||||
}
|
||||
|
||||
.rh-screen {
|
||||
height: calc(100 * var(--vh));
|
||||
}
|
||||
|
||||
.min-rh-screen {
|
||||
min-height: calc(100 * var(--vh));
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<body data-sveltekit-preload-data="hover" style="--vh: 1vh">
|
||||
<div id="root" style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -42,7 +42,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="h-screen p-4 flex flex-col items-center">
|
||||
<div class="rh-screen p-4 flex flex-col items-center">
|
||||
<div class="shrink-0">
|
||||
<input type="date"
|
||||
class="px-4 py-2 rounded-full bg-white min-w-0"
|
||||
|
@ -107,8 +107,8 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="min-h-screen">
|
||||
<div class="h-screen p-4 min-h-0 grid place-items-center">
|
||||
<div class="min-rh-screen">
|
||||
<div class="rh-screen p-4 min-h-0 grid place-items-center">
|
||||
<video
|
||||
autoplay muted bind:this={video}
|
||||
class="opacity-0 h-full w-full min-h-0 max-w-[70vh] object-cover rounded-[40px] bg-[#303030] fade-in"
|
||||
|
@ -1,5 +1,15 @@
|
||||
<script>
|
||||
import { onMount } from "svelte";
|
||||
import "../app.css";
|
||||
|
||||
onMount(() => {
|
||||
if (typeof window !== 'object') return;
|
||||
|
||||
document.body.style.setProperty('--vh', `${window.innerHeight * 0.01}px`);
|
||||
window.addEventListener('resize', () => {
|
||||
document.body.style.setProperty('--vh', `${window.innerHeight * 0.01}px`);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<slot />
|
||||
|
@ -11,7 +11,9 @@ const config = {
|
||||
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
||||
adapter: adapter()
|
||||
adapter: adapter({
|
||||
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user