Preload fonts
This commit is contained in:
@@ -17,6 +17,16 @@
|
||||
export let data: any
|
||||
export let count: any
|
||||
|
||||
// Fonts to preload
|
||||
const fonts = [
|
||||
'G-Light',
|
||||
'G-Regular',
|
||||
'G-Medium',
|
||||
'G-Semibold',
|
||||
'J-Extralight',
|
||||
'J-Light',
|
||||
]
|
||||
|
||||
// Set global data
|
||||
setContext('global', {
|
||||
...data,
|
||||
@@ -50,6 +60,12 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
{#each fonts as font}
|
||||
<link rel="preload" href="/fonts/{font}.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
||||
{/each}
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<Switcher isOver={!!$page.params.location && !!$page.params.photo} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user