Files
tdb-rdb/public/login.html
T
Etienne Delvarre ce95a02012 Initial commit — TdB RdB frise narrative
Express.js + NocoDB + SortableJS drag-and-drop
Design V2 (Playfair Display + Lora, palette chaude)
Auth cookie, proxy NocoDB, édition en modal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-28 13:39:47 +02:00

45 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tableau de bord — Connexion</title>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lora:wght@400;500;600&display=swap" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Lora', Georgia, serif; background: #faf6f0; color: #2c1810; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; border: 1px solid #e0d5c7; border-radius: 16px; padding: 48px 40px; width: 380px; box-shadow: 0 4px 20px rgba(92,61,46,0.08); text-align: center; }
.login-box h1 { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: #5c3d2e; margin-bottom: 8px; }
.login-box p { font-size: 14px; color: #8a7968; margin-bottom: 28px; }
.login-box input { width: 100%; padding: 12px 16px; border: 1px solid #e0d5c7; border-radius: 10px; font-size: 15px; font-family: 'Lora', serif; color: #2c1810; outline: none; margin-bottom: 16px; }
.login-box input:focus { border-color: #8a7060; }
.login-box button { width: 100%; padding: 12px; background: #8a7060; color: #faf6f0; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; font-family: 'Lora', serif; cursor: pointer; }
.login-box button:hover { background: #5c3d2e; }
.error { color: #8b3030; font-size: 13px; margin-top: 10px; display: none; }
</style>
</head>
<body>
<div class="login-box">
<h1>Tableau de bord</h1>
<p>Projet RdB — Etienne & Myriam</p>
<form id="form">
<input type="password" id="pw" placeholder="Mot de passe" autofocus>
<button type="submit">Entrer</button>
</form>
<div class="error" id="err">Mot de passe incorrect</div>
</div>
<script>
document.getElementById('form').addEventListener('submit', async e => {
e.preventDefault();
const r = await fetch('/api/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ password: document.getElementById('pw').value }),
});
if (r.ok) { window.location.href = '/'; }
else { document.getElementById('err').style.display = 'block'; }
});
</script>
</body>
</html>