From 719c73186d16a68e13e0b54097b2d8a7dd864ee4 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Sat, 18 Jan 2025 01:37:34 +0000 Subject: [PATCH] Switched from sveltekit config for CDN to js constant --- src/lib/constants.js | 1 + src/routes/+page.svelte | 8 ++++---- src/routes/InfoScroll.svelte | 8 ++++---- src/routes/contact/+page.svelte | 4 ++-- svelte.config.js | 3 --- 5 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 src/lib/constants.js diff --git a/src/lib/constants.js b/src/lib/constants.js new file mode 100644 index 0000000..f66b347 --- /dev/null +++ b/src/lib/constants.js @@ -0,0 +1 @@ +export const CDN = "https://dxx34o0ozp8j.cloudfront.net"; diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 26d063f..7cf3718 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -7,7 +7,7 @@ import "./LandingPage.scss"; import "./NavigationHeader.scss"; - import { assets } from "$app/paths"; + import { CDN } from "$lib/constants"; let use_video = true; function handleVideoError() { @@ -21,18 +21,18 @@ {:else} Landing background of L-PBF print in progress {/if} diff --git a/src/routes/InfoScroll.svelte b/src/routes/InfoScroll.svelte index 684cfba..39f5cb1 100644 --- a/src/routes/InfoScroll.svelte +++ b/src/routes/InfoScroll.svelte @@ -1,7 +1,7 @@
@@ -9,7 +9,7 @@
An L-PBF buildplate after a successful print
@@ -45,7 +45,7 @@
A dashboard featuring L-PBF thermographic analyses
@@ -84,7 +84,7 @@
A render of the open science logo with a modified color palette
diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte index 7177cdb..84442c1 100644 --- a/src/routes/contact/+page.svelte +++ b/src/routes/contact/+page.svelte @@ -4,7 +4,7 @@ import NavigationFooter from "$lib/components/NavigationFooter.svelte"; import ContactForm from "$lib/components/ContactForm.svelte"; - import { assets } from "$app/paths"; + import { CDN } from "$lib/constants";
@@ -25,7 +25,7 @@
A photograph of our lovely colleague who is eager to hear from you
diff --git a/svelte.config.js b/svelte.config.js index b66950f..0e350f1 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -7,9 +7,6 @@ const config = { postcss: true, }), kit: { - paths: { - assets: 'https://dxx34o0ozp8j.cloudfront.net' - }, adapter: adapter({ out: 'build', precompress: true, // Pre-compresses files