⚠️ 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:
@@ -1,4 +1,3 @@
|
||||
// Svelte
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
// Define environment
|
||||
@@ -25,17 +24,14 @@ export let currentLocation = writable()
|
||||
export let currentPhotos = writable()
|
||||
|
||||
// State
|
||||
export let pageReady = writable(false)
|
||||
export const pageTransition = {
|
||||
onAnimationEnd () {}
|
||||
}
|
||||
export let pageReady = writable(false, () => {})
|
||||
export let firstLoad = writable(true)
|
||||
export let fullscreen = writable()
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Animation related
|
||||
========================================================================== */
|
||||
export const transitionDelay = 1400
|
||||
export const transitionNormal = 1400
|
||||
export const transitionLong = 1800
|
||||
export const transitionPanelIn = 700
|
||||
export const animDelay = 800
|
||||
export const animDuration = 1400
|
||||
export const animDurationLong = 1800
|
||||
|
||||
Reference in New Issue
Block a user