⚠️ 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:
@@ -7,7 +7,7 @@
|
||||
</script>
|
||||
|
||||
<div class="location">
|
||||
<a href="/location/{country.slug}/{slug}" rel="prefetch" sapper-noscroll>
|
||||
<a href="/location/{country.slug}/{slug}" rel="prefetch">
|
||||
<img src={country.flag.full_url} alt="Flag of {country.name}">
|
||||
<div class="anim-mask mask-city">
|
||||
<h3 class="location__city">{name}</h3>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<div class="photo__image wrap">
|
||||
<div class="align">
|
||||
<a href="/viewer/{location.country.slug}/{location.slug}/{photo.slug}" sapper-noscroll>
|
||||
<a href="/viewer/{location.country.slug}/{location.slug}/{photo.slug}">
|
||||
<picture class="photo__picture">
|
||||
<source media="(min-width: 992px)" data-srcset={getThumbnail(private_hash, 1300)}>
|
||||
<source media="(min-width: 768px)" data-srcset={getThumbnail(private_hash, 992)}>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<div class="switcher {type}">
|
||||
<div class="switcher__text" class:empty={!location}>
|
||||
<a href="/" sapper-noscroll>
|
||||
<a href="/">
|
||||
{#if !location}
|
||||
<span class="top">Houses</span>
|
||||
<span class="bottom">
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
|
||||
<div class="button-control button-control--dashed switcher__icon">
|
||||
<a href="/choose" aria-label="Change the location" sapper-noscroll>
|
||||
<a href="/choose" aria-label="Change the location">
|
||||
<IconGlobe
|
||||
color={type.includes('side') ? '#333' : '#fff'}
|
||||
width={type.includes('side') ? 18 : 24}
|
||||
|
||||
Reference in New Issue
Block a user