Use sveltekit:noscroll/prefetch on internal links
This commit is contained in:
@@ -199,7 +199,7 @@
|
||||
<h1 class="title-medium">{currentPhoto.title}</h1>
|
||||
|
||||
<div class="detail text-info">
|
||||
<a href="/{location.country.slug}/{location.slug}">
|
||||
<a href="/{location.country.slug}/{location.slug}" sveltekit:prefetch sveltekit:noscroll>
|
||||
<Icon class="icon" icon="map-pin" label="Map pin" />
|
||||
<span>
|
||||
{#if currentPhoto.city}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<ul>
|
||||
{#each location as { location_id: { name, slug: slugLocation, country: { slug: slugCountry }}}, index}
|
||||
<li>
|
||||
<a href="/{slugCountry}/{slugLocation}">{name}</a>
|
||||
<a href="/{slugCountry}/{slugLocation}" sveltekit:noscroll>{name}</a>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
<div class="photos__grid">
|
||||
{#each photos as { image, slug, location, title, city }, index}
|
||||
<figure class="photo shadow-photo">
|
||||
<a href="/{location.country.slug}/{location.slug}/{slug}">
|
||||
<a href="/{location.country.slug}/{location.slug}/{slug}" sveltekit:prefetch sveltekit:noscroll>
|
||||
<Image
|
||||
id={image.id}
|
||||
sizeKey="photo-grid"
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<section class="shop-page__intro" bind:this={introEl}>
|
||||
<div class="top container">
|
||||
<a href="/" class="back">
|
||||
<a href="/" class="back" sveltekit:noscroll>
|
||||
<svg width="5" height="8" viewBox="0 0 5 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 1 1 4l3 3" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
@@ -83,7 +83,7 @@
|
||||
<ul>
|
||||
{#each $shopLocations as { name, slug }}
|
||||
<li class:is-active={slug === product.location.slug}>
|
||||
<a href="/shop/poster-{slug}" sveltekit:noscroll sveltekit:prefetch>
|
||||
<a href="/shop/poster-{slug}" sveltekit:prefetch sveltekit:noscroll>
|
||||
{name}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user