NookStage

The collection

Spaces with a point of view.

Search real planning details and save promising rooms to Fallows.

Open Fallows
`; document.querySelector('footer').innerHTML=` `; (() => { const root = document.documentElement; const saved = localStorage.getItem('nookstage-theme'); if (saved === 'dark') root.classList.add('dark'); document.querySelector('[data-theme-toggle]')?.addEventListener('click', () => { root.classList.toggle('dark'); localStorage.setItem('nookstage-theme', root.classList.contains('dark') ? 'dark' : 'light'); }); document.querySelector('[data-open-login]')?.addEventListener('click', () => document.querySelector('#login-modal').hidden = false); document.querySelector('[data-open-register]')?.addEventListener('click', () => document.querySelector('#register-modal').hidden = false); document.querySelectorAll('[data-close-modal]').forEach(button => button.addEventListener('click', () => button.closest('[role="dialog"]').hidden = true)); const cookieBanner = document.querySelector('#cookie-banner'); if (localStorage.getItem('nookstage-cookies') === 'accepted') cookieBanner.hidden = true; document.querySelector('[data-accept-cookies]')?.addEventListener('click', () => { localStorage.setItem('nookstage-cookies','accepted'); cookieBanner.hidden = true; }); })(); const grid=document.querySelector('#venue-grid'), search=document.querySelector('#search'), category=document.querySelector('#category'), pagination=document.querySelector('#pagination'); let items=[], page=1; const size=6; const getFav=()=>JSON.parse(localStorage.getItem('nookstage-favorites')||'[]'); const setFav=x=>localStorage.setItem('nookstage-favorites',JSON.stringify(x)); const getCart=()=>JSON.parse(localStorage.getItem('nookstage-cart')||'{}'); const setCart=x=>localStorage.setItem('nookstage-cart',JSON.stringify(x)); fetch('./catalog.json').then(r=>r.json()).then(data=>{items=data;[...new Set(items.map(x=>x.category))].forEach(x=>category.insertAdjacentHTML('beforeend',``));render()}).catch(()=>grid.innerHTML='

Venue information could not be loaded. Please contact our team.

'); function render(){ const q=search.value.toLowerCase(); const filtered=items.filter(x=>(!q||`${x.name} ${x.city} ${x.atmosphere}`.toLowerCase().includes(q))&&(!category.value||x.category===category.value)); const pages=Math.max(1,Math.ceil(filtered.length/size)); page=Math.min(page,pages); grid.innerHTML=filtered.slice((page-1)*size,page*size).map(x=>`

${x.category} · ${x.city}

${x.name}

${x.description}

${x.capacity} guests · $${x.price}/event · ${x.duration}

${x.atmosphere}

`).join('')||'

No venues match those filters. Try a broader search.

'; pagination.innerHTML=Array.from({length:pages},(_,i)=>``).join(''); attachEvents(); } function attachEvents(){ document.querySelectorAll('[data-detail]').forEach(btn=>btn.onclick=()=>{ const item=items.find(i=>i.id===btn.dataset.detail); const modal=document.querySelector('#detail-modal'); document.querySelector('#detail-content').innerHTML=`

${item.name}

${item.city} · ${item.category}

${item.description}

${item.capacity} guests
$${item.price} per event
${item.duration}
${item.atmosphere}
Amenities

${item.amenities.join(' · ')}

`; modal.hidden=false; modal.querySelector('[data-close-detail]').onclick=()=>modal.hidden=true; modal.querySelectorAll('[data-fav]').forEach(b=>b.onclick=()=>{const f=getFav();const id=b.dataset.fav;const ix=f.indexOf(id);if(ix>-1)f.splice(ix,1);else f.push(id);setFav(f);b.textContent=f.includes(id)?'Saved':'Save to Fallows';render();}); modal.querySelectorAll('[data-cart]').forEach(b=>b.onclick=()=>{const c=getCart();const id=b.dataset.cart;c[id]=(c[id]||0)+1;setCart(c);alert('Venue added to cart.');}); }); document.querySelectorAll('[data-fav]').forEach(btn=>btn.onclick=()=>{const f=getFav();const id=btn.dataset.fav;const ix=f.indexOf(id);if(ix>-1)f.splice(ix,1);else f.push(id);setFav(f);render();}); document.querySelectorAll('[data-cart]').forEach(btn=>btn.onclick=()=>{const c=getCart();const id=btn.dataset.cart;c[id]=(c[id]||0)+1;setCart(c);alert('Venue added to cart.');}); pagination.onclick=e=>{if(e.target.dataset.page){page=+e.target.dataset.page;render();}}; } search.oninput=()=>{page=1;render()}; category.onchange=()=>{page=1;render()};