// Assembles section HTML files into the page. // Each section is a separate file for easy editing. const sections = [ "sections/header.html", "sections/about.html", "sections/teaching.html", "sections/research.html", "sections/cv.html", // "sections/projects.html", "sections/contact.html", ]; async function loadSections() { const container = document.getElementById("page-content"); let html = ""; for (const section of sections) { try { const response = await fetch(section); if (response.ok) { const text = await response.text(); html += text; } else { console.warn(`Could not load section: ${section}`); html += `

Error loading section: ${section}

`; } } catch (err) { console.warn(`Failed to load section: ${section}`, err); html += `

Failed to load section: ${section}

`; } } container.innerHTML = html; } loadSections();