⚠️ 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:
@@ -3,6 +3,8 @@
|
||||
import { stores } from '@sapper/app'
|
||||
import { currentLocation, fullscreen } from 'utils/store'
|
||||
import { getThumbnail, formatDate } from 'utils/functions'
|
||||
const dispatch = createEventDispatcher()
|
||||
const { page } = stores()
|
||||
|
||||
// Dependencies
|
||||
import SwipeListener from 'swipe-listener'
|
||||
@@ -15,13 +17,9 @@
|
||||
import Counter from 'atoms/Counter'
|
||||
import PaginationDots from 'molecules/PaginationDots'
|
||||
|
||||
// Props
|
||||
// Props and Variables
|
||||
export let photos
|
||||
export let viewer = false
|
||||
|
||||
// Variables
|
||||
const dispatch = createEventDispatcher()
|
||||
const { page } = stores()
|
||||
let scope
|
||||
let swiped
|
||||
let currentIndex = 0
|
||||
|
||||
Reference in New Issue
Block a user