FIX: Remove splash screen in no-js view (#17223)

We use javascript to remove the splash screen when the site boots up. If the user has js disabled, they get stuck on the splash screen.

If the user has js disabled. We don't show the splash screen at all.
This commit is contained in:
Joe 2022-06-24 09:25:10 +08:00 committed by GitHub
parent 801750ffc4
commit 5257cae1b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<style> <style>
html { html {
background: var(--secondary); background: var(--secondary);
overflow: hidden !important; overflow-y: hidden !important;
} }
#d-splash { #d-splash {
@ -29,6 +29,7 @@
animation: fade-in 0.5s ease-in-out; animation: fade-in 0.5s ease-in-out;
animation-delay: 2.5s; animation-delay: 2.5s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
color: var(--primary);
} }
#d-splash .preloader-text:after { #d-splash .preloader-text:after {
@ -79,5 +80,17 @@
<div class="preloader-text"> <div class="preloader-text">
<span> <%= I18n.t("js.preloader_text") %> </span> <span> <%= I18n.t("js.preloader_text") %> </span>
</div> </div>
<noscript>
<style>
html {
overflow-y: initial !important;
}
#d-splash {
display: none;
}
</style>
</noscript>
</section> </section>
<%- end %> <%- end %>