function toggleTheme() { //const root = document.documentElement; //const dark = root.style.getPropertyValue('--bg-color') === '#0f1117'; //root.style.setProperty('--bg-color', dark ? '#ffffff' : '#0f1117'); //root.style.setProperty('--fg-color', dark ? '#000000' : '#f4f4f4'); //root.style.setProperty('--code-bg', dark ? '#f0f0f0' : '#1a1c22'); } function filterContent() { const query = document.getElementById('searchInput').value.toLowerCase(); document.querySelectorAll('.section').forEach(section => { const text = section.innerText.toLowerCase(); section.style.display = text.includes(query) ? 'block' : 'none'; }); } function downloadOfflineVersion() { const blob = new Blob([document.documentElement.outerHTML], { type: 'text/html' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'SystemsLangDocumentation.html'; a.click(); } function toggleSection(header) { const section = header.parentElement; section.classList.toggle('open'); } function toggleSearch() { const dropdown = document.getElementById('searchDropdown'); dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block'; }