animations are now skippable yay
This commit is contained in:
parent
08d04f2667
commit
556e471281
3 changed files with 44 additions and 7 deletions
|
|
@ -139,6 +139,16 @@ main {
|
||||||
position: fixed
|
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 {
|
.loading > p:first-child {
|
||||||
animation: 1s 1 linear appear;
|
animation: 1s 1 linear appear;
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
|
|
|
||||||
26
assets/main.js
Normal file
26
assets/main.js
Normal file
|
|
@ -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();
|
||||||
|
}
|
||||||
15
index.html
15
index.html
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en" class="skip">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
@ -10,17 +10,17 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="loading">
|
<div class="loading">
|
||||||
<p>Connecting.</p>
|
<p class="skip">Connecting.</p>
|
||||||
<p>Connecting..</p>
|
<p class="skip">Connecting..</p>
|
||||||
<p>Connecting...</p>
|
<p class="skip">Connecting...</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="splash splash-1">│. .
|
<div class="splash splash-1">│. .
|
||||||
│ ├┐ ─┐/┌┐┌┐┌ ├ ├┐┌┐ ─┐/ ─┐ ┌─┐ ╷
|
│ ├┐ ─┐/┌┐┌┐┌ ├ ├┐┌┐ ─┐/ ─┐ ┌─┐ ╷
|
||||||
││││││ │ ││││└┐│ │││││ │ ││┌┘ ╵ └─┘
|
││││││ │ ││││└┐│ │││││ │ ││┌┘ ╵ └─┘
|
||||||
└ └┘/└─├┘└┘─┘└─ └┤./└─└┤└─
|
└ └┘/└─├┘└┘─┘└─ └┤./└─└┤└─
|
||||||
┘ ┘ </div>
|
┘ ┘ </div>
|
||||||
<div class="nojs"><main>
|
<div class="nojs skip"><main>
|
||||||
<span class="title nojs">Linuxposting Tilde</span>
|
<span class="title nojs skip">Linuxposting Tilde</span>
|
||||||
<div class="ascii ascii-1">\ * __ * __ _
|
<div class="ascii ascii-1">\ * __ * __ _
|
||||||
\ \ \_ \ \ \| ,_ ,_ \_ \- \ \_ ,-\ \|\ \ _\ / \_/
|
\ \ \_ \ \ \| ,_ ,_ \_ \- \ \_ ,-\ \|\ \ _\ / \_/
|
||||||
\_ \ \\ \_\ |\ \_\ \_\ _\ \_ \ \\ \_\ *|\ \_\ \__
|
\_ \ \\ \_\ |\ \_\ \_\ _\ \_ \ \\ \_\ *|\ \_\ \__
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
<li><a href="https://element.linuxposting.xyz">Element</a></li>
|
<li><a href="https://element.linuxposting.xyz">Element</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</main></div>
|
</main></div>
|
||||||
<span class="credit"><a href="https://girlkissing.tips">site by Magdalunaa :3</a></span>
|
<span class="credit skip"><a href="https://girlkissing.tips">site by Magdalunaa :3</a></span>
|
||||||
</body>
|
</body>
|
||||||
|
<script src="/assets/main.js"></script>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue