I use nuxt and I followed this guide to make custom loading component: https://nuxtjs.org/api/configuration-loading/#use-a-custom-loading-component
This does work, but the loader is in the same position as the original nuxt loader bar:
You can see, I really added a very big and very simple loader with a red div.
At the bottom you can see my headebar (black bar with letter «s») so everything is moved downwards.
What I would like to achieve is that the loader takes the position of the page content instead to keep the header and the footer in place. Right now, it all shifts down to make space for the custom loader on top.
Is there a solution for that? Thanks in advance
Cheers
J
Well I built a big workaround:
I set a loading component in my nuxt.config:
This component should never display anything, but has these two methods:
With those I mutate the vuex ui store.
nuxtLoader: false,
<=>nuxtLoader: true,
Within this store I set a getter:
And on my layouts I display
<nuxt />
or theCustomLoader
component (which holds an animated SVG) depending on the ui storenuxtLoader
property.Now I give the user a feedback with a custom loader placed between headerbar and footer.