⚠️ Rework completely how transitions works
- Use Svelte/Sapper native if and transitions to show either the page content or the loader, then load each page animationIn - Code is safe on SSR side, using process.browser on this if - The <main> element is on position absolute to fade nicely the different pages - Code cleaning
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
export let href = '#'
|
||||
export let type = 'a'
|
||||
export let text = ''
|
||||
export let noScroll = null
|
||||
</script>
|
||||
|
||||
{#if type === 'button'}
|
||||
@@ -14,7 +13,7 @@
|
||||
</button>
|
||||
|
||||
{:else}
|
||||
<a {href} class={$$props.class ? $$props.class : 'button'} sapper-noscroll={noScroll} on:click>
|
||||
<a {href} class={$$props.class ? $$props.class : 'button'} on:click>
|
||||
<slot></slot>
|
||||
<div class="text" data-text={text}>
|
||||
<span>{text}</span>
|
||||
|
||||
Reference in New Issue
Block a user