ab817e0d31
Re-add the top header as a 50px bar injected by ensureHeader() on every layout page (skipped on login), with the brand centered. The layout height now subtracts both header and footer. Rebrand the project CoRE.Vision → CoRE.Vizion+ everywhere: header + footer brand, all page <title>s, the login card, and the FastAPI OpenAPI title (applies on next backend restart). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>CoRE.Vizion+ — Вход</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body class="login-body">
|
|
<form class="login-card" id="login-form">
|
|
<div class="brand login-brand">CoRE<span>.Vizion+</span></div>
|
|
<input type="text" id="username" placeholder="Логин" autocomplete="username" autofocus>
|
|
<input type="password" id="password" placeholder="Пароль" autocomplete="current-password">
|
|
<button type="submit">Войти</button>
|
|
<div class="login-err" id="login-err"></div>
|
|
</form>
|
|
|
|
<script>
|
|
const form = document.getElementById("login-form");
|
|
const err = document.getElementById("login-err");
|
|
form.addEventListener("submit", async (e) => {
|
|
e.preventDefault();
|
|
err.textContent = "";
|
|
const r = await fetch("/api/login", {
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify({
|
|
username: document.getElementById("username").value,
|
|
password: document.getElementById("password").value,
|
|
}),
|
|
});
|
|
if (r.ok) {
|
|
location.href = "/";
|
|
} else {
|
|
const d = await r.json().catch(() => ({}));
|
|
err.textContent = d.detail || "Ошибка входа";
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|