forge/examples/spa/index.html
Chris Wanstrath 855112ac82 themes
2025-12-29 14:18:30 -08:00

33 lines
800 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forge SPA Examples</title>
<style>
html, body {
margin: 0;
height: 100%;
}
#root {
height: 100%;
}
</style>
</head>
<body data-theme="dark">
<div id="root"></div>
<script type="module" src="/spa.js"></script>
<script>
// Load saved theme and apply it
const savedTheme = localStorage.getItem('theme') || 'dark'
document.body.setAttribute('data-theme', savedTheme)
// Set initial select value after page loads
window.addEventListener('load', () => {
const select = document.getElementById('theme-select')
if (select) select.value = savedTheme
})
</script>
</body>
</html>