Initial commit

This commit is contained in:
2026-08-08 18:21:12 +00:00
commit 4b36b9a68e
13 changed files with 655 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
// 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 += `<section><p>Error loading section: ${section}</p></section>`;
}
} catch (err) {
console.warn(`Failed to load section: ${section}`, err);
html += `<section><p>Failed to load section: ${section}</p></section>`;
}
}
container.innerHTML = html;
}
loadSections();