Volle Mindflux-App ins Deploy-Repo übernehmen
Ersetzt das Hello-World-Gerüst durch die vollständige Anwendung (com.example.mindflux: 64 Klassen, Thymeleaf-Templates, Static-Assets, Flyway V1–V6). Deploy-Infrastruktur (.gitea, Dockerfile) bleibt erhalten. - pom: volle Abhängigkeiten (Security, Thymeleaf, JPA, Flyway), Spring Boot 3.4.4 / Java 17 - docker-compose: SPRING_DATASOURCE_* unverändert; App lauscht auf 8080 (nginx -> mindflux:8080); Uploads-Volume; Admin-Passwörter via Gitea-Secrets - Workflow: Deploy-Step injiziert MINDFLUX_ADMIN*_PASSWORD aus Secrets - .dockerignore ergänzt; Hello-World (com.mindflux) und Test-Datei 'main' entfernt Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-theme="dark"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mindflux Admin Dashboard</title>
|
||||
<link rel="stylesheet" href="/css/theme.css">
|
||||
<script src="/js/theme.js"></script>
|
||||
<style>
|
||||
.admin-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1rem; margin-top:1.1rem; }
|
||||
.admin-card {
|
||||
display:flex; align-items:center; gap:.6rem;
|
||||
background:var(--surface-2); border:1px solid var(--border-accent); border-radius:13px;
|
||||
padding:1.1rem 1.2rem; color:var(--heading); text-decoration:none; font-weight:700;
|
||||
box-shadow:var(--g-soft); transition:transform .16s ease, box-shadow .25s ease, background-color .2s;
|
||||
}
|
||||
.admin-card:hover { transform:translateY(-3px); background:var(--surface); box-shadow:0 0 18px var(--glow-s); }
|
||||
.admin-footer { margin-top:2rem; text-align:center; color:var(--muted); font-size:.85rem; }
|
||||
.admin-footer a { color:var(--accent); text-decoration:none; }
|
||||
.admin-footer a:hover { text-decoration:underline; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mf-theme-float"><button class="mf-theme"></button></div>
|
||||
|
||||
<div class="mf-container">
|
||||
|
||||
<div class="mf-page-head">
|
||||
<a th:href="@{/dashboard}" class="mf-back">⟵ Zurück zum Benutzer-Dashboard</a>
|
||||
</div>
|
||||
|
||||
<header style="margin-bottom:1.4rem">
|
||||
<div class="mf-eyebrow">Control Center</div>
|
||||
<h1 style="color:var(--heading); font-size:1.85rem; font-weight:800; margin-top:.35rem">✨ Admin-Dashboard ✨</h1>
|
||||
<p style="color:var(--muted); margin-top:.4rem">Hier steuerst du das System wie Doc den DeLorean!</p>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
|
||||
<div class="mf-panel accent">
|
||||
<h4>Admin Aktionen</h4>
|
||||
<div class="admin-actions">
|
||||
<a th:href="@{/admin/users}" class="admin-card">👤 Benutzer verwalten</a>
|
||||
<a th:href="@{/admin/mindmatch}" class="admin-card">🧩 MindMatch-Decks verwalten</a>
|
||||
<a th:href="@{/admin/techtacular}" class="admin-card">🎯 TechTacular-Fragen verwalten</a>
|
||||
</div>
|
||||
<p style="margin-top:1.1rem; color:var(--muted);">
|
||||
Hier entsteht noch Großes... ✨ Bleib dran!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="mf-footer">
|
||||
<a href="#">Support</a>
|
||||
<a href="#">Feedback</a>
|
||||
<a href="#">Nutzungsbedingungen</a>
|
||||
<a href="#">Richtlinien</a>
|
||||
<a href="#">Datenschutz</a>
|
||||
<a href="#">Impressum</a>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const successMessage = document.getElementById('successMessage');
|
||||
if (successMessage) {
|
||||
setTimeout(() => {
|
||||
successMessage.style.opacity = '0';
|
||||
setTimeout(() => {
|
||||
successMessage.style.display = 'none';
|
||||
}, 1500);
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-theme="dark"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MindMatch-Verwaltung – Admin</title>
|
||||
<link rel="stylesheet" href="/css/theme.css">
|
||||
<script src="/js/theme.js"></script>
|
||||
<style>
|
||||
.mmadmin { max-width: 1000px; margin: 0 auto; padding: 0 1rem; width: 100%; }
|
||||
.mmadmin .deck {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 14px;
|
||||
padding: 1.2rem 1.4rem;
|
||||
margin-bottom: 1.4rem;
|
||||
box-shadow: var(--g-soft);
|
||||
}
|
||||
.mmadmin .deck.inactive { border-left-color: var(--danger); opacity: 0.75; }
|
||||
.mmadmin .deck-head {
|
||||
display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem;
|
||||
justify-content: space-between; margin-bottom: 0.8rem;
|
||||
}
|
||||
.mmadmin .deck-head h2 { color: var(--heading); margin: 0; font-size: 1.25rem; }
|
||||
.mmadmin .slug { color: var(--accent); font-size: 0.8rem; font-family: monospace; }
|
||||
.mmadmin .badge {
|
||||
font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
|
||||
padding: 0.18rem 0.5rem; border-radius: 7px; border: 1px solid var(--border-accent);
|
||||
}
|
||||
.mmadmin .badge.on { background: var(--glow-w); color: var(--accent); }
|
||||
.mmadmin .badge.off { background: rgba(255,95,107,.12); color: var(--danger); border-color: var(--danger); }
|
||||
.mmadmin .pairs { list-style: none; padding: 0; margin: 0 0 0.8rem; }
|
||||
.mmadmin .pairs li {
|
||||
display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
|
||||
padding: 0.4rem 0; border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.mmadmin .pairs .term { color: var(--accent); font-weight: 700; min-width: 130px; }
|
||||
.mmadmin .pairs .arrow { color: var(--muted); }
|
||||
.mmadmin .pairs .def { flex: 1; min-width: 160px; color: var(--text); }
|
||||
.mmadmin form.inline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
|
||||
.mmadmin .add-pair { margin-top: 0.6rem; }
|
||||
.mmadmin .new-deck { margin-bottom: 1.6rem; }
|
||||
.mmadmin .count { color: var(--muted); font-size: 0.85rem; }
|
||||
.mmadmin .empty { color: var(--muted); }
|
||||
.mmadmin .empty.warn { color: var(--danger); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mf-theme-float"><button class="mf-theme"></button></div>
|
||||
|
||||
<div class="mf-container" style="max-width:1040px">
|
||||
|
||||
<div class="mf-page-head">
|
||||
<a th:href="@{/admin}" class="mf-back">⟵ Zurück zum Admin-Dashboard</a>
|
||||
</div>
|
||||
|
||||
<header style="margin-bottom:1.4rem">
|
||||
<div class="mf-eyebrow">MindMatch</div>
|
||||
<h1 style="color:var(--heading); font-size:1.75rem; font-weight:800; margin-top:.35rem">🧩 MindMatch-Verwaltung</h1>
|
||||
</header>
|
||||
|
||||
<main class="mmadmin">
|
||||
|
||||
<!-- Neues Deck -->
|
||||
<div class="mf-panel accent new-deck">
|
||||
<h4>Neue Kategorie (Deck) anlegen</h4>
|
||||
<form class="inline" th:action="@{/admin/mindmatch/decks}" method="post">
|
||||
<input class="mf-input" style="width:auto; min-width:240px" type="text" name="title" placeholder="z. B. SQL-Befehle" required>
|
||||
<button type="submit" class="mf-btn">➕ Deck anlegen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Decks -->
|
||||
<div class="deck" th:each="deck : ${decks}" th:classappend="${deck.active} ? '' : 'inactive'">
|
||||
<div class="deck-head">
|
||||
<div>
|
||||
<h2 th:text="${deck.title}">Deck</h2>
|
||||
<span class="slug" th:text="'/' + ${deck.slug}">/slug</span>
|
||||
<span class="badge on" th:if="${deck.active}">aktiv</span>
|
||||
<span class="badge off" th:unless="${deck.active}">inaktiv</span>
|
||||
<span class="count" th:text="'· ' + ${deck.pairs.size()} + ' Paare'">· 0 Paare</span>
|
||||
</div>
|
||||
<div style="display:flex; gap:0.5rem;">
|
||||
<form th:action="@{'/admin/mindmatch/decks/' + ${deck.id} + '/toggle'}" method="post">
|
||||
<button type="submit" class="mf-btn outline" th:text="${deck.active} ? 'Deaktivieren' : 'Aktivieren'">Toggle</button>
|
||||
</form>
|
||||
<form th:action="@{'/admin/mindmatch/decks/' + ${deck.id} + '/delete'}" method="post"
|
||||
onsubmit="return confirm('Deck inkl. aller Paare löschen?');">
|
||||
<button type="submit" class="mf-btn danger">Deck löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="pairs">
|
||||
<li th:each="pair : ${deck.pairs}">
|
||||
<span class="term" th:text="${pair.term}">Begriff</span>
|
||||
<span class="arrow">↔</span>
|
||||
<span class="def" th:text="${pair.matchText}">Bedeutung</span>
|
||||
<form th:action="@{'/admin/mindmatch/pairs/' + ${pair.id} + '/delete'}" method="post">
|
||||
<button type="submit" class="mf-btn danger" style="padding:.35rem .7rem">✕</button>
|
||||
</form>
|
||||
</li>
|
||||
<li th:if="${deck.pairs.isEmpty()}" class="empty warn">Noch keine Paare – unten hinzufügen.</li>
|
||||
</ul>
|
||||
|
||||
<!-- Paar hinzufügen -->
|
||||
<form class="inline add-pair" th:action="@{'/admin/mindmatch/decks/' + ${deck.id} + '/pairs'}" method="post">
|
||||
<input class="mf-input" style="width:auto; min-width:200px" type="text" name="term" placeholder="Begriff (z. B. SELECT)" required>
|
||||
<span class="arrow">↔</span>
|
||||
<input class="mf-input" style="width:auto; min-width:200px" type="text" name="match" placeholder="Bedeutung (z. B. Daten abfragen)" required>
|
||||
<button type="submit" class="mf-btn outline">➕ Paar hinzufügen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p th:if="${decks.isEmpty()}" class="empty">Noch keine Decks vorhanden. Lege oben das erste an.</p>
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="mf-footer">
|
||||
<a href="#">Support</a>
|
||||
<a href="#">Feedback</a>
|
||||
<a href="#">Nutzungsbedingungen</a>
|
||||
<a href="#">Richtlinien</a>
|
||||
<a href="#">Datenschutz</a>
|
||||
<a href="#">Impressum</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-theme="dark"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title th:text="${category.title} + ' – TechTacular'">TechTacular-Kategorie</title>
|
||||
<link rel="stylesheet" href="/css/theme.css">
|
||||
<script src="/js/theme.js"></script>
|
||||
<style>
|
||||
.ttcat { max-width: 1000px; margin: 0 auto; padding: 0 1rem; width: 100%; }
|
||||
.ttcat .q {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 0.7rem;
|
||||
box-shadow: var(--g-soft);
|
||||
}
|
||||
.ttcat .q-head { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; }
|
||||
.ttcat .points {
|
||||
background: var(--glow-w); color: var(--accent); font-weight: 800;
|
||||
border: 1px solid var(--border-accent);
|
||||
border-radius: 7px; padding: 0.14rem 0.5rem; font-size: 0.85rem;
|
||||
}
|
||||
.ttcat .q-text { color: var(--heading); font-weight: 600; margin: 0.2rem 0 0.5rem; }
|
||||
.ttcat ul.ans { list-style: none; padding: 0; margin: 0; }
|
||||
.ttcat ul.ans li { color: var(--text); padding: 0.15rem 0; }
|
||||
.ttcat ul.ans li.correct { color: var(--accent); font-weight: 700; }
|
||||
.ttcat ul.ans li.correct::before { content: "✓ "; }
|
||||
.ttcat .expl { color: var(--muted); font-size: 0.85rem; margin-top: 0.4rem; }
|
||||
.ttcat .addbox { margin-top: 1.6rem; }
|
||||
.ttcat .field { margin-bottom: 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
|
||||
.ttcat .field > label { color: var(--accent); font-weight: 700; font-size: 0.85rem; }
|
||||
.ttcat .ans-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
|
||||
.ttcat .ans-row input[type="text"] { flex: 1; }
|
||||
.ttcat .ans-row label { color: var(--accent); font-size: 0.82rem; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
|
||||
.ttcat .hint { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.8rem; line-height: 1.5; }
|
||||
.ttcat .hint strong { color: var(--text); }
|
||||
.ttcat .empty { color: var(--danger); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mf-theme-float"><button class="mf-theme"></button></div>
|
||||
|
||||
<div class="mf-container" style="max-width:1040px">
|
||||
|
||||
<div class="mf-page-head">
|
||||
<a th:href="@{/admin/techtacular}" class="mf-back">⟵ Zurück zur Kategorienliste</a>
|
||||
</div>
|
||||
|
||||
<header style="margin-bottom:1.4rem">
|
||||
<div class="mf-eyebrow">TechTacular · Kategorie</div>
|
||||
<h1 style="color:var(--heading); font-size:1.75rem; font-weight:800; margin-top:.35rem" th:text="'🎯 ' + ${category.title}">Kategorie</h1>
|
||||
</header>
|
||||
|
||||
<main class="ttcat">
|
||||
|
||||
<!-- Vorhandene Fragen -->
|
||||
<div class="q" th:each="q : ${category.questions}">
|
||||
<div class="q-head">
|
||||
<span class="points" th:text="${q.points} + ' Pkt'">100 Pkt</span>
|
||||
<form th:action="@{'/admin/techtacular/questions/' + ${q.id} + '/delete'}" method="post"
|
||||
onsubmit="return confirm('Frage löschen?');">
|
||||
<input type="hidden" name="categoryId" th:value="${category.id}">
|
||||
<button type="submit" class="mf-btn danger">✕ Frage löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
<p class="q-text" th:text="${q.text}">Fragetext</p>
|
||||
<ul class="ans">
|
||||
<li th:each="a : ${q.answers}" th:text="${a.text}" th:classappend="${a.correct} ? 'correct' : ''">Antwort</li>
|
||||
</ul>
|
||||
<p class="expl" th:if="${q.explanation}" th:text="'Erklärung: ' + ${q.explanation}">Erklärung</p>
|
||||
</div>
|
||||
|
||||
<p th:if="${category.questions.isEmpty()}" class="empty">Noch keine Fragen – unten hinzufügen.</p>
|
||||
|
||||
<!-- Frage hinzufügen -->
|
||||
<div class="mf-panel accent addbox">
|
||||
<h4>Hinweis hinzufügen</h4>
|
||||
<p class="hint">Jeopardy umgekehrt: Der <strong>Hinweis</strong> ist eine Aussage. Trage die gesuchten
|
||||
<strong>Begriffe</strong> ein und markiere die <strong>Lösung</strong> mit „richtig“. Im Spiel
|
||||
erscheinen die Begriffe als „Was ist …?“. Mindestens zwei Begriffe.</p>
|
||||
<form th:action="@{'/admin/techtacular/categories/' + ${category.id} + '/questions'}" method="post">
|
||||
<div class="field">
|
||||
<label>Hinweis (Aussage)</label>
|
||||
<input class="mf-input" type="text" name="text" placeholder="z. B. Dieses Protokoll übersetzt Domainnamen in IP-Adressen." required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Erklärung (optional)</label>
|
||||
<input class="mf-input" type="text" name="explanation" placeholder="kurze Begründung">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Punkte (Schwierigkeit)</label>
|
||||
<select class="mf-select" name="points">
|
||||
<option value="100">100</option>
|
||||
<option value="200">200</option>
|
||||
<option value="300">300</option>
|
||||
<option value="400">400</option>
|
||||
<option value="500">500</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="ans-row">
|
||||
<label><input type="radio" name="correct" value="0" checked> Lösung</label>
|
||||
<input class="mf-input" type="text" name="answer1" placeholder="Begriff 1 (z. B. DNS)" required>
|
||||
</div>
|
||||
<div class="ans-row">
|
||||
<label><input type="radio" name="correct" value="1"> Lösung</label>
|
||||
<input class="mf-input" type="text" name="answer2" placeholder="Begriff 2" required>
|
||||
</div>
|
||||
<div class="ans-row">
|
||||
<label><input type="radio" name="correct" value="2"> Lösung</label>
|
||||
<input class="mf-input" type="text" name="answer3" placeholder="Begriff 3 (optional)">
|
||||
</div>
|
||||
<div class="ans-row">
|
||||
<label><input type="radio" name="correct" value="3"> Lösung</label>
|
||||
<input class="mf-input" type="text" name="answer4" placeholder="Begriff 4 (optional)">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="mf-btn" style="margin-top:.4rem">➕ Hinweis speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="mf-footer">
|
||||
<a href="#">Support</a>
|
||||
<a href="#">Feedback</a>
|
||||
<a href="#">Nutzungsbedingungen</a>
|
||||
<a href="#">Richtlinien</a>
|
||||
<a href="#">Datenschutz</a>
|
||||
<a href="#">Impressum</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-theme="dark"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>TechTacular-Verwaltung – Admin</title>
|
||||
<link rel="stylesheet" href="/css/theme.css">
|
||||
<script src="/js/theme.js"></script>
|
||||
<style>
|
||||
.ttadmin { max-width: 1000px; margin: 0 auto; padding: 0 1rem; width: 100%; }
|
||||
.ttadmin .new-cat { margin-bottom: 1.6rem; }
|
||||
.ttadmin .cat {
|
||||
display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem;
|
||||
justify-content: space-between;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 0.7rem;
|
||||
box-shadow: var(--g-soft);
|
||||
}
|
||||
.ttadmin .cat.inactive { border-left-color: var(--danger); opacity: 0.7; }
|
||||
.ttadmin .cat h2 { color: var(--heading); margin: 0; font-size: 1.1rem; }
|
||||
.ttadmin .slug { color: var(--accent); font-size: 0.78rem; font-family: monospace; }
|
||||
.ttadmin .count { color: var(--muted); font-size: 0.85rem; }
|
||||
.ttadmin .badge { font-size: 0.68rem; text-transform: uppercase; padding: 0.14rem 0.45rem; border-radius: 7px; border: 1px solid var(--border-accent); }
|
||||
.ttadmin .badge.on { background: var(--glow-w); color: var(--accent); }
|
||||
.ttadmin .badge.off { background: rgba(255,95,107,.12); color: var(--danger); border-color: var(--danger); }
|
||||
.ttadmin .actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
|
||||
.ttadmin form.inline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
|
||||
.ttadmin .empty { color: var(--muted); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mf-theme-float"><button class="mf-theme"></button></div>
|
||||
|
||||
<div class="mf-container" style="max-width:1040px">
|
||||
|
||||
<div class="mf-page-head">
|
||||
<a th:href="@{/admin}" class="mf-back">⟵ Zurück zum Admin-Dashboard</a>
|
||||
</div>
|
||||
|
||||
<header style="margin-bottom:1.4rem">
|
||||
<div class="mf-eyebrow">TechTacular</div>
|
||||
<h1 style="color:var(--heading); font-size:1.75rem; font-weight:800; margin-top:.35rem">🎯 TechTacular-Verwaltung</h1>
|
||||
</header>
|
||||
|
||||
<main class="ttadmin">
|
||||
|
||||
<div class="mf-panel accent new-cat">
|
||||
<h4>Neue Kategorie anlegen</h4>
|
||||
<form class="inline" th:action="@{/admin/techtacular/categories}" method="post">
|
||||
<input class="mf-input" style="width:auto; min-width:240px" type="text" name="title" placeholder="z. B. Datenbanken" required>
|
||||
<button type="submit" class="mf-btn">➕ Kategorie anlegen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="cat" th:each="cat : ${categories}" th:classappend="${cat.active} ? '' : 'inactive'">
|
||||
<div>
|
||||
<h2 th:text="${cat.title}">Kategorie</h2>
|
||||
<span class="slug" th:text="'/' + ${cat.slug}">/slug</span>
|
||||
<span class="badge on" th:if="${cat.active}">aktiv</span>
|
||||
<span class="badge off" th:unless="${cat.active}">inaktiv</span>
|
||||
<span class="count" th:text="'· ' + ${cat.questionCount} + ' Fragen'">· 0 Fragen</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a class="mf-btn" th:href="@{'/admin/techtacular/categories/' + ${cat.id}}">Fragen verwalten</a>
|
||||
<form th:action="@{'/admin/techtacular/categories/' + ${cat.id} + '/toggle'}" method="post">
|
||||
<button type="submit" class="mf-btn outline" th:text="${cat.active} ? 'Deaktivieren' : 'Aktivieren'">Toggle</button>
|
||||
</form>
|
||||
<form th:action="@{'/admin/techtacular/categories/' + ${cat.id} + '/delete'}" method="post"
|
||||
onsubmit="return confirm('Kategorie inkl. aller Fragen löschen?');">
|
||||
<button type="submit" class="mf-btn danger">Löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p th:if="${categories.isEmpty()}" class="empty">Noch keine Kategorien. Lege oben die erste an.</p>
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="mf-footer">
|
||||
<a href="#">Support</a>
|
||||
<a href="#">Feedback</a>
|
||||
<a href="#">Nutzungsbedingungen</a>
|
||||
<a href="#">Richtlinien</a>
|
||||
<a href="#">Datenschutz</a>
|
||||
<a href="#">Impressum</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-theme="dark"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Benutzer bearbeiten</title>
|
||||
<link rel="stylesheet" href="/css/theme.css">
|
||||
<script src="/js/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mf-theme-float"><button class="mf-theme"></button></div>
|
||||
|
||||
<div class="mf-container" style="max-width:560px">
|
||||
|
||||
<div class="mf-page-head">
|
||||
<a th:href="@{/admin/users}" class="mf-back">⟵ Zurück zur Benutzerliste</a>
|
||||
</div>
|
||||
|
||||
<header style="margin-bottom:1.4rem">
|
||||
<div class="mf-eyebrow">Benutzer</div>
|
||||
<h1 style="color:var(--heading); font-size:1.75rem; font-weight:800; margin-top:.35rem">✏️ Benutzer bearbeiten</h1>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<form th:action="@{/admin/users/save}" th:object="${user}" method="post" class="mf-panel">
|
||||
<input type="hidden" th:field="*{id}" />
|
||||
|
||||
<div class="mf-field">
|
||||
<label class="mf-label">Benutzername</label>
|
||||
<input class="mf-input" type="text" th:field="*{username}" required/>
|
||||
</div>
|
||||
|
||||
<div class="mf-field">
|
||||
<label class="mf-label">Passwort</label>
|
||||
<input class="mf-input" type="password" name="password" th:required="${user.id == null}" autocomplete="new-password"/>
|
||||
</div>
|
||||
|
||||
<div class="mf-field">
|
||||
<label class="mf-label">E-Mail</label>
|
||||
<input class="mf-input" type="email" th:field="*{email}" required/>
|
||||
</div>
|
||||
|
||||
<div class="mf-field">
|
||||
<label class="mf-label">Rolle</label>
|
||||
<input class="mf-input" type="text" th:field="*{role}" required/>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="mf-btn" style="margin-top:.4rem">Speichern</button>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="mf-footer">
|
||||
<a href="#">Support</a>
|
||||
<a href="#">Feedback</a>
|
||||
<a href="#">Nutzungsbedingungen</a>
|
||||
<a href="#">Richtlinien</a>
|
||||
<a href="#">Datenschutz</a>
|
||||
<a href="#">Impressum</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" data-theme="dark"
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity6">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Benutzerverwaltung</title>
|
||||
<link rel="stylesheet" href="/css/theme.css">
|
||||
<script src="/js/theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="mf-theme-float"><button class="mf-theme"></button></div>
|
||||
|
||||
<div class="mf-container">
|
||||
|
||||
<div class="mf-page-head">
|
||||
<a th:href="@{/dashboard}" class="mf-back">⟵ Zurück zum Dashboard</a>
|
||||
</div>
|
||||
|
||||
<header style="display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; margin-bottom:1.4rem">
|
||||
<div>
|
||||
<div class="mf-eyebrow">Benutzer</div>
|
||||
<h1 style="color:var(--heading); font-size:1.75rem; font-weight:800; margin-top:.35rem">👥 Benutzerverwaltung</h1>
|
||||
</div>
|
||||
<a th:href="@{/admin/users/new}" class="mf-btn">➕ Neuen Benutzer anlegen</a>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="mf-panel">
|
||||
<table class="mf-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Benutzername</th>
|
||||
<th>Email</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="user : ${users}">
|
||||
<td th:text="${user.id}">1</td>
|
||||
<td th:text="${user.username}">Max</td>
|
||||
<td th:text="${user.email}">max@mindflux.de</td>
|
||||
<td style="display:flex; gap:.5rem; flex-wrap:wrap;">
|
||||
<a th:href="@{'/admin/users/edit/' + ${user.id}}" class="mf-btn outline">Bearbeiten</a>
|
||||
<form th:action="@{'/admin/users/delete/' + ${user.id}}" method="post" style="display:inline;">
|
||||
<button type="submit" class="mf-btn danger">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="mf-footer">
|
||||
<a href="#">Support</a>
|
||||
<a href="#">Feedback</a>
|
||||
<a href="#">Nutzungsbedingungen</a>
|
||||
<a href="#">Richtlinien</a>
|
||||
<a href="#">Datenschutz</a>
|
||||
<a href="#">Impressum</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user