refactor: use global page transition in main layout
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import { page } from '$app/stores'
|
|
||||||
import { afterUpdate } from 'svelte'
|
|
||||||
import { fade } from 'svelte/transition'
|
|
||||||
import { scrollToTop } from 'utils/scroll'
|
|
||||||
import { pageLoading } from '$utils/stores'
|
|
||||||
import { DELAY, DURATION } from '$utils/constants'
|
|
||||||
|
|
||||||
let loadingTimeout: ReturnType<typeof setTimeout> | number = null
|
|
||||||
|
|
||||||
$: doNotScroll = !$page.url.searchParams.get('country') && !$page.url.pathname.includes('/shop/')
|
|
||||||
|
|
||||||
// Hide page loading indicator on page update
|
|
||||||
afterUpdate(() => {
|
|
||||||
clearTimeout(loadingTimeout)
|
|
||||||
loadingTimeout = setTimeout(() => $pageLoading = false, DURATION.PAGE_IN)
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="page"
|
|
||||||
in:fade={{ duration: DURATION.PAGE_IN, delay: DELAY.PAGE_LOADING }}
|
|
||||||
out:fade={{ duration: DURATION.PAGE_OUT }}
|
|
||||||
on:outrostart={() => {
|
|
||||||
// Show page loading indicator
|
|
||||||
$pageLoading = true
|
|
||||||
}}
|
|
||||||
on:outroend={() => {
|
|
||||||
// Scroll back to top
|
|
||||||
doNotScroll && requestAnimationFrame(() => scrollToTop())
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<slot />
|
|
||||||
</div>
|
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import ShopHeader from '$components/organisms/ShopBanner.svelte'
|
import ShopHeader from '$components/organisms/ShopBanner.svelte'
|
||||||
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
||||||
|
|
||||||
@@ -25,8 +24,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="shop-page">
|
||||||
<main class="shop-page">
|
|
||||||
<ShopHeader />
|
<ShopHeader />
|
||||||
|
|
||||||
<section class="shop-page__error">
|
<section class="shop-page__error">
|
||||||
@@ -39,5 +37,4 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<PostersGrid {posters} />
|
<PostersGrid {posters} />
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
import { getAssetUrlKey } from '$utils/api'
|
import { getAssetUrlKey } from '$utils/api'
|
||||||
import { shopCurrentProductSlug } from '$utils/stores/shop'
|
import { shopCurrentProductSlug } from '$utils/stores/shop'
|
||||||
// Components
|
// Components
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
||||||
import ShopHeader from '$components/organisms/ShopBanner.svelte'
|
import ShopHeader from '$components/organisms/ShopBanner.svelte'
|
||||||
@@ -25,8 +24,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="shop-page">
|
||||||
<main class="shop-page">
|
|
||||||
<ShopHeader {product} />
|
<ShopHeader {product} />
|
||||||
|
|
||||||
<PosterLayout
|
<PosterLayout
|
||||||
@@ -35,5 +33,4 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<PostersGrid {posters} />
|
<PostersGrid {posters} />
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
import { shopCurrentProductSlug } from '$utils/stores/shop'
|
import { shopCurrentProductSlug } from '$utils/stores/shop'
|
||||||
import { capitalizeFirstLetter } from 'utils/string'
|
import { capitalizeFirstLetter } from 'utils/string'
|
||||||
// Components
|
// Components
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import ShopHeader from '$components/organisms/ShopBanner.svelte'
|
import ShopHeader from '$components/organisms/ShopBanner.svelte'
|
||||||
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
||||||
@@ -24,8 +23,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="shop-page">
|
||||||
<main class="shop-page">
|
|
||||||
<ShopHeader product={data.product} />
|
<ShopHeader product={data.product} />
|
||||||
|
|
||||||
<PosterLayout
|
<PosterLayout
|
||||||
@@ -34,5 +32,4 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<PostersGrid {posters} />
|
<PostersGrid {posters} />
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
import { PUBLIC_LIST_INCREMENT } from '$env/static/public'
|
import { PUBLIC_LIST_INCREMENT } from '$env/static/public'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Image from '$components/atoms/Image.svelte'
|
import Image from '$components/atoms/Image.svelte'
|
||||||
import Button from '$components/atoms/Button.svelte'
|
import Button from '$components/atoms/Button.svelte'
|
||||||
import IconEarth from '$components/atoms/IconEarth.svelte'
|
import IconEarth from '$components/atoms/IconEarth.svelte'
|
||||||
@@ -218,8 +217,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="location-page">
|
||||||
<main class="location-page">
|
|
||||||
<section class="location-page__intro grid" bind:this={introEl}>
|
<section class="location-page__intro grid" bind:this={introEl}>
|
||||||
<h1 class="title" class:is-short={location.name.length <= 4}>
|
<h1 class="title" class:is-short={location.name.length <= 4}>
|
||||||
<span class="housesof mask">
|
<span class="housesof mask">
|
||||||
@@ -362,5 +360,4 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import SplitText from '$components/SplitText.svelte'
|
import SplitText from '$components/SplitText.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Image from '$components/atoms/Image.svelte'
|
import Image from '$components/atoms/Image.svelte'
|
||||||
import Icon from '$components/atoms/Icon.svelte'
|
import Icon from '$components/atoms/Icon.svelte'
|
||||||
import IconArrow from '$components/atoms/IconArrow.svelte'
|
import IconArrow from '$components/atoms/IconArrow.svelte'
|
||||||
@@ -301,8 +300,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="photo-page">
|
||||||
<main class="photo-page">
|
|
||||||
<div class="container grid">
|
<div class="container grid">
|
||||||
<p class="photo-page__notice text-label">Tap for fullscreen</p>
|
<p class="photo-page__notice text-label">Tap for fullscreen</p>
|
||||||
|
|
||||||
@@ -401,5 +399,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
import { quartOut } from '$animations/easings'
|
import { quartOut } from '$animations/easings'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Image from '$components/atoms/Image.svelte'
|
import Image from '$components/atoms/Image.svelte'
|
||||||
import Button from '$components/atoms/Button.svelte'
|
import Button from '$components/atoms/Button.svelte'
|
||||||
import AboutGridPhoto from '$components/atoms/AboutGridPhoto.svelte'
|
import AboutGridPhoto from '$components/atoms/AboutGridPhoto.svelte'
|
||||||
@@ -181,8 +180,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="about">
|
||||||
<main class="about">
|
|
||||||
<Banner
|
<Banner
|
||||||
title="About"
|
title="About"
|
||||||
image={{
|
image={{
|
||||||
@@ -398,5 +396,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
import { quartOut } from 'svelte/easing'
|
import { quartOut } from 'svelte/easing'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Image from '$components/atoms/Image.svelte'
|
import Image from '$components/atoms/Image.svelte'
|
||||||
import Heading from '$components/molecules/Heading.svelte'
|
import Heading from '$components/molecules/Heading.svelte'
|
||||||
import InteractiveGlobe from '$components/organisms/InteractiveGlobe.svelte'
|
import InteractiveGlobe from '$components/organisms/InteractiveGlobe.svelte'
|
||||||
@@ -66,8 +65,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="credits">
|
||||||
<main class="credits">
|
|
||||||
<Heading
|
<Heading
|
||||||
text={data.credits.text}
|
text={data.credits.text}
|
||||||
/>
|
/>
|
||||||
@@ -144,5 +142,4 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<InteractiveGlobe type="cropped" />
|
<InteractiveGlobe type="cropped" />
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
import { getContext } from 'svelte'
|
import { getContext } from 'svelte'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import InteractiveGlobe from '$components/organisms/InteractiveGlobe.svelte'
|
import InteractiveGlobe from '$components/organisms/InteractiveGlobe.svelte'
|
||||||
import Locations from '$components/organisms/Locations.svelte'
|
import Locations from '$components/organisms/Locations.svelte'
|
||||||
import ShopModule from '$components/organisms/ShopModule.svelte'
|
import ShopModule from '$components/organisms/ShopModule.svelte'
|
||||||
@@ -23,8 +22,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="explore">
|
||||||
<main class="explore">
|
|
||||||
<Heading {text} />
|
<Heading {text} />
|
||||||
|
|
||||||
<section class="explore__locations">
|
<section class="explore__locations">
|
||||||
@@ -38,5 +36,4 @@
|
|||||||
<NewsletterModule />
|
<NewsletterModule />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
import { PUBLIC_FILTERS_DEFAULT_COUNTRY, PUBLIC_FILTERS_DEFAULT_SORT, PUBLIC_GRID_INCREMENT } from '$env/static/public'
|
import { PUBLIC_FILTERS_DEFAULT_COUNTRY, PUBLIC_FILTERS_DEFAULT_SORT, PUBLIC_GRID_INCREMENT } from '$env/static/public'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import SplitText from '$components/SplitText.svelte'
|
import SplitText from '$components/SplitText.svelte'
|
||||||
import IconEarth from '$components/atoms/IconEarth.svelte'
|
import IconEarth from '$components/atoms/IconEarth.svelte'
|
||||||
import Button from '$components/atoms/Button.svelte'
|
import Button from '$components/atoms/Button.svelte'
|
||||||
@@ -336,8 +335,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="photos-page">
|
||||||
<main class="photos-page">
|
|
||||||
<section class="photos-page__intro"
|
<section class="photos-page__intro"
|
||||||
class:is-passed={scrolledPastIntro}
|
class:is-passed={scrolledPastIntro}
|
||||||
>
|
>
|
||||||
@@ -495,5 +493,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
import { quartOut } from '$animations/easings'
|
import { quartOut } from '$animations/easings'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Heading from '$components/molecules/Heading.svelte'
|
import Heading from '$components/molecules/Heading.svelte'
|
||||||
import EmailForm from '$components/molecules/EmailForm.svelte'
|
import EmailForm from '$components/molecules/EmailForm.svelte'
|
||||||
import NewsletterIssue from '$components/molecules/NewsletterIssue.svelte'
|
import NewsletterIssue from '$components/molecules/NewsletterIssue.svelte'
|
||||||
@@ -65,8 +64,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="subscribe">
|
||||||
<main class="subscribe">
|
|
||||||
<div class="subscribe__top">
|
<div class="subscribe__top">
|
||||||
<Heading
|
<Heading
|
||||||
text={data.newsletter_page_text}
|
text={data.newsletter_page_text}
|
||||||
@@ -94,5 +92,4 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<InteractiveGlobe type="cropped" />
|
<InteractiveGlobe type="cropped" />
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||||
// Components
|
// Components
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import Heading from '$components/molecules/Heading.svelte'
|
import Heading from '$components/molecules/Heading.svelte'
|
||||||
|
|
||||||
@@ -22,8 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="terms">
|
||||||
<main class="terms">
|
|
||||||
<Heading text="Everything you need to know about using our website or buying our products" />
|
<Heading text="Everything you need to know about using our website or buying our products" />
|
||||||
|
|
||||||
<section class="terms__categories">
|
<section class="terms__categories">
|
||||||
@@ -44,5 +42,4 @@
|
|||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import BoxCTA from '$components/atoms/BoxCTA.svelte'
|
import BoxCTA from '$components/atoms/BoxCTA.svelte'
|
||||||
import Heading from '$components/molecules/Heading.svelte'
|
import Heading from '$components/molecules/Heading.svelte'
|
||||||
import InteractiveGlobe from '$components/organisms/InteractiveGlobe.svelte'
|
import InteractiveGlobe from '$components/organisms/InteractiveGlobe.svelte'
|
||||||
@@ -35,8 +34,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="page-error">
|
||||||
<main class="page-error">
|
|
||||||
<div class="page-error__top">
|
<div class="page-error__top">
|
||||||
<Heading
|
<Heading
|
||||||
text="{$page.error.message ?? errors[$page.status].message} <br>{defaultMessage}"
|
text="{$page.error.message ?? errors[$page.status].message} <br>{defaultMessage}"
|
||||||
@@ -81,5 +79,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ export const load = async ({ url }) => {
|
|||||||
locations: countLocations[0].count.id,
|
locations: countLocations[0].count.id,
|
||||||
countries: countCountries[0].count.id,
|
countries: countCountries[0].count.id,
|
||||||
},
|
},
|
||||||
|
currentPath: url.pathname,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -3,10 +3,13 @@
|
|||||||
|
|
||||||
import { browser } from '$app/environment'
|
import { browser } from '$app/environment'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import { beforeNavigate } from '$app/navigation'
|
import { beforeNavigate, afterNavigate } from '$app/navigation'
|
||||||
import { PUBLIC_ANALYTICS_DOMAIN } from '$env/static/public'
|
import { PUBLIC_ANALYTICS_DOMAIN } from '$env/static/public'
|
||||||
import { onMount, setContext } from 'svelte'
|
import { setContext, onMount } from 'svelte'
|
||||||
|
import { fade } from 'svelte/transition'
|
||||||
|
import { DELAY, DURATION } from '$utils/constants'
|
||||||
import { pageLoading, previousPage } from '$utils/stores'
|
import { pageLoading, previousPage } from '$utils/stores'
|
||||||
|
import { scrollToTop } from 'utils/scroll'
|
||||||
import '$utils/polyfills'
|
import '$utils/polyfills'
|
||||||
// Components
|
// Components
|
||||||
import SVGSprite from '$components/SVGSprite.svelte'
|
import SVGSprite from '$components/SVGSprite.svelte'
|
||||||
@@ -37,9 +40,24 @@
|
|||||||
/**
|
/**
|
||||||
* On page change
|
* On page change
|
||||||
*/
|
*/
|
||||||
|
beforeNavigate(({ from, to }) => {
|
||||||
// Store previous page (for photo Viewer close button)
|
// Store previous page (for photo Viewer close button)
|
||||||
beforeNavigate(({ from }) => {
|
|
||||||
$previousPage = from.url.pathname
|
$previousPage = from.url.pathname
|
||||||
|
|
||||||
|
// Enable page loading state if URL changed
|
||||||
|
if (from.route.id !== to.route.id) {
|
||||||
|
$pageLoading = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
afterNavigate(() => {
|
||||||
|
// Remove page loading state
|
||||||
|
setTimeout(() => $pageLoading = false, DELAY.PAGE_LOADING)
|
||||||
|
|
||||||
|
// Scroll back to top when new page is ready (excepted certain pages)
|
||||||
|
if (!$page.url.searchParams.get('country') && !$page.url.pathname.includes('/shop/')) {
|
||||||
|
setTimeout(scrollToTop, DELAY.PAGE_IN)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Define page loading
|
// Define page loading
|
||||||
@@ -65,11 +83,19 @@
|
|||||||
|
|
||||||
<Switcher />
|
<Switcher />
|
||||||
|
|
||||||
<slot />
|
{#key data.currentPath}
|
||||||
|
<div
|
||||||
|
in:fade={{ duration: DURATION.PAGE_IN, delay: DELAY.PAGE_LOADING }}
|
||||||
|
out:fade={{ duration: DURATION.PAGE_OUT }}
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
|
||||||
{#if !$page.params.photo}
|
{#if !$page.params.photo}
|
||||||
<Footer />
|
<Footer />
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/key}
|
||||||
|
|
||||||
|
|
||||||
<SVGSprite />
|
<SVGSprite />
|
||||||
<SmoothScroll />
|
<SmoothScroll />
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
import { quartOut } from '$animations/easings'
|
import { quartOut } from '$animations/easings'
|
||||||
// Components
|
// Components
|
||||||
import Metas from '$components/Metas.svelte'
|
import Metas from '$components/Metas.svelte'
|
||||||
import PageTransition from '$components/PageTransition.svelte'
|
|
||||||
import SplitText from '$components/SplitText.svelte'
|
import SplitText from '$components/SplitText.svelte'
|
||||||
import Button from '$components/atoms/Button.svelte'
|
import Button from '$components/atoms/Button.svelte'
|
||||||
import IconEarth from '$components/atoms/IconEarth.svelte'
|
import IconEarth from '$components/atoms/IconEarth.svelte'
|
||||||
@@ -81,8 +80,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<PageTransition>
|
<main class="homepage">
|
||||||
<main class="homepage">
|
|
||||||
<section class="homepage__intro"
|
<section class="homepage__intro"
|
||||||
use:reveal={{
|
use:reveal={{
|
||||||
animation: { opacity: [0, 1] },
|
animation: { opacity: [0, 1] },
|
||||||
@@ -165,5 +163,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</PageTransition>
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
// Delays
|
|
||||||
export const DELAY = {
|
|
||||||
PAGE_LOADING: 600,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Durations
|
// Durations
|
||||||
export const DURATION = {
|
export const DURATION = {
|
||||||
PAGE_IN: 400,
|
PAGE_IN: 400,
|
||||||
PAGE_OUT: 400,
|
PAGE_OUT: 400,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delays
|
||||||
|
export const DELAY = {
|
||||||
|
PAGE_LOADING: 600,
|
||||||
|
PAGE_IN: DURATION.PAGE_OUT + 1,
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user