Initial commit: Flask quiz game 'Уроки французского'
This commit is contained in:
40
templates/admin.html
Normal file
40
templates/admin.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Админка - Уроки французского</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; background: #1a1a2e; color: #eaeaea; padding: 20px; }
|
||||
h1, h2 { color: #e94560; }
|
||||
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
|
||||
th, td { padding: 10px; border: 1px solid #0f3460; text-align: left; }
|
||||
th { background: #0f3460; }
|
||||
.btn { background: #e94560; color: white; padding: 8px 16px; text-decoration: none; border-radius: 4px; display: inline-block; }
|
||||
.btn:hover { background: #c73e54; }
|
||||
.back { margin-top: 20px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Админка - Редактирование вопросов</h1>
|
||||
<a href="/admin/logout" class="btn" style="float: right;">Выйти</a>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Категория</th>
|
||||
<th>Вопрос</th>
|
||||
<th>Стоимость</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
{% for cat_idx, category in enumerate(questions.categories) %}
|
||||
{% for q_idx, q in enumerate(category.questions) %}
|
||||
<tr>
|
||||
<td>{{ category.name }}</td>
|
||||
<td>{{ q.question }}</td>
|
||||
<td>{{ q.cost }}</td>
|
||||
<td><a href="/admin/edit/{{ cat_idx }}/{{ q_idx }}" class="btn">Редактировать</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
<a href="/" class="btn back">Назад к игре</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user