Silverbrook Ledger

Bring us your market question.

Ask about course scope, study pacing, accessibility, or choosing a starting point. We reply during regular business hours.

Margin Note

A precise question is often the beginning of a better lesson.

`; const footerHTML = ``; document.querySelector('header').innerHTML = headerHTML; document.querySelector('footer').innerHTML = footerHTML; function initHeaderScripts() { document.querySelectorAll('[data-modal]').forEach(b => { b.onclick = () => { document.getElementById(b.dataset.modal).hidden = false; }; }); document.querySelectorAll('[data-close]').forEach(b => { b.onclick = () => { b.closest('[role=dialog]').hidden = true; }; }); const mobileBtn = document.getElementById('mobile-menu-btn'); const mobileNav = document.getElementById('mobile-nav'); if (mobileBtn && mobileNav) { mobileBtn.onclick = () => mobileNav.classList.toggle('hidden'); } const t = document.getElementById('theme-toggle'); if (t) { t.onclick = () => { document.documentElement.classList.toggle('dark'); localStorage.setItem('sl-theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); }; } if (localStorage.getItem('sl-theme') === 'dark') document.documentElement.classList.add('dark'); } function initFooterScripts() { const banner = document.getElementById('cookie-banner'); if (banner && !localStorage.getItem('sl-cookie-consent')) { banner.classList.remove('hidden'); } const acceptBtn = document.getElementById('accept-cookies'); if (acceptBtn) { acceptBtn.onclick = function() { localStorage.setItem('sl-cookie-consent', 'yes'); if (banner) banner.remove(); }; } } function initContactForm() { const form = document.getElementById('contact-form'); const errorModal = document.getElementById('error-modal'); const errorText = document.getElementById('error-text'); const success = document.getElementById('success-state'); form.onsubmit = function(e) { if (!form.checkValidity()) { e.preventDefault(); errorText.textContent = 'Please provide a valid name, email address, and message of at least ten characters.'; errorModal.hidden = false; return false; } e.preventDefault(); form.style.display = 'none'; success.hidden = false; return false; }; } initHeaderScripts(); initFooterScripts(); initContactForm();