Remove unused scripts

This commit is contained in:
Adam Iannazzone 2024-10-30 12:45:50 -04:00
parent 7a681d8829
commit b90d9725fb
2 changed files with 0 additions and 79 deletions

View file

@ -1,49 +0,0 @@
// const featureContainerElems = document.getElementsByClassName('feature-container');
// let currentFeature = 1
// for (let i = 0; i < featureContainerElems.length; i++) {
// featureContainerElems[i].addEventListener('click', function() {
// if (i != currentFeature) {
// updateActiveFeature(i);
// }
// })
// }
// document.addEventListener('keyup', keyControl);
// function keyControl(e) {
// if (e.code == 'ArrowRight') {
// if (currentFeature < featureContainerElems.length-2) {
// updateActiveFeature(currentFeature + 1);
// } else {
// updateActiveFeature(1);
// }
// }
// if (e.code == 'ArrowLeft') {
// if (currentFeature > 1) {
// updateActiveFeature(currentFeature - 1);
// } else {
// updateActiveFeature(featureContainerElems.length-2);
// }
// }
// }
// function updateActiveFeature(i) {
// const lastCurrentFeature = currentFeature;
// currentFeature = i;
// featureContainerElems[i].id = 'active-feature';
// featureContainerElems[i].scrollIntoView({block: 'start', inline: 'center'});
// featureContainerElems[lastCurrentFeature].id = ''
// }
document.addEventListener('keyup', function(e) {
if (e.code == 'ArrowRight') {
document.getElementById('carousel-next').click();
document.getElementById('features').scrollIntoView({block: 'center'});
} else if (e.code == 'ArrowLeft') {
document.getElementById('carousel-prev').click();
document.getElementById('features').scrollIntoView({block: 'center'});
}
});

View file

@ -1,30 +0,0 @@
let gradientSpinElems = document.getElementsByClassName('gradient-spin');
let gradientAngles = Array.from({ length: gradientSpinElems.length }, () => Math.floor(Math.random() * 361) + 1);
let gradientInterval;
reduceMotion();
function updateGradientAngle() {
for (let i = 0; i < gradientSpinElems.length; i++) {
gradientAngles[i] += Math.floor(Math.random() * 6) - 2;
if (gradientAngles[i] > 360) {
gradientAngles[i] -= 360;
} else if (gradientAngles[i] < -360) {
gradientAngles[i] += 360;
}
gradientSpinElems[i].style.background = `linear-gradient(${gradientAngles[i]}deg, #1a9fff, 15%, #946beb)`;
}
}
function reduceMotion() {
let reduceMotionState = document.getElementById('reduce-motion-switch').checked;
if (reduceMotionState) {
clearInterval(gradientInterval);
// document.getElementById('screenshotCarousel').classList.remove('ride');
} else {
// document.getElementById('screenshotCarousel').classList.add('ride');
gradientInterval = setInterval(function () {
updateGradientAngle();
}, 100);
}
}