60 lines
2.0 KiB
HTML
60 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Admin Dashboard</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
|
|
<header class="app-header">
|
|
<a class="brand" href="{{ url_for('admin.dashboard') }}">admin</a>
|
|
<nav class="site-nav">
|
|
<a href="{{ url_for('public.home') }}">Public Site</a>
|
|
<a href="{{ url_for('admin.new_question') }}">Create Question</a>
|
|
<a href="{{ url_for('admin.account') }}">Change Credentials</a>
|
|
<a href="{{ url_for('admin.logout') }}">Log Out</a>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="page admin-page">
|
|
<section class="main-card admin-card">
|
|
<div class="admin-header">
|
|
<p class="eyebrow">Console</p>
|
|
<h1>Questions</h1>
|
|
</div>
|
|
|
|
{% for message in get_flashed_messages() %}
|
|
<p class="notice">{{ message }}</p>
|
|
{% endfor %}
|
|
|
|
{% if questions %}
|
|
<div class="question-list">
|
|
{% for question in questions %}
|
|
<article class="question-row">
|
|
<div>
|
|
<p class="question-date">{{ question.date }}</p>
|
|
<h2>{{ question.question }}</h2>
|
|
<p>{{ question.option_a }} or {{ question.option_b }}</p>
|
|
</div>
|
|
<div class="row-actions">
|
|
<a href="{{ url_for('admin.edit_question', question_id=question.id) }}">Edit</a>
|
|
<a href="{{ url_for('admin.delete_question', question_id=question.id) }}">Delete</a>
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p>No questions yet.</p>
|
|
{% endif %}
|
|
</section>
|
|
</main>
|
|
|
|
<footer class="app-footer">
|
|
<span>questions</span>
|
|
<span>sqlite</span>
|
|
</footer>
|
|
|
|
</body>
|
|
</html>
|