Convert to Flask app with password-protected admin panel
Links now live in data/links.json instead of hardcoded HTML, editable via /admin (add/rename/reorder/delete sections and links, per-link color and half-width side-by-side layout). New pages can be added without code changes. Docker image only needs rebuilding on code changes now, not on content changes (data/ is volume-mounted). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
56dc37843a
commit
61c4701115
13 files changed
+797
-173
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Admin Login</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
<style>
|
||||
.admin-box {
|
||||
max-width: 320px;
|
||||
margin: 80px auto;
|
||||
padding: 24px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid #4b5563;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.admin-box label { display: block; margin-bottom: 6px; color: #9ca3af; font-size: 13px; }
|
||||
.admin-box input {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-bottom: 16px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #4b5563;
|
||||
background: #0f172a;
|
||||
color: #f3f4f6;
|
||||
}
|
||||
.admin-box button {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background: #21e4d3;
|
||||
color: #0f172a;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
.admin-box button:hover { background: #24ffed; }
|
||||
.admin-error { color: #fca5a5; margin-bottom: 12px; font-size: 14px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="admin-box">
|
||||
<h1 style="font-size: 20px; margin-bottom: 16px; text-align: left;">Admin Login</h1>
|
||||
{% if error %}<div class="admin-error">{{ error }}</div>{% endif %}
|
||||
<form method="post" action="{{ url_for('admin_login') }}">
|
||||
<label for="password">Passwort</label>
|
||||
<input type="password" id="password" name="password" autofocus required>
|
||||
<button type="submit">Einloggen</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user