Files
KCal/public/login.html
T
ort 66b8fc5d4d Add self-hosted kids calendar app
Express + SQLite (node:sqlite, no native build step) family calendar:
parent accounts with household invites, per-child calendars with
save/duplicate/print, a token-gated read-only kiosk view for tablets,
and polling to keep parent and kiosk views in sync. Defaults to port 3007.
2026-08-15 13:48:01 -04:00

54 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Log in — Kids Calendar</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@500;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/css/shared.css">
</head>
<body>
<div class="auth-wrap">
<h1>Welcome back</h1>
<p class="lead">Log in to see and edit your family's calendars.</p>
<div class="error-msg" id="errorMsg" style="display:none;"></div>
<form id="loginForm">
<div class="field">
<label for="email">Email</label>
<input type="email" id="email" autocomplete="email" required>
</div>
<div class="field">
<label for="password">Password</label>
<input type="password" id="password" autocomplete="current-password" required>
</div>
<div class="form-actions">
<button type="submit" class="tool primary">Log in</button>
<div class="switch-link">No account yet? <a href="/signup.html">Sign up</a></div>
</div>
</form>
</div>
<script src="/js/api.js"></script>
<script>
document.getElementById('loginForm').addEventListener('submit', async (e) => {
e.preventDefault();
const errorMsg = document.getElementById('errorMsg');
errorMsg.style.display = 'none';
try {
await api.post('/api/auth/login', {
email: document.getElementById('email').value,
password: document.getElementById('password').value,
});
window.location.href = '/dashboard.html';
} catch (err) {
errorMsg.textContent = err.message;
errorMsg.style.display = 'block';
}
});
</script>
</body>
</html>