mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2026-01-06 03:21:56 +00:00
Switched from sveltekit config for CDN to js constant
This commit is contained in:
1
src/lib/constants.js
Normal file
1
src/lib/constants.js
Normal file
@@ -0,0 +1 @@
|
||||
export const CDN = "https://dxx34o0ozp8j.cloudfront.net";
|
||||
@@ -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 @@
|
||||
<video
|
||||
class="background"
|
||||
preload="auto"
|
||||
poster="{assets}/landing.webp"
|
||||
poster="{CDN}/landing.webp"
|
||||
autoplay
|
||||
muted
|
||||
playsinline
|
||||
on:error={handleVideoError}
|
||||
>
|
||||
<source src="{assets}/landing.webm" type="video/webm" />
|
||||
<source src="{CDN}/landing.webm" type="video/webm" />
|
||||
</video>
|
||||
{:else}
|
||||
<img
|
||||
class="background"
|
||||
src="{assets}/landing.webp"
|
||||
src="{CDN}/landing.webp"
|
||||
alt="Landing background of L-PBF print in progress"
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import "./InfoScroll.scss";
|
||||
|
||||
import { assets } from "$app/paths";
|
||||
import { CDN } from "$lib/constants";
|
||||
</script>
|
||||
|
||||
<div class="infscr">
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="infscr-image-div">
|
||||
<img
|
||||
class="infscr-image"
|
||||
src="{assets}/buildplate.webp"
|
||||
src="{CDN}/buildplate.webp"
|
||||
alt="An L-PBF buildplate after a successful print"
|
||||
/>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="infscr-image-div">
|
||||
<img
|
||||
class="infscr-image"
|
||||
src="{assets}/data.webp"
|
||||
src="{CDN}/data.webp"
|
||||
alt="A dashboard featuring L-PBF thermographic analyses"
|
||||
/>
|
||||
</div>
|
||||
@@ -84,7 +84,7 @@
|
||||
<div class="infscr-image-div">
|
||||
<img
|
||||
class="infscr-image"
|
||||
src="{assets}/openscience.webp"
|
||||
src="{CDN}/openscience.webp"
|
||||
alt="A render of the open science logo with a modified color palette"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -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";
|
||||
</script>
|
||||
|
||||
<div class="contact-page">
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="contact-image-column">
|
||||
<img
|
||||
class="contact-image"
|
||||
src="{assets}/contact.webp"
|
||||
src="{CDN}/contact.webp"
|
||||
alt="A photograph of our lovely colleague who is eager to hear from you"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -7,9 +7,6 @@ const config = {
|
||||
postcss: true,
|
||||
}),
|
||||
kit: {
|
||||
paths: {
|
||||
assets: 'https://dxx34o0ozp8j.cloudfront.net'
|
||||
},
|
||||
adapter: adapter({
|
||||
out: 'build',
|
||||
precompress: true, // Pre-compresses files
|
||||
|
||||
Reference in New Issue
Block a user