Closed ipr17 closed 4 months ago
@daniel
Modified the javascript, and parts of the html and css, for the splash to keep track of session storage so that it is only run once per session.
document.addEventListener("DOMContentLoaded", (e) => { const splash = document.querySelector(".splash"); console.log(window.location.pathname); if (sessionStorage.getItem("splashScreenSeen") === null) { if ( window.location.pathname === "/" || window.location.pathname === "/home" ) { splash.classList.remove("invis"); // Lock scrolling document.body.style.overflow = "hidden"; if (splash) { jumbleText(); setTimeout(() => { splash.classList.add("hideSplash"); document.body.style.overflow = "auto"; }, 3500); } } sessionStorage.setItem("splashScreenSeen", "true"); } });
.splash.invis { display: none; }
We need to limit it so that the opening animation is only viewed by each user once