Use PageTransition component on every route
- Scrolls back to top when mounting new page with a timeout of the delay - Rename photo Viewer class - Change Shop posters section text from p to label
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
import '$utils/polyfills'
|
||||
// Components
|
||||
import SVGSprite from '$components/SVGSprite.svelte'
|
||||
import PageTransition from '$components/PageTransition.svelte'
|
||||
import Switcher from '$components/molecules/Switcher.svelte'
|
||||
import Footer from '$components/organisms/Footer.svelte'
|
||||
|
||||
@@ -41,14 +40,6 @@
|
||||
setTimeout(() => {
|
||||
$pageLoading = false
|
||||
}, DURATION.PAGE_IN * 1.25)
|
||||
|
||||
// Scroll back to top between page transitions
|
||||
setTimeout(() => {
|
||||
// Disable scroll when changing filters on /photos and shop?
|
||||
if (!$page.query.get('country') && !$page.path.includes('/shop/poster')) {
|
||||
scrollToTop()
|
||||
}
|
||||
}, DURATION.PAGE_OUT + 1)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -60,9 +51,7 @@
|
||||
|
||||
<Switcher isOver={!!$page.params.location && !!$page.params.photo} />
|
||||
|
||||
<PageTransition path={$page.path}>
|
||||
<slot />
|
||||
</PageTransition>
|
||||
<slot />
|
||||
|
||||
{#if !$page.params.photo}
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user