admin: urovne obtiznosti

This commit is contained in:
2025-10-09 15:48:59 +02:00
parent 2aa4b580c5
commit f6075c5eb6
5 changed files with 99 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<title>Úrovně obtížnosti</title>
</head>
<body>
<h1>Úrovně obtížnosti</h1>
<table border="1">
<tr>
<th>Jméno</th>
<th>Smazat</th>
</tr>
{{range .}}
<tr>
<td>{{.}}</td>
<td>
<form action="/admin/levels" method="post">
<input type="hidden" name="delete" value="{{.}}">
<button type="submit">Smazat</button>
</form>
</td>
</tr>
{{end}}
</table>
<hr>
<h2>Přidat novou úroveň</h2>
<form action="/admin/levels" method="post">
Jméno: <input type="text" name="name" required>
<button type="submit">Přidat úroveň</button>
</form>
</body>
</html>

View File

@@ -10,6 +10,7 @@
<h1>Admin Panel</h1>
<a href="/admin/teams">Týmy</a> <br>
<a href="/admin/routes">Trasy</a> <br>
<a href="/admin/levels">Úrovně</a> <br>
<hr>
<form method="post" action="/admin/logout">
<input type="submit" value="Logout">