<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bio</title>
<style>
body {
font-family: "Georgia", "Times New Roman", serif;
background: #f6f1e9;
color: #3a3a3a;
padding: 40px 20px;
margin: 0;
line-height: 1.7;
}
.bio-container {
max-width: 700px;
margin: auto;
background: #ffffff;
padding: 40px 35px;
border-radius: 12px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
h1 {
font-size: 2.4em;
text-align: center;
margin-bottom: 10px;
color: #2d2d2d;
}
.subtitle {
text-align: center;
font-size: 1em;
color: #6a6a6a;
margin-bottom: 30px;
}
.portrait,
.inline-image {
width: 160px;
height: 160px;
border-radius: 8px;
object-fit: cover;
display: block;
margin: 0 auto 25px;
border: 3px solid #ddd;
}
.block {
margin-bottom: 22px;
font-size: 1.1em;
}
.quote {
font-style: italic;
background: #f2e9d8;
border-left: 4px solid #c9b28e;
padding: 15px 18px;
margin: 30px 0;
border-radius: 4px;
}
.footer-note {
text-align: center;
color: #777;
font-size: 0.9em;
margin-top: 35px;
}
</style>
</head>
<body>
<div class="bio-container" id="bio"></div>
<script>
async function loadBio() {
try {
const response = await fetch("bio.json?t=" + Date.now());
const bio = await response.json();
const container = document.getElementById("bio");
let html = "";
// Name + subtitle
html += `<h1>${bio.name}</h1>`;
html += `<div class="subtitle">${bio.subtitle}</div>`;
// Loop through flexible content array
bio.content.forEach(item => {
if (item.type === "section") {
html += `<div class="block">${item.text}</div>`;
}
if (item.type === "quote") {
html += `<div class="quote">${item.text}</div>`;
}
if (item.type === "image") {
html += `<img class="inline-image" src="${item.src}" alt="">`;
}
});
// Footer
if (bio.footer) {
html += `<div class="footer-note">${bio.footer}</div>`;
}
container.innerHTML = html;
}
catch (e) {
document.getElementById("bio").innerHTML = "Error loading bio.json";
}
}
loadBio();
</script>
</body>
</html>