From 556e47128177bd068d3d5ad66d9aa8cd2823fc4f Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 14 Nov 2025 22:16:40 -0300 Subject: [PATCH] animations are now skippable yay --- assets/base.css | 10 ++++++++++ assets/main.js | 26 ++++++++++++++++++++++++++ index.html | 15 ++++++++------- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 assets/main.js diff --git a/assets/base.css b/assets/base.css index fb98295..3a8968e 100644 --- a/assets/base.css +++ b/assets/base.css @@ -139,6 +139,16 @@ main { position: fixed } +.skip-animation { + animation: 4.5s 1 linear appear; + visibility: hidden; + position: fixed; + width: 100vw; + height: 100vh; + top: 0; + left: 0; +} + .loading > p:first-child { animation: 1s 1 linear appear; animation-fill-mode: forwards; diff --git a/assets/main.js b/assets/main.js new file mode 100644 index 0000000..54c9b7c --- /dev/null +++ b/assets/main.js @@ -0,0 +1,26 @@ +let stylesheet + +window.addEventListener("load", () => { + stylesheet = document.styleSheets[0]; + + let skipNode = document.createElement("div"); + skipNode.setAttribute("class", "skip-animation"); + skipNode.setAttribute("onclick", "skipAnimation()"); + document.body.appendChild(skipNode); +}); + +function skipAnimation() { + for (let node of document.getElementsByClassName("skip")) { + const animations = node.getAnimations(); + for (let anim of animations) { + anim.finish(); + } + } + for (let node of document.getElementsByClassName("splash")) { + const animations = node.getAnimations(); + for (let anim of animations) { + anim.finish(); + } + } + document.getElementsByClassName("skip-animation")[0].remove(); +} \ No newline at end of file diff --git a/index.html b/index.html index 688dd97..aa0a31d 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -10,17 +10,17 @@
-

Connecting.

-

Connecting..

-

Connecting...

+

Connecting.

+

Connecting..

+

Connecting...

│. . │ ├┐ ─┐/┌┐┌┐┌ ├ ├┐┌┐ ─┐/ ─┐ ┌─┐ ╷ ││││││ │ ││││└┐│ │││││ │ ││┌┘ ╵ └─┘ └ └┘/└─├┘└┘─┘└─ └┤./└─└┤└─ ┘ ┘
-
- Linuxposting Tilde + - site by Magdalunaa :3 + site by Magdalunaa :3 + \ No newline at end of file