started removing more old stuff, but tired :/
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / test_service (push) Successful in 19s
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / test_service (push) Successful in 19s
This commit is contained in:
parent
7d147f290f
commit
b7f343731c
1 changed files with 1 additions and 74 deletions
|
|
@ -57,75 +57,6 @@
|
||||||
requestAnimationFrame(step);
|
requestAnimationFrame(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Out animation:
|
|
||||||
function flyInFromTop(
|
|
||||||
node: HTMLElement,
|
|
||||||
{
|
|
||||||
y = -window.innerHeight,
|
|
||||||
duration = 400,
|
|
||||||
opacity = 0,
|
|
||||||
}: { y?: number; duration?: number; opacity?: number } = {},
|
|
||||||
) {
|
|
||||||
const {
|
|
||||||
delay = 0,
|
|
||||||
duration: d,
|
|
||||||
easing = (t) => t,
|
|
||||||
css,
|
|
||||||
} = fly(node, { y, duration: d, opacity });
|
|
||||||
|
|
||||||
let start: number;
|
|
||||||
function step(now: number) {
|
|
||||||
if (!start) start = now;
|
|
||||||
const elapsed = now - start - delay;
|
|
||||||
if (elapsed < 0) return requestAnimationFrame(step);
|
|
||||||
const t = Math.min(elapsed / d, 1);
|
|
||||||
if (css) node.style.cssText = css(easing(t), 1 - easing(t));
|
|
||||||
if (elapsed < d) requestAnimationFrame(step);
|
|
||||||
}
|
|
||||||
requestAnimationFrame(step);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
return; // Fuck this, I'm too lazy to fix this atm
|
|
||||||
totalScroll = document.documentElement.scrollHeight - window.innerHeight;
|
|
||||||
|
|
||||||
unscrollInterval = setInterval(() => {
|
|
||||||
// Prevents scroll to bottom on first try
|
|
||||||
if (
|
|
||||||
!notFirstScroll &&
|
|
||||||
scrollY > totalScroll - unscrollScrollDiv.scrollHeight
|
|
||||||
) {
|
|
||||||
smoothScrollTo(totalScroll - unscrollScrollDiv.scrollHeight * 1.1, 0);
|
|
||||||
|
|
||||||
// Allow further scroll after delay
|
|
||||||
setTimeout(() => {
|
|
||||||
notFirstScroll = true;
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// console.log("Time with delay: " + (Date.now() - -unscrollDelay) + " Other " + lastScrollTime);
|
|
||||||
// console.log(isBeingTouched);
|
|
||||||
if (
|
|
||||||
!notFirstScroll ||
|
|
||||||
isBeingTouched ||
|
|
||||||
Date.now() < lastScrollTime - -unscrollDelay
|
|
||||||
) {
|
|
||||||
// console.log("nah");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (totalScroll - unscrollScrollDiv.scrollHeight < scrollY) {
|
|
||||||
smoothScrollTo(totalScroll - unscrollScrollDiv.scrollHeight, 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (totalScroll <= scrollY) {
|
|
||||||
console.log("Hit!");
|
|
||||||
// isLeavingAnimating = true;
|
|
||||||
flyInFromTop(tranisitionOverlay, { duration: 800 });
|
|
||||||
}
|
|
||||||
}, 10);
|
|
||||||
});
|
|
||||||
|
|
||||||
function onScroll() {
|
function onScroll() {
|
||||||
lastScrollTime = Date.now();
|
lastScrollTime = Date.now();
|
||||||
// console.log("scroll");
|
// console.log("scroll");
|
||||||
|
|
@ -188,16 +119,12 @@
|
||||||
<br />
|
<br />
|
||||||
<span>Benjamin Dreyer</span>
|
<span>Benjamin Dreyer</span>
|
||||||
<br />
|
<br />
|
||||||
<span>Oliver Schwenger</span>
|
|
||||||
<br />
|
|
||||||
<span>Sylvester Junge</span>
|
|
||||||
<br />
|
|
||||||
<span>Snorre Ettrup Altschul</span>
|
<span>Snorre Ettrup Altschul</span>
|
||||||
<br />
|
<br />
|
||||||
<span>{$re?.name ?? "BOT Alex"}</span>
|
<span>{$re?.name ?? "BOT Alex"}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
<h3><b>About this website</b></h3>
|
<h3><b>Info</b></h3>
|
||||||
<!-- <a href="/" target="_blank">Recursion</a> -->
|
<!-- <a href="/" target="_blank">Recursion</a> -->
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
This website was made using <a
|
This website was made using <a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue