Skyline Ledger Review

Your reading shelf

Fallows for ideas worth revisiting.

Your saved products stay in this browser. No account or server sync is required. Revisit horizon-framed reports on skyline, terracotta, sage, ledger, and acorn themes.

Find more editorial products
`; const footerHTML = ` `; document.getElementById('site-header').innerHTML = headerHTML; document.getElementById('site-footer').innerHTML = footerHTML; // Theme toggle function initTheme() { const toggle = document.querySelector('[data-theme-toggle]'); if (!toggle) return; if (localStorage.getItem('slr-theme') === 'dark') { document.documentElement.classList.add('dark'); document.body.style.background = '#2F332E'; document.body.style.color = '#F7F1E8'; } toggle.addEventListener('click', () => { if (document.documentElement.classList.contains('dark')) { document.documentElement.classList.remove('dark'); document.body.style.background = '#F7F1E8'; document.body.style.color = '#2F332E'; localStorage.setItem('slr-theme', 'light'); } else { document.documentElement.classList.add('dark'); document.body.style.background = '#2F332E'; document.body.style.color = '#F7F1E8'; localStorage.setItem('slr-theme', 'dark'); } }); } // Mobile menu function initMobileMenu() { const toggle = document.querySelector('[data-menu-toggle]'); const menu = document.querySelector('[data-mobile-menu]'); if (!toggle || !menu) return; toggle.addEventListener('click', () => menu.classList.toggle('hidden')); } // Account modal function initAccountModal() { const openBtn = document.querySelector('[data-account-open]'); const modal = document.getElementById('account-modal'); if (!openBtn || !modal) return; openBtn.addEventListener('click', () => modal.classList.remove('hidden')); modal.addEventListener('click', (e) => { if (e.target === modal || e.target.hasAttribute('data-modal-close')) modal.classList.add('hidden'); }); const form = document.getElementById('account-form'); form.addEventListener('submit', (e) => { e.preventDefault(); alert('Signed in successfully. Welcome back to Skyline Ledger Review.'); modal.classList.add('hidden'); }); } // Cookie banner function initCookieBanner() { const banner = document.getElementById('cookie-banner'); const accept = document.querySelector('[data-cookie-accept]'); if (!banner || !accept) return; if (!localStorage.getItem('slr-cookie-consent')) { banner.style.display = 'block'; } accept.addEventListener('click', () => { localStorage.setItem('slr-cookie-consent', 'true'); banner.style.display = 'none'; }); } // Fallows logic async function loadFallows() { const container = document.getElementById('followed-products'); const empty = document.getElementById('empty-state'); let favorites = JSON.parse(localStorage.getItem('slr-favorites') || '[]'); if (!favorites.length) { empty.classList.remove('hidden'); container.innerHTML = ''; return; } empty.classList.add('hidden'); try { const res = await fetch('./catalog.json'); const catalog = await res.json(); const followed = catalog.filter(item => favorites.includes(item.id)); container.innerHTML = ''; followed.forEach(item => { const card = document.createElement('div'); card.className = 'rounded-3xl border border-[#DCCFC0] bg-white p-8'; card.innerHTML = `
${item.horizon}

${item.title}

${item.description}

${item.format} · ${item.duration} ${item.price}
`; container.appendChild(card); card.querySelector('[data-remove]').addEventListener('click', () => { favorites = favorites.filter(id => id !== item.id); localStorage.setItem('slr-favorites', JSON.stringify(favorites)); loadFallows(); }); }); } catch (e) { container.innerHTML = '

Unable to load catalog data.

'; } } // Init everything function initAll() { initTheme(); initMobileMenu(); initAccountModal(); initCookieBanner(); loadFallows(); } initAll(); })();