diff options
feat: new things
Diffstat (limited to 'src/routes/+page.svelte')
-rw-r--r-- | src/routes/+page.svelte | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 701132b..dd06561 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -30,7 +30,21 @@ const lanLeastSignificantIPPart = Math.floor(Math.random() * 253 + 2); - let isScripted = false; + let { + skipAnimation = false, + }: { + skipAnimation?: boolean; + } = $props(); + onMount(() => { + const skipParam = new Boolean( + (new URLSearchParams(location.search).get("skip-animation") ?? "false") || + "true", + ); + if (skipParam) skipAnimation = skipParam.valueOf(); + if (skipAnimation) window.history.pushState({}, "", "/skip-animation"); + }); + + let isScripted = $state(false); onMount(() => (isScripted = true)); onDestroy(() => (isScripted = false)); </script> @@ -110,9 +124,9 @@ {/if} {:else} <span - on:click={() => + onclick={() => typeof section.url !== "function" ? void 0 : section.url(line)} - on:keypress={() => + onkeypress={() => typeof section.url !== "function" ? void 0 : section.url(line)} role="link" tabindex="0">{@render ttyTextInnerRenderer(section)}</span @@ -150,7 +164,11 @@ {/each} </div> -<div class="fixed top-0 left-0 w-screen h-screen font-mono" id="app"> +<div + class="fixed top-0 left-0 w-screen h-screen font-mono" + id="app" + class:skip-animation={skipAnimation} +> <div id="bios" class="flex flex-col items-center justify-between relative font-bios text-lg" |