reorg css; color variables; reorg js; remove old code, comments

This commit is contained in:
Spencer Flagg
2022-10-21 16:19:18 +02:00
parent 7e164ad4e8
commit 443254a087
47 changed files with 815 additions and 1278 deletions

60
src/assets/js/landing.js Normal file
View File

@@ -0,0 +1,60 @@
//////////////////////////////////////////
// GSAP ACTIONS
// options: "play", "pause", "resume", "reset", "restart", "complete", "reverse", and "none"
// arguments: onEnter, onLeave, onEnterBack, and onLeaveBack
const defaultActions = "play none none none";
//////////////////////////////////////////
// RE-RENDER COMPLEX ANIMATIONS ON WINDOW RESIZE
function onResizeComplete() {
positionServiceIcons();
initializeSizes();
}
var resizeTimeout = setTimeout(onResizeComplete, 400);
window.onresize = function () {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(onResizeComplete, 400);
console.log("onresize");
};
//////////////////////////////////////////
// AUTO APPLY URL ANCHORS
// // TODO: pull this from data js instead
// const sections = [
// "pitch",
// "products",
// "infographics",
// "bitcoin",
// "be-your-own",
// "powered-by",
// "support",
// "dev",
// "community",
// ];
// setTimeout(function () {
// // timeout to allow initial load to redirect to anchor
// // TODO: maybe apply the scroll-behavior: smooth to HTML after a timeout
// sections.forEach((slug) => {
// ScrollTrigger.create({
// trigger: "#" + slug,
// start: "top 25%",
// end: "bottom 25%",
// //markers: { startColor: "white", endColor: "white" },
// onEnter: () => {
// window.location.href = "#" + slug;
// },
// onEnterBack: () => {
// window.location.href = "#" + slug;
// },
// });
// });
// }, 2000);