diff --git a/src/routes/_layout.svelte b/src/routes/_layout.svelte index 48d8332..d54b0c8 100644 --- a/src/routes/_layout.svelte +++ b/src/routes/_layout.svelte @@ -74,14 +74,36 @@ } from 'utils/store' // Dependencies import lazySizes from 'lazysizes' + // Components + import AnalyticsTracker from 'utils/AnalyticsTracker' + import Transition from 'utils/Transition' // Variables const { page } = stores() - let AnalyticsTracker // Settings lazySizes.cfg.lazyClass = 'lazyload' + /* + ** Head stuff + */ + // Preconnect + const preconnect = [ + 'https://api.housesof.world', + 'https://www.googletagmanager.com', + 'https://stats.g.doubleclick.net', + 'https://www.google-analytics.com', + ] + // Preload assets + const preload = { + fonts: [ + '/fonts/G-Light.woff2', + '/fonts/G-Regular.woff2', + '/fonts/G-Semibold.woff2', + '/fonts/M-Extralight.woff2', + '/fonts/M-Light.woff2', + ] + } /* @@ -105,11 +127,6 @@ if ($locations) { $locations.forEach(loc => loc.country = $countries.find(cont => cont.id === loc.country.id)) } - - - onMount(async () => { - await import('utils/AnalyticsTracker').then(module => AnalyticsTracker = module.default) - })