Add a pre-loading screen cover

This matches the loader color and exists to prevent a flash of unstyled
content when the page first loads and JS has not yet run.
This commit is contained in:
valadaptive 2023-12-14 22:05:16 -05:00
parent 332ab81524
commit 7897206cf8
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#loader {
#loader, #preloader {
position: fixed;
margin: 0;
padding: 0;
@ -22,4 +22,4 @@
#load-spinner {
transition: all 300ms ease-out;
opacity: 1;
}
}

View File

@ -91,6 +91,7 @@
</head>
<body class="no-blur">
<div id="preloader"></div>
<div id="bg_custom"></div>
<div id="bg1"></div>
<div id="character_context_menu" class="hidden">

View File

@ -266,8 +266,9 @@ export {
countOccurrences,
};
// Cohee: Uncomment when we decide to use loader
showLoader();
// Yoink preloader entirely; it only exists to cover up unstyled content while loading JS
document.getElementById('preloader').remove();
// Allow target="_blank" in links
DOMPurify.addHook('afterSanitizeAttributes', function (node) {