Add events list and Applause for a Cause event page

This commit is contained in:
Ian Gulliver
2025-12-29 13:04:15 -08:00
parent 39d88019e8
commit 9636171b7f
3 changed files with 113 additions and 16 deletions

BIN
static/afac26-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

67
static/afac26.html Normal file
View File

@@ -0,0 +1,67 @@
<!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>Applause for a Cause - 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;
flex-direction: column;
align-items: center;
min-height: 100vh;
margin: 0;
padding: 1rem;
}
#signin { display: none; }
#main { display: none; width: 100%; max-width: 600px; }
.header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 2rem;
width: 100%;
}
.header img {
width: 40px;
height: 40px;
border-radius: 50%;
}
.header .spacer { flex: 1; }
</style>
</head>
<body style="opacity: 0">
<div id="signin"></div>
<div id="main">
<div class="header">
<img data-bind="picture" alt="Profile">
<span data-bind="name"></span>
<span class="spacer"></span>
<wa-button variant="neutral" size="small" id="logout-btn">Switch User</wa-button>
</div>
<wa-card style="text-align: center;">
<img src="/afac26-logo.png" alt="Applause for a Cause" style="height: 120px; border-radius: 8px; margin-bottom: 1rem;">
<p>Feb 7, 2026 · 6:30 PM</p>
<p>Helios Gym</p>
</wa-card>
</div>
<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('main').style.display = 'block';
document.getElementById('logout-btn').addEventListener('click', logout);
await customElements.whenDefined('wa-card');
document.body.style.opacity = 1;
</script>
</body>
</html>

View File

@@ -11,37 +11,67 @@
body {
font-family: var(--wa-font-sans);
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
min-height: 100vh;
margin: 0;
padding: 1rem;
}
.profile {
#signin { display: none; }
#main { display: none; width: 100%; max-width: 600px; }
.header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 2rem;
width: 100%;
}
.profile img {
width: 64px;
height: 64px;
.header img {
width: 40px;
height: 40px;
border-radius: 50%;
}
#signin, #welcome { display: none; }
.header .user-info {
display: flex;
align-items: center;
gap: 0.5rem;
}
.header .spacer { flex: 1; }
.event-card {
display: flex;
align-items: center;
gap: 1rem;
text-decoration: none;
color: inherit;
}
.event-card img {
height: 80px;
border-radius: 8px;
}
.event-info h3 { margin: 0 0 0.25rem 0; }
.event-info p { margin: 0; opacity: 0.7; }
</style>
</head>
<body style="opacity: 0">
<div id="signin"></div>
<wa-card id="welcome">
<div class="profile" slot="header">
<div id="main">
<div class="header">
<img data-bind="picture" alt="Profile">
<div>
<div><strong data-bind="name"></strong></div>
<div data-bind="email"></div>
</div>
<span data-bind="name"></span>
<span class="spacer"></span>
<wa-button variant="neutral" size="small" id="logout-btn">Switch User</wa-button>
</div>
<p>Welcome to HCA Tickets!</p>
<wa-button variant="neutral" id="logout-btn">Switch User</wa-button>
</wa-card>
<h2>Events</h2>
<wa-card>
<a href="/afac26.html" class="event-card">
<img src="/afac26-logo.png" alt="Applause for a Cause">
<div class="event-info">
<p>Feb 7, 2026 · 6:30 PM</p>
<p>Helios Gym</p>
</div>
</a>
</wa-card>
</div>
<script type="module">
import { auth, logout } from '/app.js';
@@ -50,7 +80,7 @@
});
await auth();
document.getElementById('welcome').style.display = 'block';
document.getElementById('main').style.display = 'block';
document.getElementById('logout-btn').addEventListener('click', logout);
await customElements.whenDefined('wa-card');