const toggle = document.getElementById('toggle'); const track = document.getElementById('track'); const knob = document.getElementById('knob'); const rays = document.getElementById('rays'); const stateLabel = document.getElementById('state-label'); const themeRoot = document.getElementById('themeRoot'); let isDay = true; const RAY_COUNT = 8; for (let i = 0; i < RAY_COUNT; i++) { const r = document.createElement('div'); r.className = 'ray'; r.style.transform = `rotate(${i * (360/RAY_COUNT)}deg)`; rays.appendChild(r); } function applyState() { if (isDay) { track.className = 'track day'; knob.className = 'knob day'; toggle.setAttribute('aria-checked', 'true'); themeRoot.classList.remove('night'); } else { track.className = 'track night'; knob.className = 'knob night'; toggle.setAttribute('aria-checked', 'false'); themeRoot.classList.add('night'); } } toggle.addEventListener('click', () => { isDay = !isDay; applyState(); }); toggle.addEventListener('keydown', e => { if (e.key === ' ' || e.key === 'Enter') { e.preventDefault(); isDay = !isDay; applyState(); } }); function copyClass() { navigator.clipboard.writeText(classOut.textContent).catch(() => {}); } // just some fun. console.log("%c👀 hi there!", "font-size:20px") function unhide42() { const alicegameSection = document.getElementById('alice'); const tetrisSection = document.getElementById('tetris'); const experiencesection = document.getElementById('experience'); const educationsection = document.getElementById('education'); const automationsection = document.getElementById('automation'); const interestssection = document.getElementById('interests'); const opinionsection = document.getElementById('opinion'); const interestlistsection = document.getElementById('interestlist'); const hiddenssection = document.getElementById('secret'); if (hiddenssection.style.display == 'none') { hiddenssection.style.display = 'block'; } else { hiddenssection.style.display = 'none'; } alicegameSection.style.display = 'none'; tetrisSection.style.display = 'none'; experiencesection.style.display = 'none'; educationsection.style.display = 'none'; automationsection.style.display = 'none'; interestssection.style.display = 'none'; opinionsection.style.display = 'none'; interestlistsection.style.display = 'none'; }