aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/templates
diff options
context:
space:
mode:
Diffstat (limited to 'services/app/templates')
-rw-r--r--services/app/templates/admin_overview.html.twig3
-rw-r--r--services/app/templates/admin_stats.html.twig34
2 files changed, 37 insertions, 0 deletions
diff --git a/services/app/templates/admin_overview.html.twig b/services/app/templates/admin_overview.html.twig
index 2103616..6256165 100644
--- a/services/app/templates/admin_overview.html.twig
+++ b/services/app/templates/admin_overview.html.twig
@@ -10,4 +10,7 @@
<div>
<a href="{{ url_for('admin_quiz_list') }}">問題一覧</a>
</div>
+ <div>
+ <a href="{{ url_for('admin_stats') }}">各種統計</a>
+ </div>
{% endblock %}
diff --git a/services/app/templates/admin_stats.html.twig b/services/app/templates/admin_stats.html.twig
new file mode 100644
index 0000000..7b1b2fa
--- /dev/null
+++ b/services/app/templates/admin_stats.html.twig
@@ -0,0 +1,34 @@
+{% extends '_page.html.twig' %}
+
+{% block content %}
+ <p>
+ このページは管理画面です
+ </p>
+ <h2>統計</h2>
+ <ul>
+ <li>参加者数: {{ n_attendees }} 名</li>
+ <li>回答数: {{ n_answers }}</li>
+ <li>好成績者
+ <ul>
+ {% for quiz in quizzes %}
+ <li>第{{ loop.index }}問: {{ quiz.title }}
+ <ul>
+ {% for answer in rankings[loop.index - 1] %}
+ <li>{{ loop.index }}位: {{ answer.author_name }} ({{ answer.code_size }} byte)</li>
+ {% endfor %}
+ </ul>
+ </li>
+ {% endfor %}
+ </ul>
+ </li>
+ </ul>
+ <h2>問題</h2>
+ {% for quiz in quizzes %}
+ <h3>第{{ loop.index }}問: {{ quiz.title }}</h3>
+ <p>
+ {{ quiz.description }}
+ </p>
+ <h4>最短解</h4>
+ <pre><code class="hljs language-php">{{ best_codes[loop.index - 1] }}</code></pre>
+ {% endfor %}
+{% endblock %}