From c1afcdc0dc4e59cb2ce1e8c65b69c5647f2132f3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 24 Oct 2023 13:35:33 +0200 Subject: show spinner placeholder --- web/js-transition.css | 9 +++++++++ web/script/transition.ts | 3 +++ 2 files changed, 12 insertions(+) (limited to 'web') diff --git a/web/js-transition.css b/web/js-transition.css index 56a891e..dbb80f0 100644 --- a/web/js-transition.css +++ b/web/js-transition.css @@ -32,6 +32,15 @@ font-size: large; z-index: 11; } +.jst-spinner { + position: fixed; + top: 50vh; + left: 50vw; + transform: translate(-50%, -50%); + color: rgb(252, 255, 78); + font-size: large; + z-index: 11; +} nav { z-index: 11; } diff --git a/web/script/transition.ts b/web/script/transition.ts index e0ee6f5..426b593 100644 --- a/web/script/transition.ts +++ b/web/script/transition.ts @@ -74,6 +74,9 @@ function fade(dir: boolean) { return new Promise(res => { setTimeout(() => { if (dir) document.body.removeChild(overlay) + setTimeout(() => { + overlay.append(e("div", { class: "jst-spinner" }, "Spinner goes here...")) + }, 500) res() }, duration) }) -- cgit v1.2.3-70-g09d2