diff --git a/lib/app/views/loading/chasing-dots.html b/lib/app/views/loading/chasing-dots.html index 7b9db40240..174ab14593 100644 --- a/lib/app/views/loading/chasing-dots.html +++ b/lib/app/views/loading/chasing-dots.html @@ -65,4 +65,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/circle.html b/lib/app/views/loading/circle.html index d03338274e..45dfb0ea7a 100644 --- a/lib/app/views/loading/circle.html +++ b/lib/app/views/loading/circle.html @@ -148,4 +148,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/cube-grid.html b/lib/app/views/loading/cube-grid.html index b8c4d754b8..2343511cbc 100644 --- a/lib/app/views/loading/cube-grid.html +++ b/lib/app/views/loading/cube-grid.html @@ -85,4 +85,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/default.html b/lib/app/views/loading/default.html new file mode 100644 index 0000000000..804c7af0b0 --- /dev/null +++ b/lib/app/views/loading/default.html @@ -0,0 +1,59 @@ + + +
<%= options.loading %>
+ +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/default2.html b/lib/app/views/loading/default2.html new file mode 100644 index 0000000000..01f8de1246 --- /dev/null +++ b/lib/app/views/loading/default2.html @@ -0,0 +1,84 @@ + + +
<%= options.loading %>
+ +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/fading-circle.html b/lib/app/views/loading/fading-circle.html index 714186eee1..30e46945c6 100644 --- a/lib/app/views/loading/fading-circle.html +++ b/lib/app/views/loading/fading-circle.html @@ -162,4 +162,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/folding-cube.html b/lib/app/views/loading/folding-cube.html index ad54896702..17e46c1a5d 100644 --- a/lib/app/views/loading/folding-cube.html +++ b/lib/app/views/loading/folding-cube.html @@ -106,4 +106,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/pulse.html b/lib/app/views/loading/pulse.html index c5fa8ff4f0..4ba2366a20 100644 --- a/lib/app/views/loading/pulse.html +++ b/lib/app/views/loading/pulse.html @@ -46,4 +46,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/rectangle-bounce.html b/lib/app/views/loading/rectangle-bounce.html index 363b852743..332800ee90 100644 --- a/lib/app/views/loading/rectangle-bounce.html +++ b/lib/app/views/loading/rectangle-bounce.html @@ -72,4 +72,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/rotating-plane.html b/lib/app/views/loading/rotating-plane.html index 6d409a9297..275bb3c61c 100644 --- a/lib/app/views/loading/rotating-plane.html +++ b/lib/app/views/loading/rotating-plane.html @@ -42,4 +42,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/three-bounce.html b/lib/app/views/loading/three-bounce.html index cf24ac71c2..3cc3236f2a 100644 --- a/lib/app/views/loading/three-bounce.html +++ b/lib/app/views/loading/three-bounce.html @@ -59,4 +59,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/app/views/loading/wandering-cubes.html b/lib/app/views/loading/wandering-cubes.html index c3177a399f..2b90b03200 100644 --- a/lib/app/views/loading/wandering-cubes.html +++ b/lib/app/views/loading/wandering-cubes.html @@ -66,4 +66,4 @@ body, html, #__nuxt {
- +<%= options.dev ? '' : '' %> diff --git a/lib/common/nuxt.config.js b/lib/common/nuxt.config.js index 336c38470d..e42726842a 100644 --- a/lib/common/nuxt.config.js +++ b/lib/common/nuxt.config.js @@ -131,7 +131,7 @@ export default { duration: 5000, rtl: false }, - loadingIndicator: false, + loadingIndicator: 'default', transition: { name: 'page', mode: 'out-in', @@ -198,6 +198,7 @@ export default { editor: undefined, hooks: null, messages: { + loading: 'Loading...', error_404: 'This page could not be found', server_error: 'Server error', nuxtjs: 'Nuxt.js', diff --git a/lib/common/options.mjs b/lib/common/options.mjs index a5fc192226..fd17a635cf 100644 --- a/lib/common/options.mjs +++ b/lib/common/options.mjs @@ -113,9 +113,12 @@ Options.from = function (_options) { // Apply defaults options.loadingIndicator = Object.assign( { - name: 'pulse', - color: '#dbe1ec', - background: 'white' + name: 'default', + color: '#D3D3D3', + color2: '#F5F5F5', + background: 'white', + dev: options.dev, + loading: options.messages.loading }, options.loadingIndicator ) diff --git a/lib/core/renderer.mjs b/lib/core/renderer.mjs index 0bf1063201..1fb81ba8ff 100644 --- a/lib/core/renderer.mjs +++ b/lib/core/renderer.mjs @@ -101,10 +101,8 @@ export default class Renderer { const loadingHTMLPath = path.resolve(this.options.buildDir, 'loading.html') if (fs.existsSync(loadingHTMLPath)) { this.resources.loadingHTML = fs.readFileSync(loadingHTMLPath, 'utf8') - this.resources.loadingHTML = this.resources.loadingHTML.replace( - /[\r|\n]/g, - '' - ) + this.resources.loadingHTML = this.resources.loadingHTML + .replace(/\r|\n|[\t\s]{3,}/g, '') } else { this.resources.loadingHTML = '' }