|
|
|
|
|
|
|
|
class App { |
|
|
constructor() { |
|
|
this.currentSection = 'overview'; |
|
|
this.init(); |
|
|
} |
|
|
|
|
|
init() { |
|
|
this.setupNavigation(); |
|
|
this.updateSliderValues(); |
|
|
} |
|
|
|
|
|
setupNavigation() { |
|
|
const navLinks = document.querySelectorAll('.nav-link'); |
|
|
|
|
|
navLinks.forEach(link => { |
|
|
link.addEventListener('click', (e) => { |
|
|
e.preventDefault(); |
|
|
const section = link.dataset.section; |
|
|
this.navigateTo(section); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
navigateTo(section) { |
|
|
|
|
|
document.querySelectorAll('.nav-link').forEach(link => { |
|
|
link.classList.remove('active'); |
|
|
if (link.dataset.section === section) { |
|
|
link.classList.add('active'); |
|
|
} |
|
|
}); |
|
|
|
|
|
|
|
|
document.querySelectorAll('.section').forEach(sec => { |
|
|
sec.classList.remove('active'); |
|
|
}); |
|
|
document.getElementById(section).classList.add('active'); |
|
|
|
|
|
this.currentSection = section; |
|
|
} |
|
|
|
|
|
updateSliderValues() { |
|
|
const quantumInfluence = document.getElementById('quantum-influence'); |
|
|
const entanglementDepth = document.getElementById('entanglement-depth'); |
|
|
|
|
|
if (quantumInfluence) { |
|
|
quantumInfluence.addEventListener('input', (e) => { |
|
|
document.getElementById('quantum-influence-val').textContent = e.target.value; |
|
|
}); |
|
|
} |
|
|
|
|
|
if (entanglementDepth) { |
|
|
entanglementDepth.addEventListener('input', (e) => { |
|
|
document.getElementById('entanglement-val').textContent = e.target.value; |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const app = new App(); |