Files
rsvp/static/index.html
2025-12-29 12:48:33 -08:00

61 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<script>document.documentElement.className = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'wa-dark' : 'wa-light';</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HCA Tickets</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist-cdn/styles/themes/default.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist-cdn/webawesome.loader.js"></script>
<style>
body {
font-family: var(--wa-font-sans);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}
.profile {
display: flex;
align-items: center;
gap: 1rem;
}
.profile img {
width: 64px;
height: 64px;
border-radius: 50%;
}
#signin, #welcome { display: none; }
</style>
</head>
<body style="opacity: 0">
<div id="signin"></div>
<wa-card id="welcome">
<div class="profile" slot="header">
<img data-bind="picture" alt="Profile">
<div>
<div><strong data-bind="name"></strong></div>
<div data-bind="email"></div>
</div>
</div>
<p>Welcome to HCA Tickets!</p>
<wa-button variant="neutral" id="logout-btn">Switch User</wa-button>
</wa-card>
<script type="module">
import { auth, logout } from '/app.js';
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
document.documentElement.className = e.matches ? 'wa-dark' : 'wa-light';
});
await auth();
document.getElementById('welcome').style.display = 'block';
document.getElementById('logout-btn').addEventListener('click', logout);
await customElements.whenDefined('wa-card');
document.body.style.opacity = 1;
</script>
</body>
</html>