Member access
This demonstration keeps account access local to your browser. No real credentials are collected.
Ask about access
Your Fallows
Keep the courses that keep calling.
Fallows is your local watchlist for comparing paths before you decide. It is stored only in this browser.
Loading your saved courses…
`;
const footerHTML = ``;
document.getElementById("site-header").innerHTML = headerHTML;
document.getElementById("site-footer").innerHTML = footerHTML;
const esc = s => String(s).replace(/[&<>"']/g, c => ({"&":"&","<":"<",">":">",'"':""","'":"'"}[c]));
let all = [];
function render() {
const ids = JSON.parse(localStorage.getItem("swiftmarkFavorites") || "[]");
const items = all.filter(x => ids.includes(x.id));
document.querySelector("#fallows-status").textContent = items.length ? `${items.length} saved course${items.length === 1 ? "" : "s"}` : "Your Fallows list is empty. Browse the catalog to save a course.";
document.querySelector("#fallows-grid").innerHTML = items.map(x => `${esc(x.category)}
${esc(x.title)}
${esc(x.summary)}
$${x.price.toFixed(2)}
`).join("");
}
fetch("./catalog.json").then(r => r.json()).then(data => { all = data; render(); }).catch(() => { document.querySelector("#fallows-status").textContent = "Unable to load catalog data."; });
document.addEventListener("click", e => {
const b = e.target.closest("[data-remove]");
if (b) {
const ids = JSON.parse(localStorage.getItem("swiftmarkFavorites") || "[]").filter(id => id !== b.dataset.remove);
localStorage.setItem("swiftmarkFavorites", JSON.stringify(ids));
render();
}
});
(function(){
const nav = document.querySelector("#main-nav"), toggle = document.querySelector("#mobile-menu-toggle"), auth = document.querySelector("#auth-modal");
if (toggle) toggle.onclick = () => { const open = nav.classList.toggle("hidden"); toggle.setAttribute("aria-expanded", String(!open)); };
const login = document.querySelector("#login-open"); if (login) login.onclick = e => { e.preventDefault(); document.querySelector("#auth-title").textContent = "Log in to your studio space"; auth.classList.replace("hidden","flex"); };
const reg = document.querySelector("#register-open"); if (reg) reg.onclick = e => { e.preventDefault(); document.querySelector("#auth-title").textContent = "Register your interest"; auth.classList.replace("hidden","flex"); };
const close = document.querySelector("#auth-close"); if (close) close.onclick = () => auth.classList.replace("flex","hidden");
const theme = document.querySelector("#theme-toggle"); if (theme) theme.onclick = () => { const light = document.body.classList.toggle("bg-[#F7F2E8]"); document.body.classList.toggle("text-[#071426]", light); localStorage.setItem("swiftmarkTheme", light ? "light" : "dark"); };
if (localStorage.getItem("swiftmarkTheme") === "light") document.body.classList.add("bg-[#F7F2E8]","text-[#071426]");
const banner = document.querySelector("#cookie-banner"); if (banner) { if (localStorage.getItem("swiftmarkCookieConsent") === "accepted") banner.remove(); else { const btn = document.querySelector("#cookie-close"); if (btn) btn.onclick = () => { localStorage.setItem("swiftmarkCookieConsent","accepted"); banner.remove(); }; } }
})();