Setup basics
This commit is contained in:
parent
6831542447
commit
c7a6441920
|
@ -2,9 +2,12 @@
|
||||||
import WeAreText from './lib/WeAreText.svelte'
|
import WeAreText from './lib/WeAreText.svelte'
|
||||||
import { Parallax, ParallaxLayer, StickyLayer } from 'svelte-parallax';
|
import { Parallax, ParallaxLayer, StickyLayer } from 'svelte-parallax';
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
import ZSpacer from './lib/Universal/ZSpacer.svelte';
|
||||||
|
import planeImg from './images/PlaneGrid.png';
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
window.scrollTo(0, 100);
|
//window.scrollTo(0, 100);
|
||||||
|
window.scrollTo(0, 5500); // Debug
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto assigned fields (Will change after load)
|
// Auto assigned fields (Will change after load)
|
||||||
|
@ -15,9 +18,10 @@
|
||||||
parallaxProgress = progress;
|
parallaxProgress = progress;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function debugClick(){
|
function debugClick(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let weAreTexts: string[] = ['overlooked', 'underfunded', 'constrained', 'depleated'];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window bind:scrollY={scrollPos} />
|
<svelte:window bind:scrollY={scrollPos} />
|
||||||
|
@ -35,28 +39,43 @@
|
||||||
sections={10}
|
sections={10}
|
||||||
config={{stiffness: 0.2, damping: 0.3}}
|
config={{stiffness: 0.2, damping: 0.3}}
|
||||||
>
|
>
|
||||||
<ParallaxLayer rate={0} span={3} style="background-color: grey;" />
|
<ParallaxLayer rate={0} span={10} style="background: url('{planeImg}'); filter: brightness(10%);" />
|
||||||
|
|
||||||
<StickyLayer offset={{ top: 0, bottom: 10 }}>
|
<StickyLayer offset={{ top: 0, bottom: 10 }} style="z-index: 1000;">
|
||||||
<div>
|
<div>
|
||||||
{scrollPos}
|
{scrollPos}
|
||||||
</div>
|
</div>
|
||||||
<button on:click={debugClick}>Debug button</button>
|
<button on:click={debugClick}>Debug button</button>
|
||||||
</StickyLayer>
|
</StickyLayer>
|
||||||
|
|
||||||
<StickyLayer class="align-center no-interact" offset={{ top: 0, bottom: 6.5 }}>
|
{#each weAreTexts as text, i}
|
||||||
<WeAreText/>
|
{@const stickyOffset = 0.65}
|
||||||
</StickyLayer>
|
{@const stickyInterval = 1}
|
||||||
|
{@const stickyDuration = 0.5}
|
||||||
|
|
||||||
<StickyLayer class="no-interact" offset={{ top: 5.4, bottom: 10 }} style="background-color: #242424;">
|
<StickyLayer class="align-center" rate={-1} offset={{ top: stickyInterval * i + stickyOffset, bottom: stickyInterval * i + stickyDuration + stickyOffset}}>
|
||||||
<div class="align-center" style="font-size: 100px; padding-top: 200px;">
|
<div class="stickyText" style="margin-top: 1vw;">
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
</StickyLayer>
|
||||||
|
{/each}
|
||||||
|
|
||||||
|
<StickyLayer offset={{ top: 5.5, bottom: 5.5 }} style="background-color: #242424;">
|
||||||
|
<div class="align-center stickyText" style="font-size: 9vw; padding-top: 200px;">
|
||||||
The deprived devs
|
The deprived devs
|
||||||
</div>
|
</div>
|
||||||
</StickyLayer>
|
</StickyLayer>
|
||||||
|
|
||||||
|
<StickyLayer class="align-center" offset={{ top: 0, bottom: 5.125 }}>
|
||||||
|
<WeAreText/>
|
||||||
|
</StickyLayer>
|
||||||
</Parallax>
|
</Parallax>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.stickyText {
|
||||||
|
font-family: CozetteVector;
|
||||||
|
font-size: 5vw;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
49
src/app.css
49
src/app.css
|
@ -18,23 +18,6 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typewriter h1 {
|
|
||||||
overflow: hidden; /* Ensures the content is not revealed until the animation */
|
|
||||||
border-right: .15em solid orange; /* The typwriter cursor */
|
|
||||||
white-space: nowrap; /* Keeps the content on a single line */
|
|
||||||
margin: 0 auto; /* Gives that scrolling effect as the typing happens */
|
|
||||||
letter-spacing: .15em; /* Adjust as needed */
|
|
||||||
animation:
|
|
||||||
typing 3.5s steps(40, end),
|
|
||||||
blink-caret .75s step-end infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The typing effect */
|
|
||||||
@keyframes typing {
|
|
||||||
from { width: 0 }
|
|
||||||
to { width: 100% }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add a black background color to the top navigation */
|
/* Add a black background color to the top navigation */
|
||||||
.topnav {
|
.topnav {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
|
@ -68,10 +51,6 @@ body {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-text {
|
|
||||||
font-size: 125px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-wrap {
|
.no-wrap {
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -81,10 +60,37 @@ body {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.yes-interact {
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
.hide{
|
.hide{
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.parallax-layer {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.parallax-layer * {
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky-layer {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky-layer * {
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'CozetteVector';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url('./static/CozetteVector.ttf') format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
/* ================================================ */
|
/* ================================================ */
|
||||||
/* Aligning */
|
/* Aligning */
|
||||||
/* ================================================ */
|
/* ================================================ */
|
||||||
|
@ -92,6 +98,7 @@ body {
|
||||||
align-content: center;
|
align-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
vertical-align: middle;
|
||||||
display: flex;
|
display: flex;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 250 KiB |
|
@ -2,26 +2,21 @@
|
||||||
import ZSpacer from "./Universal/ZSpacer.svelte";
|
import ZSpacer from "./Universal/ZSpacer.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="horizontal">
|
<div>
|
||||||
<div id="WeAreHolder" class="align-center" style="margin-right: 35vw; position: relative;">
|
<div class="align-center" style="margin-right: 35vw; position: relative;">
|
||||||
<div class="no-wrap no-interact big-text align-center WeAreText"
|
<div id="WeAreText" class="no-wrap no-interact"
|
||||||
style="color: #ffffff; position: absolute;">
|
style="color: #ffffff; position: absolute;">
|
||||||
We are
|
We are
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ZSpacer style="width: 10vw;"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#WeAreHolder {
|
#WeAreText {
|
||||||
transition: transform 1s cubic-bezier(0,1.32,0,.92);
|
font-family: 'CozetteVector';
|
||||||
transform-style: preserve-3d;
|
font-size: 7.5vw;
|
||||||
|
text-align: end;
|
||||||
|
|
||||||
perspective: 1000px;
|
margin-right: 15vw;
|
||||||
-moz-perspective: 1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.WeAreText {
|
|
||||||
padding: -10px 10px 0px 10px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Binary file not shown.
Loading…
Reference in New Issue