Files
KCal/public/signup.html
T
ort aa21709f3d Add PWA meta tags to login/signup/join pages
iOS decides whether "Add to Home Screen" creates a true standalone app
(no browser chrome) or a plain bookmark-style Web Clip (full Safari UI --
URL bar, share/reload/compass row, X to close) based on whatever page you
were on when you tapped it. Those tags only existed on dashboard.html and
calendar.html, so anyone adding the icon while logged out -- the normal
first-time flow, since you land on /login.html before signing in -- got
the bookmark-style icon instead of a real standalone app, exactly as
reported. Existing home-screen icons need to be deleted and re-added
after this deploys; iOS bakes in standalone-capability at creation time
and won't retroactively upgrade an icon that already exists.
2026-08-15 16:43:08 -04:00

71 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sign up — 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">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="apple-touch-icon" href="/icons/apple-touch-icon-180.png">
<meta name="theme-color" content="#F1F5FB">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="Calendar">
</head>
<body>
<div class="auth-wrap">
<h1>Create your family</h1>
<p class="lead">This creates a new household. Your spouse can join it afterward with an invite link.</p>
<div class="error-msg" id="errorMsg" style="display:none;"></div>
<form id="signupForm">
<div class="field">
<label for="name">Your name</label>
<input type="text" id="name" autocomplete="name" required>
</div>
<div class="field">
<label for="householdName">Family name (optional)</label>
<input type="text" id="householdName" placeholder="e.g. The Smiths">
</div>
<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="new-password" minlength="8" required>
</div>
<div class="form-actions">
<button type="submit" class="tool primary">Sign up</button>
<div class="switch-link">Already have an account? <a href="/login.html">Log in</a></div>
</div>
</form>
</div>
<script src="/js/api.js"></script>
<script>
document.getElementById('signupForm').addEventListener('submit', async (e) => {
e.preventDefault();
const errorMsg = document.getElementById('errorMsg');
errorMsg.style.display = 'none';
try {
await api.post('/api/auth/signup', {
name: document.getElementById('name').value,
householdName: document.getElementById('householdName').value,
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>