fix: eslint errors
This commit is contained in:
@@ -12,4 +12,4 @@
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
</svelte:head>
|
||||
</svelte:head>
|
||||
|
||||
@@ -34,4 +34,4 @@
|
||||
|
||||
<meta property="twitter:card" content={card} />
|
||||
<meta property="twitter:creator" content={creator} />
|
||||
</svelte:head>
|
||||
</svelte:head>
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
}}
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
<path d="M7.81 1.104a.647.647 0 1 0-.914-.915L4 3.085 1.104.19a.647.647 0 1 0-.915.915L3.085 4 .19 6.896a.647.647 0 1 0 .915.915L4 4.915 6.896 7.81a.647.647 0 1 0 .915-.915L4.915 4 7.81 1.104Z" />
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -34,4 +34,4 @@
|
||||
$smoothScroll.destroy()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<span class="text-split__line" aria-hidden={index === 1}>
|
||||
{#each split as word, i}
|
||||
<span class="word" style:--i-w={i}>{word}</span>{#if word.includes('\n')}<br>{/if}
|
||||
<!-- svelte-ignore empty-block -->
|
||||
{#if i < split.length - 1}{/if}
|
||||
{/each}
|
||||
</span>
|
||||
@@ -39,4 +38,4 @@
|
||||
<span class="char" style:--i-c={i}>{char}</span>
|
||||
{/each}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -38,4 +38,4 @@
|
||||
ratio={1.5}
|
||||
{alt}
|
||||
/>
|
||||
</figure>
|
||||
</figure>
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
|
||||
<div class="badge badge--{size}">
|
||||
<span>{text}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
<span class="text-label">
|
||||
{label}
|
||||
</span>
|
||||
</a>
|
||||
</a>
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
href={url} class={classes}
|
||||
{target} {rel}
|
||||
data-sveltekit-noscroll={isExternal || isProtocol ? 'off' : ''}
|
||||
{disabled}
|
||||
tabindex="0"
|
||||
on:click
|
||||
>
|
||||
@@ -57,4 +56,4 @@
|
||||
<slot />
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
<span class="quantity" transition:scale={{ start: 0.6, duration: 400, easing: quartOut }}>{$cartAmount}</span>
|
||||
{/if}
|
||||
</ButtonCircle>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,4 +41,4 @@
|
||||
<slot />
|
||||
{/if}
|
||||
</button>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
Discover <strong>{count.photos} homes</strong><br>
|
||||
from <strong>{count.locations} places</strong>
|
||||
in <strong>{count.countries} countries</strong>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
|
||||
<svg class={classes} aria-label={label} width="32" height="32">
|
||||
<use xlink:href="#icon-{icon}" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
class:arrow--flip={flip}
|
||||
>
|
||||
<use xlink:href="#arrow" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
@@ -41,4 +41,4 @@
|
||||
</clipPath>
|
||||
</defs>
|
||||
{/if}
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
export let ratio: number = undefined
|
||||
export let alt: string
|
||||
export let lazy = true
|
||||
export let decoding: "auto" | "sync" | "async" = "auto"
|
||||
export let decoding: 'auto' | 'sync' | 'async' = 'auto'
|
||||
|
||||
interface Sizes {
|
||||
small?: { width?: number, height?: number }
|
||||
@@ -50,16 +50,16 @@
|
||||
$: imgSrc = id ? getAssetUrlKey(id, `${sizeKey}-small-jpg`) : src ? src : undefined
|
||||
$: srcSet = {
|
||||
// WebP
|
||||
webp:
|
||||
sizes ? [
|
||||
webp: sizes
|
||||
? [
|
||||
`${getAssetUrlKey(id, `${sizeKey}-small-webp`)} 345w`,
|
||||
sizes.medium ? `${getAssetUrlKey(id, `${sizeKey}-medium-webp`)} 768w` : null,
|
||||
sizes.large ? `${getAssetUrlKey(id, `${sizeKey}-large-webp`)} 1280w` : null,
|
||||
]
|
||||
: [getAssetUrlKey(id, `${sizeKey}-webp`)],
|
||||
// JPG
|
||||
jpg:
|
||||
sizes ? [
|
||||
jpg: sizes
|
||||
? [
|
||||
`${getAssetUrlKey(id, `${sizeKey}-small-jpg`)} 345w`,
|
||||
sizes.medium ? `${getAssetUrlKey(id, `${sizeKey}-medium-jpg`)} 768w` : null,
|
||||
sizes.large ? `${getAssetUrlKey(id, `${sizeKey}-large-jpg`)} 1280w` : null,
|
||||
@@ -83,4 +83,4 @@
|
||||
loading={lazy ? 'lazy' : undefined}
|
||||
{decoding}
|
||||
/>
|
||||
</picture>
|
||||
</picture>
|
||||
|
||||
@@ -69,4 +69,4 @@
|
||||
use:reveal={revealOptions}
|
||||
>
|
||||
<slot />
|
||||
</svelte:element>
|
||||
</svelte:element>
|
||||
|
||||
@@ -34,4 +34,4 @@
|
||||
<span class="middle word-2">Of The</span>
|
||||
<span class="word-3">World</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
{#if product.photos_preview.length}
|
||||
<div class="poster-layout__images grid container">
|
||||
{#each product.photos_preview.slice(0, 3) as { directus_files_id}, index}
|
||||
{#each product.photos_preview.slice(0, 3) as { directus_files_id }, index}
|
||||
<Image
|
||||
class="image image--{index + 1} photo shadow-box-light"
|
||||
id={directus_files_id.id}
|
||||
@@ -131,4 +131,4 @@
|
||||
alt={lastPreviewPhoto.title}
|
||||
/>
|
||||
{/if}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -66,4 +66,4 @@
|
||||
</svg>
|
||||
</ButtonCircle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -103,4 +103,4 @@
|
||||
<p class="text-xsmall">{formMessages[formStatus.message]}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
<div class="text text-medium">
|
||||
{@html text}
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -63,4 +63,4 @@
|
||||
{index}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
// Detect if location has new content
|
||||
const seenLocationDate = dayjs(parsedSeenLocations[location.id])
|
||||
const isLocationSeen = parsedSeenLocations?.hasOwnProperty(location.id)
|
||||
const isLocationSeen = location.id in parsedSeenLocations
|
||||
|
||||
// Define if location is has new photos
|
||||
if (seenLocationDate && isLocationSeen) {
|
||||
@@ -48,9 +48,9 @@
|
||||
* Moving cursor over
|
||||
*/
|
||||
const offset = spring({ x: 0, y: 0 }, {
|
||||
stiffness: 0.075,
|
||||
damping: 0.9
|
||||
})
|
||||
stiffness: 0.075,
|
||||
damping: 0.9
|
||||
})
|
||||
const handleMouseMove = ({ clientX }: MouseEvent) => {
|
||||
const { width, left } = locationEl.getBoundingClientRect()
|
||||
const moveProgress = (clientX - left) / width // 0 to 1
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
</dd>
|
||||
</dl>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
</script>
|
||||
|
||||
<div class="notification-cart shadow-small"
|
||||
on:click={closeNotification}
|
||||
transition:fly={{ y: 20, duration: 700, easing: quartOut }}
|
||||
on:click={closeNotification}
|
||||
on:keydown
|
||||
>
|
||||
<div class="notification-cart__left">
|
||||
<img src={image} width={58} height={88} alt={title}>
|
||||
@@ -29,4 +30,4 @@
|
||||
<h3>{title}</h3>
|
||||
<p>{name}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,4 +67,4 @@
|
||||
{lazy}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,4 +45,4 @@
|
||||
<li>{location}{region ? `, ${region}` : ''}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -47,4 +47,4 @@
|
||||
on:click={() => addToCart(product)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
alt={image.title}
|
||||
/>
|
||||
{:else if video && video.mp4 && video.webm}
|
||||
<video muted loop playsinline autoplay allow="autoplay">
|
||||
<video muted loop playsinline autoplay>
|
||||
<source type="video/mp4" src={getAssetUrlKey(video.mp4, 'step')} />
|
||||
<source type="video/webm" src={getAssetUrlKey(video.webm, 'step')} />
|
||||
<track kind="captions" />
|
||||
@@ -48,4 +48,4 @@
|
||||
<div class="text text-xsmall">
|
||||
{@html text}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
interface Option {
|
||||
value: string
|
||||
@@ -28,7 +28,7 @@
|
||||
/**
|
||||
* When changing select value
|
||||
*/
|
||||
const handleChange = ({ target: { value }}: any) => {
|
||||
const handleChange = ({ target: { value } }: any) => {
|
||||
const option = options.find(option => option.value === value)
|
||||
|
||||
// Dispatch event to parent
|
||||
@@ -48,4 +48,4 @@
|
||||
</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
// Quick location change
|
||||
const quickLocationChange = async ({ target: { value }}: any) => {
|
||||
const quickLocationChange = async ({ target: { value } }: any) => {
|
||||
const pathTo = `/shop/poster-${value}`
|
||||
goto(pathTo, { replaceState: true, noScroll: true, keepFocus: true })
|
||||
|
||||
@@ -42,4 +42,4 @@
|
||||
{/each}
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</dl>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// Components
|
||||
import Icon from '$components/atoms/Icon.svelte'
|
||||
|
||||
const { settings: { switcher_links }}: any = getContext('global')
|
||||
const { settings: { switcher_links } }: any = getContext('global')
|
||||
|
||||
let switcherEl: HTMLElement
|
||||
let isOpen = false
|
||||
@@ -30,11 +30,11 @@
|
||||
* Detect outside click
|
||||
*/
|
||||
const windowClick = ({ target }) => {
|
||||
if (!switcherEl.contains(target) && isOpen) {
|
||||
if (!switcherEl.contains(target) && isOpen) {
|
||||
// Close switcher
|
||||
toggleSwitcher()
|
||||
}
|
||||
}
|
||||
toggleSwitcher()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window on:click={windowClick} />
|
||||
@@ -70,4 +70,4 @@
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</aside>
|
||||
</aside>
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
}}
|
||||
lazy={false}
|
||||
/>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -127,4 +127,4 @@
|
||||
</svg>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
import { smoothScroll } from '$utils/stores'
|
||||
import { cartOpen, cartData, cartAmount, cartIsUpdating } from '$utils/stores/shop'
|
||||
import { initSwell, getCart, updateCartItem, removeCartItem } from '$utils/functions/shop'
|
||||
import { sendEvent } from '$utils/analytics'
|
||||
// Components
|
||||
import Button from '$components/atoms/Button.svelte'
|
||||
import Icon from '$components/atoms/Icon.svelte'
|
||||
import CartItem from '$components/molecules/CartItem.svelte'
|
||||
import ShopLocationSwitcher from '$components/molecules/ShopLocationSwitcher.svelte'
|
||||
import { sendEvent } from '$utils/analytics';
|
||||
|
||||
|
||||
// Block scroll if cart is open
|
||||
@@ -140,7 +140,7 @@
|
||||
text="Checkout"
|
||||
color="pink"
|
||||
size="small"
|
||||
on:click={() => sendEvent('cartCheckout', { props: { amount: $cartAmount }})}
|
||||
on:click={() => sendEvent('cartCheckout', { props: { amount: $cartAmount } })}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -151,5 +151,6 @@
|
||||
<div class="cart-overlay"
|
||||
transition:fade={{ duration: 600, easing: quartOut }}
|
||||
on:click={handleCloseCart}
|
||||
on:keydown
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -26,4 +26,4 @@
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import SplitText from '$components/SplitText.svelte'
|
||||
import SiteTitle from '$components/atoms/SiteTitle.svelte'
|
||||
|
||||
const { settings: { instagram, footer_links }}: any = getContext('global')
|
||||
const { settings: { instagram, footer_links } }: any = getContext('global')
|
||||
</script>
|
||||
|
||||
|
||||
@@ -42,4 +42,4 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
const { continents, locations }: any = getContext('global')
|
||||
const randomContinent: any = getRandomItem(continents)
|
||||
const markers = locations.map(({ name, slug, country, coordinates: { coordinates }}): Marker => ({
|
||||
const markers = locations.map(({ name, slug, country, coordinates: { coordinates } }): Marker => ({
|
||||
name,
|
||||
slug,
|
||||
country: { ...country },
|
||||
@@ -154,4 +154,4 @@
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
<ul class="list-cta" data-sveltekit-noscroll>
|
||||
<slot />
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
export let locations: any[]
|
||||
|
||||
const { continents, settings: { explore_list }}: any = getContext('global')
|
||||
const { continents, settings: { explore_list } }: any = getContext('global')
|
||||
|
||||
// Continents filtering logic
|
||||
let currentContinent: string = undefined
|
||||
|
||||
$: filteredLocations = locations.filter(({ country: { continent }}: any) => {
|
||||
$: filteredLocations = locations.filter(({ country: { continent } }: any) => {
|
||||
if (!currentContinent) {
|
||||
// Show all locations by default
|
||||
return true
|
||||
@@ -89,4 +89,4 @@
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
export let theme = 'default'
|
||||
|
||||
const { settings: { newsletter_text, newsletter_subtitle }}: any = getContext('global')
|
||||
const { settings: { newsletter_text, newsletter_subtitle } }: any = getContext('global')
|
||||
</script>
|
||||
|
||||
<div class="newsletter newsletter--{theme} shadow-box-dark">
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
<EmailForm past={true} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,4 +117,4 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -163,4 +163,4 @@
|
||||
<ShopLocationSwitcher />
|
||||
{/if}
|
||||
<ButtonCart />
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="shop__images">
|
||||
{#if images}
|
||||
<a href={enabled ? url : undefined} title="Visit our shop" data-sveltekit-noscroll>
|
||||
{#each images as { directus_files_id: { id, title }}, index}
|
||||
{#each images as { directus_files_id: { id, title } }, index}
|
||||
<Image
|
||||
class={index === currentImageIndex ? 'is-visible' : null}
|
||||
{id}
|
||||
@@ -90,4 +90,4 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user