add: dev ticker

This commit is contained in:
moris 2024-12-15 20:02:19 +09:00
parent 164f97999e
commit d22b5cfc6f

View File

@ -3,6 +3,7 @@
import Header from "./header.svelte"; import Header from "./header.svelte";
import Footer from "./footer.svelte"; import Footer from "./footer.svelte";
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { dev } from '$app/environment'
let { children } = $props(); let { children } = $props();
@ -19,6 +20,9 @@
<div id="root"> <div id="root">
<div id="scroll"></div> <div id="scroll"></div>
{#if dev}
<div id='devTicker'>DEV DUILD</div>
{/if}
<div class="headerContainer"> <div class="headerContainer">
<header class:hide={!scrollObserver}> <header class:hide={!scrollObserver}>
@ -45,13 +49,23 @@
min-height: 100vh; min-height: 100vh;
} }
#devTicker {
position: fixed;
top: 0;
left: 0;
padding: 6px;
color: yellow;
background-color: #0008;
z-index: 10;
}
.headerContainer { .headerContainer {
position: sticky; position: sticky;
top: 0; top: 0;
height: 100px; height: 80px;
z-index: 1; z-index: 1;
@media(width<1000px) { @media(width<1000px) {
height: 50px; height: 40px;
} }
& header { & header {
@ -59,7 +73,7 @@
height: 100%; height: 100%;
transition: height .4s, transform .4s; transition: height .4s, transform .4s;
&.hide { &.hide {
height: 50px; height: 40px;
@media(width<1000px) { @media(width<1000px) {
transform: translate(0px,-50px); transform: translate(0px,-50px);
} }
@ -96,6 +110,6 @@
} }
@media (scripting: none) { @media (scripting: none) {
.headerContainer{height:50px !important;} .headerContainer{height:40px !important;}
} }
</style> </style>