toggleable crt effect (accessibility)! (also better mobile support)

This commit is contained in:
ari melody 2023-10-15 04:23:53 +01:00
parent a2eec46ae4
commit 0369773a6e
Signed by: ari
GPG key ID: CF99829C92678188
7 changed files with 113 additions and 21 deletions

View file

@ -1,20 +1,3 @@
document.addEventListener("DOMContentLoaded", () => {
[...document.querySelectorAll("h1, h2, h3, h4, h5, h6")]
.filter((e) => e.innerText != "")
.forEach((e) => {
type_out(e);
});
[...document.querySelectorAll("ol, ul")]
.filter((e) => e.innerText != "")
.forEach((e) => {
fill_list(e);
});
setTimeout(() => {
document.querySelector("footer").style.display = "none";
document.querySelector("footer").style.display = null;
}, 1000);
});
function type_out(e) {
const text = e.innerText;
const original = e.innerHTML;
@ -57,3 +40,15 @@ function fill_list(list) {
item.style.animationPlayState = "playing";
});
}
[...document.querySelectorAll("h1, h2, h3, h4, h5, h6")]
.filter((e) => e.innerText != "")
.forEach((e) => {
type_out(e);
});
[...document.querySelectorAll("ol, ul")]
.filter((e) => e.innerText != "")
.forEach((e) => {
fill_list(e);
});