diff --git a/scripts/features.js b/scripts/features.js deleted file mode 100644 index 2dff533..0000000 --- a/scripts/features.js +++ /dev/null @@ -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'}); - } -}); \ No newline at end of file diff --git a/scripts/gradient.js b/scripts/gradient.js deleted file mode 100644 index 64719e3..0000000 --- a/scripts/gradient.js +++ /dev/null @@ -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); - } -} \ No newline at end of file