39 lines
2.4 KiB
HTML
39 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Patch-Bilder · Pingu Concerts</title>
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
<style>
|
|
.patch-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
|
|
.patch-admin-card { display: grid; gap: 12px; align-content: start; }
|
|
.patch-preview { width: 96px; height: 96px; object-fit: contain; padding: 8px; background: #242424; border: 2px dashed #78716c; border-radius: 12px; }
|
|
.patch-placeholder { display: grid; place-items: center; font-size: 2.5rem; }
|
|
.patch-upload { display: grid; gap: 8px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header><div class="header-inner"><a href="/" class="logo">🎸 Pingu <span>Concerts</span></a><span>{{ user.display_name }}</span></div></header>
|
|
<main>
|
|
<div class="page-title"><h1>🧵 Patch-Bilder</h1><p>Grafiken für die Patches auf der virtuellen Kutte verwalten.</p></div>
|
|
{% set admin_section = 'patches' %}{% include '_admin_nav.html' %}
|
|
<section class="admin-section">
|
|
<div class="patch-admin-grid">
|
|
{% for patch in patches %}
|
|
<article class="admin-row patch-admin-card">
|
|
{% if patch.image_path %}<img class="patch-preview" src="{{ patch.image_path }}" alt="{{ patch.name }}">{% else %}<div class="patch-preview patch-placeholder">{{ patch.icon }}</div>{% endif %}
|
|
<div><strong>{{ patch.name }}</strong><div class="admin-meta">{{ patch.description }} · {{ patch.code }}</div></div>
|
|
<form class="patch-upload" method="post" action="/admin/patches/{{ patch.code }}" enctype="multipart/form-data">
|
|
<input type="file" name="image" accept="image/jpeg,image/png,image/webp" required>
|
|
<button class="button" type="submit">{% if patch.image_path %}Bild ersetzen{% else %}Bild hochladen{% endif %}</button>
|
|
</form>
|
|
{% if patch.image_path %}<form method="post" action="/admin/patches/{{ patch.code }}/delete" onsubmit="return confirm('Patch-Bild entfernen und wieder das Symbol verwenden?');"><button class="admin-danger" type="submit">Bild entfernen</button></form>{% endif %}
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|