mirror of
https://git.kh3group.com/georgebiri/kh3_website.git
synced 2026-10-16 23:31:47 +00:00
All checks were successful
continuous-integration/drone/push Build is passing
17 lines
662 B
JavaScript
17 lines
662 B
JavaScript
// Loading screen functionality
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
// Loading screen with improved timing
|
|
window.addEventListener("load", () => {
|
|
const loadingScreen = document.getElementById("loadingScreen");
|
|
if (loadingScreen) {
|
|
// Show loading screen briefly, then fade out just before animations start
|
|
setTimeout(() => {
|
|
loadingScreen.style.transition = "opacity 0.3s ease-out";
|
|
loadingScreen.style.opacity = "0";
|
|
setTimeout(() => {
|
|
loadingScreen.style.display = "none";
|
|
}, 300);
|
|
}, 400); // Reduced from 1000ms to 400ms to sync with animations
|
|
}
|
|
});
|
|
});
|