Put wait cursor globally when page is loading
don't use a div over everything as it interacts with the current hover state of elements instead force a cursor on every element in body when the body has a loading class
This commit is contained in:
@@ -43,6 +43,9 @@
|
||||
$previousPage = from.url.pathname
|
||||
})
|
||||
|
||||
// Define page loading
|
||||
$: browser && document.body.classList.toggle('is-loading', $pageLoading)
|
||||
|
||||
|
||||
onMount(() => {
|
||||
// Avoid FOUC
|
||||
@@ -69,10 +72,6 @@
|
||||
<Footer />
|
||||
{/if}
|
||||
|
||||
{#if $pageLoading}
|
||||
<div class="page-loading" />
|
||||
{/if}
|
||||
|
||||
<SVGSprite />
|
||||
<SmoothScroll />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user