bug fixes
This commit is contained in:
parent
b1a54eb9ef
commit
499abdd186
4 changed files with 57 additions and 31 deletions
|
|
@ -153,13 +153,12 @@
|
||||||
min-height: 100svh;
|
min-height: 100svh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-outer);
|
gap: 0;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
max-width: 75vw;
|
max-width: 75vw;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
gap: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.splash {
|
.splash {
|
||||||
|
|
@ -172,7 +171,7 @@
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
padding: var(--spacing-outer);
|
padding: var(--spacing-outer);
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
padding: var(--spacing-outer) calc(var(--spacing-outer) * 2);
|
padding: var(--spacing-outer) calc(var(--spacing-outer) * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +190,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
z-index: -2;
|
z-index: -2;
|
||||||
margin: -2em 0 -.5em 0;
|
margin: -2em 0 -.5em 0;
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
margin: -1.5em 0 -.5em 0;
|
margin: -1.5em 0 -.5em 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -205,34 +204,41 @@
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto 1em auto;
|
||||||
z-index: -2;
|
z-index: -2;
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
margin: 0 auto .5em auto;
|
margin: 0 auto .5em auto;
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hireme {
|
.hireme {
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
max-width: 95vw;
|
max-width: 95vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hireme h2 {
|
.hireme h2 {
|
||||||
font-size: 1.53em;
|
font-size: 12.5vw;
|
||||||
@media screen and (min-width: 768px) {
|
margin-bottom: 1.5em;
|
||||||
|
@media screen and (orientation: landscape) {
|
||||||
|
font-size: 8vw;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h1, h2 {
|
h2 {
|
||||||
|
font-size: 12vw;
|
||||||
line-height: .9;
|
line-height: .9;
|
||||||
margin: 0;
|
margin: 0 0 0.5em 0;
|
||||||
-webkit-touch-callout: none; /* Safari */
|
-webkit-touch-callout: none; /* Safari */
|
||||||
-webkit-user-select: none; /* Chrome */
|
-webkit-user-select: none; /* Chrome */
|
||||||
-moz-user-select: none; /* Firefox */
|
-moz-user-select: none; /* Firefox */
|
||||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
@media screen and (orientation: landscape) {
|
||||||
|
font-size: 8vw;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
& > em {
|
& > em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
@ -245,12 +251,18 @@
|
||||||
letter-spacing: -0.05em;
|
letter-spacing: -0.05em;
|
||||||
margin-top: -.5em;
|
margin-top: -.5em;
|
||||||
color: var(--color-highlight);
|
color: var(--color-highlight);
|
||||||
|
-webkit-touch-callout: none; /* Safari */
|
||||||
|
-webkit-user-select: none; /* Chrome */
|
||||||
|
-moz-user-select: none; /* Firefox */
|
||||||
|
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
font-size: 11vw;
|
font-size: 11vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > em {
|
& > em {
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -260,8 +272,8 @@
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
font-size: .66em;
|
font-size: .66em;
|
||||||
margin: 0 0 0.25em 0;
|
margin: 0 0 1em 0;
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
margin: 1em 0 0.25em 0;
|
margin: 1em 0 0.25em 0;
|
||||||
font-size: 0.66em;
|
font-size: 0.66em;
|
||||||
}
|
}
|
||||||
|
|
@ -276,7 +288,7 @@
|
||||||
.cta {
|
.cta {
|
||||||
margin-top: -.5em;
|
margin-top: -.5em;
|
||||||
padding-top: 0em;
|
padding-top: 0em;
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (orientation: landscape) {
|
||||||
// background-color: var(--color-bg);
|
// background-color: var(--color-bg);
|
||||||
// border-top: 1px solid var(--color-text);
|
// border-top: 1px solid var(--color-text);
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@
|
||||||
let app: PIXI.Application;
|
let app: PIXI.Application;
|
||||||
let canvas: HTMLCanvasElement;
|
let canvas: HTMLCanvasElement;
|
||||||
|
|
||||||
|
const isLandscape = () => {
|
||||||
|
return window.innerWidth > window.innerHeight;
|
||||||
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
app = new PIXI.Application({
|
app = new PIXI.Application({
|
||||||
view: canvas,
|
view: canvas,
|
||||||
|
|
@ -20,10 +24,12 @@
|
||||||
app.stage.addChild(container);
|
app.stage.addChild(container);
|
||||||
|
|
||||||
const envelope = PIXI.Sprite.from("/success/envelope.png");
|
const envelope = PIXI.Sprite.from("/success/envelope.png");
|
||||||
|
const envelopeAspectRatio = 1420 / 830;
|
||||||
envelope.anchor.set(0.5);
|
envelope.anchor.set(0.5);
|
||||||
envelope.scale.set(0.15);
|
envelope.width = isLandscape() ? window.innerWidth / 4.5 : window.innerWidth / 2 ;
|
||||||
|
envelope.height = envelope.width / envelopeAspectRatio;
|
||||||
envelope.x = app.screen.width / 2;
|
envelope.x = app.screen.width / 2;
|
||||||
envelope.y = envelope.height / 2 + 130;
|
envelope.y = envelope.height / 2 + 30;
|
||||||
|
|
||||||
container.addChild(envelope);
|
container.addChild(envelope);
|
||||||
|
|
||||||
|
|
@ -36,11 +42,12 @@
|
||||||
});
|
});
|
||||||
text.anchor.set(0.5);
|
text.anchor.set(0.5);
|
||||||
text.x = app.screen.width / 2;
|
text.x = app.screen.width / 2;
|
||||||
text.y = envelope.y + envelope.height / 2 + 90;
|
text.y = envelope.y + envelope.height / 2 + 20;
|
||||||
container.addChild(text);
|
container.addChild(text);
|
||||||
text.resolution = window.devicePixelRatio;
|
text.resolution = window.devicePixelRatio;
|
||||||
|
|
||||||
const displacementSprite = PIXI.Sprite.from('/success/displacementMap.jpg');
|
const displacementSprite = PIXI.Sprite.from('/success/displacementMap.jpg');
|
||||||
|
displacementSprite.scale.set(.75);
|
||||||
displacementSprite.texture.baseTexture.wrapMode = PIXI.WRAP_MODES.REPEAT;
|
displacementSprite.texture.baseTexture.wrapMode = PIXI.WRAP_MODES.REPEAT;
|
||||||
const displacementFilter = new PIXI.DisplacementFilter(displacementSprite);
|
const displacementFilter = new PIXI.DisplacementFilter(displacementSprite);
|
||||||
displacementFilter.scale.x = 0;
|
displacementFilter.scale.x = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { CldImage } from 'svelte-cloudinary';
|
|
||||||
import gsap from 'gsap';
|
import gsap from 'gsap';
|
||||||
import SplitText from 'gsap/dist/SplitText';
|
import SplitText from 'gsap/dist/SplitText';
|
||||||
export let data;
|
export let data;
|
||||||
|
|
@ -53,13 +52,12 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
gsap.fromTo(split.chars, {
|
gsap.fromTo(split.chars, {
|
||||||
y: 0,
|
scaleY: 1,
|
||||||
opacity: 1
|
opacity: 1,
|
||||||
}, {
|
}, {
|
||||||
y: -window.innerHeight/2,
|
scaleY: 0,
|
||||||
opacity: 0,
|
opacity: 1,
|
||||||
duration: .6,
|
duration: .3,
|
||||||
stagger: -0.0075,
|
|
||||||
ease: 'power3.out',
|
ease: 'power3.out',
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -158,7 +156,7 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
window.addEventListener('mousemove', mouseMoveHandler);
|
window.addEventListener('mousemove', mouseMoveHandler);
|
||||||
|
|
||||||
// Move the works the same way on touch drag
|
// Move the works the same way on touch drag
|
||||||
let touchMoveHandler = (e: TouchEvent) => {
|
let touchMoveHandler = (e: TouchEvent) => {
|
||||||
let x = e.touches[0].clientX;
|
let x = e.touches[0].clientX;
|
||||||
|
|
@ -175,8 +173,13 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
window.addEventListener('touchmove', touchMoveHandler, { passive: true });
|
window.addEventListener('touchmove', touchMoveHandler, { passive: true });
|
||||||
|
|
||||||
|
document.querySelector('html')?.style.setProperty('overflow', 'hidden');
|
||||||
|
document.querySelector('html')?.style.setProperty('overscroll-behavior', 'none');
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
document.querySelector('html')?.style.setProperty('overflow', 'visible');
|
||||||
|
document.querySelector('html')?.style.setProperty('overscroll-behavior', 'auto');
|
||||||
window.removeEventListener('mousemove', mouseMoveHandler);
|
window.removeEventListener('mousemove', mouseMoveHandler);
|
||||||
window.removeEventListener('touchmove', touchMoveHandler);
|
window.removeEventListener('touchmove', touchMoveHandler);
|
||||||
gsap.killTweensOf('.works, .work');
|
gsap.killTweensOf('.works, .work');
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
:global(html){
|
||||||
|
overflow: hidden;
|
||||||
|
overscroll-behavior: none;
|
||||||
|
}
|
||||||
.works-wrapper {
|
.works-wrapper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue