Update stuff regarding to latest SvelteKit updates
This commit is contained in:
2
src/app.d.ts
vendored
2
src/app.d.ts
vendored
@@ -5,8 +5,6 @@ declare namespace App {
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface Platform {}
|
||||
// interface PrivateEnv {}
|
||||
// interface PublicEnv {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</script>
|
||||
|
||||
<a href={url} class="box-cta"
|
||||
sveltekit:noscroll sveltekit:prefetch={url.includes('http') ? true : undefined}
|
||||
data-sveltekit-noscroll data-sveltekit-prefetch={url.includes('http') ? true : undefined}
|
||||
>
|
||||
<div class="icon">
|
||||
<Icon icon={icon} label={alt} />
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
<a
|
||||
href={url} class={classes}
|
||||
{target} {rel}
|
||||
sveltekit:prefetch={url && (isExternal || isProtocol) ? null : true}
|
||||
sveltekit:noscroll={isExternal || isProtocol ? null : true}
|
||||
data-sveltekit-prefetch={url && (isExternal || isProtocol) ? null : true}
|
||||
data-sveltekit-noscroll={isExternal || isProtocol ? null : true}
|
||||
{disabled}
|
||||
tabindex="0"
|
||||
on:click
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
<div class="newsletter-form__bottom">
|
||||
{#if past}
|
||||
<a href="/subscribe" class="past-issues" sveltekit:noscroll sveltekit:prefetch>
|
||||
<a href="/subscribe" class="past-issues" data-sveltekit-noscroll data-sveltekit-prefetch>
|
||||
<svg width="20" height="16" viewBox="0 0 20 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-label="Newsletter icon">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.346H2a.5.5 0 0 0-.5.5v11.102a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5V2.846a.5.5 0 0 0-.5-.5ZM2 .846a2 2 0 0 0-2 2v11.102a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2.846a2 2 0 0 0-2-2H2Zm13.75 4.25h-2v3h2v-3Zm-2-1a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2ZM3.5 6.5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6Zm.25 3a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5Zm1.25 2a.5.5 0 0 0 0 1h6a.5.5 0 1 0 0-1H5Z" />
|
||||
</svg>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
|
||||
<div class="house__photo grid" class:not-landscape={ratio < 1.475}>
|
||||
<a href={url} sveltekit:noscroll tabindex="0">
|
||||
<a href={url} data-sveltekit-noscroll tabindex="0">
|
||||
<figure class="house__image shadow-photo">
|
||||
<Image
|
||||
class="photo"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<a href="/{location.country.slug}/{location.slug}"
|
||||
on:mousemove={handleMouseMove}
|
||||
on:mouseleave={handleMouseLeave}
|
||||
sveltekit:noscroll
|
||||
data-sveltekit-noscroll
|
||||
tabindex="0"
|
||||
>
|
||||
<Image
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
>
|
||||
{#if url}
|
||||
<div class="photo-card__content">
|
||||
<a href={url} sveltekit:noscroll>
|
||||
<a href={url} data-sveltekit-noscroll>
|
||||
<Image
|
||||
{id}
|
||||
sizeKey="postcard"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<div class="poster">
|
||||
{#if image}
|
||||
<a href="/shop/poster-{location.slug}" on:click={() => smoothScroll({ hash: 'poster', changeHash: false })} sveltekit:noscroll sveltekit:prefetch>
|
||||
<a href="/shop/poster-{location.slug}" on:click={() => smoothScroll({ hash: 'poster', changeHash: false })} data-sveltekit-noscroll data-sveltekit-prefetch>
|
||||
<Image
|
||||
id={image.id}
|
||||
sizeKey="product"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
{#each switcher_links as { text, url, icon, icon_label }}
|
||||
<li class:is-active={$page.url.pathname === url}>
|
||||
<a href={url} on:click={toggleSwitcher} tabindex="0"
|
||||
sveltekit:noscroll sveltekit:prefetch
|
||||
data-sveltekit-noscroll data-sveltekit-prefetch
|
||||
>
|
||||
<Icon class="icon" icon={icon} label={icon_label} />
|
||||
<span>{text}</span>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container grid">
|
||||
<a href="/" class="footer__title" sveltekit:prefetch sveltekit:noscroll tabindex="0">
|
||||
<a href="/" class="footer__title" data-sveltekit-prefetch data-sveltekit-noscroll tabindex="0">
|
||||
<SiteTitle tag="div" />
|
||||
</a>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<ul>
|
||||
{#each footer_links as { title, slug }}
|
||||
<li>
|
||||
<a href="/{slug}" class="link-3d" sveltekit:prefetch sveltekit:noscroll tabindex="0">
|
||||
<a href="/{slug}" class="link-3d" data-sveltekit-prefetch data-sveltekit-noscroll tabindex="0">
|
||||
<SplitText text={title} clone={true} />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<ul class="globe__markers">
|
||||
{#each markers as { name, slug, country, lat, lng }}
|
||||
<li class="globe__marker" data-location={slug} data-lat={lat} data-lng={lng}>
|
||||
<a href="/{country.slug}/{slug}" sveltekit:noscroll>
|
||||
<a href="/{country.slug}/{slug}" data-sveltekit-noscroll>
|
||||
<dl>
|
||||
<dt class="title-small">{name}</dt>
|
||||
<dd class="text-label text-label--small">{country.name}</dd>
|
||||
@@ -144,7 +144,7 @@
|
||||
<ul>
|
||||
{#each clusterLocations as { name, slug, country }}
|
||||
<li>
|
||||
<a href="/{country.slug}/{slug}" sveltekit:noscroll tabindex="0">
|
||||
<a href="/{country.slug}/{slug}" data-sveltekit-noscroll tabindex="0">
|
||||
<Image
|
||||
class="flag"
|
||||
id={country.flag.id}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
<section class="shop-page__intro" bind:this={introEl}>
|
||||
<div class="top container">
|
||||
<a href="/" class="back" sveltekit:noscroll>
|
||||
<a href="/" class="back" data-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>
|
||||
@@ -116,7 +116,7 @@
|
||||
<ul>
|
||||
{#each shopLocations as { name, slug }}
|
||||
<li class:is-active={product && slug === product.location.slug}>
|
||||
<a href="/shop/poster-{slug}" on:click={() => smoothScroll({ hash: 'poster' })} sveltekit:prefetch sveltekit:noscroll>
|
||||
<a href="/shop/poster-{slug}" on:click={() => smoothScroll({ hash: 'poster' })} data-sveltekit-prefetch data-sveltekit-noscroll>
|
||||
{name}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="content">
|
||||
<div class="shop__images">
|
||||
{#if images}
|
||||
<a href={enabled ? url : undefined} title="Visit our shop" sveltekit:noscroll sveltekit:prefetch>
|
||||
<a href={enabled ? url : undefined} title="Visit our shop" data-sveltekit-noscroll data-sveltekit-prefetch>
|
||||
{#each images as { directus_files_id: { id, title }}, index}
|
||||
<Image
|
||||
class={index === currentImageIndex ? 'is-visible' : null}
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
<h1 class="title-medium">{currentPhoto.title}</h1>
|
||||
|
||||
<div class="detail text-info">
|
||||
<a href="/{location.country.slug}/{location.slug}" sveltekit:prefetch sveltekit:noscroll>
|
||||
<a href="/{location.country.slug}/{location.slug}" data-sveltekit-prefetch data-sveltekit-noscroll>
|
||||
<Icon class="icon" icon="map-pin" label="Map pin" />
|
||||
<span>
|
||||
{#if currentPhoto.city}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
const introText = about.intro_text
|
||||
.replace('<strong>',
|
||||
`<a href="/${about.intro_firstlocation.country.slug}/${about.intro_firstlocation.slug}" sveltekit:noscroll sveltekit:prefetch>
|
||||
`<a href="/${about.intro_firstlocation.country.slug}/${about.intro_firstlocation.slug}" data-sveltekit-noscroll data-sveltekit-prefetch>
|
||||
<img src="${getAssetUrlKey(about.intro_firstlocation.country.flag.id, 'square-small-jpg')}" width="32" height="32" alt="${about.intro_firstlocation.country.flag.title}">
|
||||
<strong>
|
||||
`)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
{#each location as loc}
|
||||
{#if loc.location_id}
|
||||
<li>
|
||||
<a href="/{loc.location_id.country.slug}/{loc.location_id.slug}" sveltekit:noscroll tabindex="0">
|
||||
<a href="/{loc.location_id.country.slug}/{loc.location_id.slug}" data-sveltekit-noscroll tabindex="0">
|
||||
<Image
|
||||
id={loc.location_id.country.flag.id}
|
||||
sizeKey="square-small"
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
<div class="photos-page__grid" bind:this={photosGridEl}>
|
||||
{#each photos as { id, image, slug, location, title, city }, index (id)}
|
||||
<figure class="photo shadow-photo">
|
||||
<a href="/{location.country.slug}/{location.slug}/{slug}" sveltekit:prefetch sveltekit:noscroll tabindex="0">
|
||||
<a href="/{location.country.slug}/{location.slug}/{slug}" data-sveltekit-prefetch data-sveltekit-noscroll tabindex="0">
|
||||
<Image
|
||||
id={image.id}
|
||||
sizeKey="photo-grid"
|
||||
|
||||
Reference in New Issue
Block a user