diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-24 13:35:33 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-24 13:35:33 +0200 |
commit | c1afcdc0dc4e59cb2ce1e8c65b69c5647f2132f3 (patch) | |
tree | 06670586f560c218be76f5ad6762462ca3353b88 /web | |
parent | ad97c49b7a66067d8609af62177942bdfa6abc3e (diff) | |
download | jellything-c1afcdc0dc4e59cb2ce1e8c65b69c5647f2132f3.tar jellything-c1afcdc0dc4e59cb2ce1e8c65b69c5647f2132f3.tar.bz2 jellything-c1afcdc0dc4e59cb2ce1e8c65b69c5647f2132f3.tar.zst |
show spinner placeholder
Diffstat (limited to 'web')
-rw-r--r-- | web/js-transition.css | 9 | ||||
-rw-r--r-- | web/script/transition.ts | 3 |
2 files changed, 12 insertions, 0 deletions
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<void>(res => { setTimeout(() => { if (dir) document.body.removeChild(overlay) + setTimeout(() => { + overlay.append(e("div", { class: "jst-spinner" }, "Spinner goes here...")) + }, 500) res() }, duration) }) |