cb237c248e
Reimplements the Flask app as a Go HTTP API (chi + modernc sqlite) with a minimal vanilla-JS frontend in web/. Endpoints mirror the original Flask routes but return JSON instead of HTML. - auth: login/logout/register/sessioninfo/headerbar with crypto/rand tokens - entry: paginated feed (single JOIN), create with image scaling - user: profile, userinfo; delete still a stub - requireAuth middleware passes uid via context - notes/api.md documents the API and schema Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
46 lines
1.2 KiB
HTML
46 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>kver</title>
|
|
<link rel="stylesheet" href="/css/app.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>kver</h1>
|
|
<div id="headerbar"></div>
|
|
</header>
|
|
|
|
<main>
|
|
<!-- Login / Registrierung -->
|
|
<section id="auth-box">
|
|
<form id="login-form">
|
|
<h2>Login</h2>
|
|
<input name="user" placeholder="Nutzername" autocomplete="username">
|
|
<input name="pass" type="password" placeholder="Passwort" autocomplete="current-password">
|
|
<input name="timeout" type="hidden" value="86400">
|
|
<button type="submit">Einloggen</button>
|
|
</form>
|
|
<p class="msg" id="auth-msg"></p>
|
|
</section>
|
|
|
|
<!-- Neuer Beitrag -->
|
|
<section id="compose" hidden>
|
|
<form id="entry-form">
|
|
<textarea name="content" maxlength="1000" placeholder="Was gibt's Neues?"></textarea>
|
|
<input name="file" type="file" accept="image/*">
|
|
<button type="submit">Posten</button>
|
|
</form>
|
|
<p class="msg" id="entry-msg"></p>
|
|
</section>
|
|
|
|
<!-- Feed -->
|
|
<section id="feed"></section>
|
|
<div id="sentinel"></div>
|
|
</main>
|
|
|
|
<script src="/js/app.js"></script>
|
|
</body>
|
|
</html>
|