diff --git a/app/assets/javascripts/discourse/app/app.js b/app/assets/javascripts/discourse/app/app.js index 5d620caf85d..3ff0205cccc 100644 --- a/app/assets/javascripts/discourse/app/app.js +++ b/app/assets/javascripts/discourse/app/app.js @@ -52,9 +52,6 @@ const Discourse = Application.extend({ start() { document.querySelector("noscript")?.remove(); - // The app booted. Remove the splash screen - document.querySelector("#d-splash")?.remove(); - if (Error.stackTraceLimit) { // We need Errors to have full stack traces for `lib/source-identifier` Error.stackTraceLimit = Infinity; @@ -84,6 +81,9 @@ const Discourse = Application.extend({ initialize: () => withPluginApi(cb.version, cb.code), }); }); + + // The app booted. Remove the splash screen + document.querySelector("#d-splash")?.remove(); }, _registerPluginCode(version, code) { diff --git a/app/assets/stylesheets/d_splash.scss b/app/assets/stylesheets/d_splash.scss deleted file mode 100644 index c56c915f936..00000000000 --- a/app/assets/stylesheets/d_splash.scss +++ /dev/null @@ -1,59 +0,0 @@ -html { - background: var(--secondary); - // needed because this sheet loads early and we want no scroll bars until - // the splash is removed. - overflow: hidden !important; -} - -#d-splash { - display: grid; - place-items: center; - position: relative; - backface-visibility: hidden; - - .preloader-image { - max-width: 100%; - height: 100vh; - object-fit: none; - } - - .preloader-text { - padding-top: 5em; - position: absolute; - display: grid; - grid-auto-flow: column; - place-items: center; - - &:after { - animation: loading-text 3s infinite; - content: ""; - position: absolute; - top: 5em; - margin: 0 0.1em; - left: 100%; - // TODO: this needs R2 RTL magic - .rtl & { - left: 0; - right: 100%; - } - } - } -} - -@keyframes loading-text { - 0% { - content: ""; - } - - 25% { - content: "."; - } - - 50% { - content: ".."; - } - - 75% { - content: "..."; - } -} diff --git a/app/views/common/_discourse_splash.html.erb b/app/views/common/_discourse_splash.html.erb index e48c75e1ef3..5e6fe84ea01 100644 --- a/app/views/common/_discourse_splash.html.erb +++ b/app/views/common/_discourse_splash.html.erb @@ -1,17 +1,83 @@ <%- unless customization_disabled? %> -
- <%= discourse_stylesheet_link_tag 'd_splash', theme_id: nil %> +
+ + + <%=SiteSetting.title%> + +
+ <%= I18n.t("js.preloader_text") %> +
+
<%- end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index abbca6bb2b3..969c68a5428 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,10 +9,6 @@ <%= render partial: "layouts/head" %> <%= discourse_csrf_tags %> - <%- if include_splash_screen? %> - - <%- end %> - <%- if SiteSetting.enable_escaped_fragments? %> <%- end %> diff --git a/public/images/preloader.svg b/public/images/preloader.svg index b2088cee5e4..fe22441d17c 100644 --- a/public/images/preloader.svg +++ b/public/images/preloader.svg @@ -1,9 +1,8 @@ - - - - - + + + + +