Fallows
Your field notes shelf.
Keep promising directions close while you decide which practice belongs in your next studio cycle.
`;
const footerHTML = ``;
document.querySelector('header').innerHTML = headerHTML;
document.querySelector('footer').innerHTML = footerHTML;
const saved = () => JSON.parse(localStorage.getItem('fm-fallows') || '[]');
fetch('./catalog.json').then(r => r.json()).then(items => {
const list = document.getElementById('fallows-list');
const draw = () => {
const current = items.filter(x => saved().includes(x.id));
list.innerHTML = current.length ? current.map(x => `${x.summary}
Next note: consider how this practice could fit one real project.
`).join('') : `Your shelf is ready for a first note.
Save a course from the catalog and return here when you are ready to compare directions.
Browse catalog `;
};
draw();
list.onclick = e => {
if (e.target.dataset.remove) {
localStorage.setItem('fm-fallows', JSON.stringify(saved().filter(id => id !== e.target.dataset.remove)));
draw();
}
};
});
const toggle = document.getElementById('mobile-menu-toggle');
const menu = document.getElementById('mobile-menu');
const theme = document.getElementById('theme-toggle');
const modal = document.getElementById('auth-modal');
const close = document.getElementById('auth-close');
if (toggle) toggle.onclick = () => { const open = menu.classList.toggle('hidden'); toggle.setAttribute('aria-expanded', String(!open)); };
if (theme) theme.onclick = () => { const dark = document.documentElement.classList.toggle('dark'); localStorage.setItem('fm-theme', dark ? 'dark' : 'light'); };
if (localStorage.getItem('fm-theme') === 'dark') document.documentElement.classList.add('dark');
document.querySelectorAll('#login-open,#register-open').forEach(button => button.onclick = () => modal.classList.remove('hidden'));
if (close) close.onclick = () => modal.classList.add('hidden');
const cookieBanner = document.getElementById('cookie-banner');
if (localStorage.getItem('fm-cookie-consent') === 'true') cookieBanner.classList.add('hidden');
document.getElementById('cookie-close').onclick = () => { localStorage.setItem('fm-cookie-consent', 'true'); cookieBanner.classList.add('hidden'); };
})();