mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-23 05:51:57 +00:00
Added video splash with static image fallback
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 107 KiB |
BIN
public/landing.webm
Normal file
BIN
public/landing.webm
Normal file
Binary file not shown.
BIN
public/landing.webp
Normal file
BIN
public/landing.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
@@ -1,14 +1,12 @@
|
|||||||
|
|
||||||
<div>
|
|
||||||
<LandingPage />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LandingPage from "./LandingPage/LandingPage.svelte";
|
import LandingPage from "./LandingPage/LandingPage.svelte";
|
||||||
import "./vars.css";
|
import "./vars.css";
|
||||||
import "./styles.css";
|
import "./styles.css";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<LandingPage />
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,11 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.landing-zone {
|
.landing-zone-outer {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-image: url("landing.png");
|
min-height: 100vh;
|
||||||
background-size: cover;
|
height: fit-content;
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
// Blend out the background image into the plain bg color
|
// Blend out the background image into the plain bg color
|
||||||
&::after {
|
&::after {
|
||||||
@@ -28,9 +25,30 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120px;
|
height: 128px;
|
||||||
background: linear-gradient(to bottom,
|
background: linear-gradient(to bottom,
|
||||||
#00000000 0%,
|
#00000000 0%,
|
||||||
var(--background) 100%);
|
var(--background) 100%);
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.landing-zone {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
height: fit-content;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.background {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,13 +8,37 @@
|
|||||||
|
|
||||||
let className = "";
|
let className = "";
|
||||||
export { className as class };
|
export { className as class };
|
||||||
|
|
||||||
|
let useVideo = true;
|
||||||
|
function handleVideoError() {
|
||||||
|
useVideo = false;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={"landing-page " + className}>
|
<div class={"landing-page " + className}>
|
||||||
|
<div class="landing-zone-outer">
|
||||||
|
{#if useVideo}
|
||||||
|
<video
|
||||||
|
class="background"
|
||||||
|
autoplay
|
||||||
|
muted
|
||||||
|
playsinline
|
||||||
|
on:error={handleVideoError}
|
||||||
|
>
|
||||||
|
<source src="landing.webm" type="video/webm" />
|
||||||
|
</video>
|
||||||
|
{:else}
|
||||||
|
<img
|
||||||
|
class="background"
|
||||||
|
src="landing.webp"
|
||||||
|
alt="Landing background of L-PBF print in progress"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
<div class="landing-zone">
|
<div class="landing-zone">
|
||||||
<NavigationHeader />
|
<NavigationHeader />
|
||||||
<Splash />
|
<Splash />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<InfoScroll />
|
<InfoScroll />
|
||||||
<BottomCall />
|
<BottomCall />
|
||||||
<NavigationFooter />
|
<NavigationFooter />
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
.navigation-header {
|
.navigation-header {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 116.03px;
|
height: 128px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding-bottom: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation-header-items {
|
.navigation-header-items {
|
||||||
@@ -11,7 +12,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 79.79px;
|
right: 96px;
|
||||||
top: 28px;
|
top: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
.splash {
|
.splash {
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
top: 0px;
|
bottom: 0;
|
||||||
|
padding-top: 128px;
|
||||||
padding-bottom: 128px;
|
padding-bottom: 128px;
|
||||||
padding-right: 32px
|
padding-right: 32px;
|
||||||
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.splash-copy {
|
.splash-copy {
|
||||||
@@ -44,6 +46,9 @@
|
|||||||
|
|
||||||
.splash-button {
|
.splash-button {
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
|
outline-style: solid;
|
||||||
|
outline-width: 2px;
|
||||||
|
outline-color: var(--cpalettemedium);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 18px 32px 18px 32px;
|
padding: 18px 32px 18px 32px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
Reference in New Issue
Block a user