From 03b031ea793e91ce2f87cf28c73cefc8ce69a7b5 Mon Sep 17 00:00:00 2001 From: Lilian Teronen Date: Mon, 27 Nov 2023 01:37:03 +0200 Subject: More rework on routes. Best and worst matches. More visuals. --- templates/analyse.html | 45 +++++++++++++++++++++++++++++++++++++++------ templates/answer.html | 16 ++++++++++++++++ templates/base.html | 8 ++++++++ templates/create.html | 15 ++++++++++++++- templates/new_answer.html | 7 ------- templates/nick.html | 6 ------ templates/quiz.html | 4 ---- 7 files changed, 77 insertions(+), 24 deletions(-) delete mode 100644 templates/new_answer.html delete mode 100644 templates/nick.html delete mode 100644 templates/quiz.html (limited to 'templates') diff --git a/templates/analyse.html b/templates/analyse.html index 70fb98e..a57376d 100644 --- a/templates/analyse.html +++ b/templates/analyse.html @@ -1,13 +1,13 @@ {% include 'base.html' %} +{% if nick %} {% if users %} -Tutkit kyselyä: {{ code }} +Tutkit kyselmää: {{ code }}
- -
+
@@ -35,9 +35,13 @@ Tutkit kyselyä: {{ code }} {% if code %}
-
-
{{ avg }}%
+ +
+
+
{{ avg }}%
+
+ {% for q in questions %}
{{ q.q }} ({{ q.c }}%)
@@ -53,6 +57,34 @@ Tutkit kyselyä: {{ code }}
{% endfor %} +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+
{% endif %} @@ -60,7 +92,7 @@ Tutkit kyselyä: {{ code }}
Vaihda kyselyn koodia: - +
@@ -71,3 +103,4 @@ Linkki tähän kyselyyn: {% endif %} +{% endif %} diff --git a/templates/answer.html b/templates/answer.html index eb49ff8..6231785 100644 --- a/templates/answer.html +++ b/templates/answer.html @@ -1,4 +1,7 @@ {% include 'base.html' %} +{% if nick %} + +{% if link %} Vastaa kyselmään "{{ link }}": @@ -19,3 +22,16 @@ Vastaa kyselmään "{{ link }}":
+{% else %} + +
+Vastaa kyselyyn koodilla: + + + +
+ +{% endif %} + + +{% endif %} diff --git a/templates/base.html b/templates/base.html index 839cc88..f38eb12 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,14 @@ {% if nick %}
{{ nick }}
+{% else %} +
+Anna itsellesi nimimerkki ensin: + + + +
{% endif %} + {% if alert %}
{{ alert }}
diff --git a/templates/create.html b/templates/create.html index b369ae8..21520b5 100644 --- a/templates/create.html +++ b/templates/create.html @@ -1,5 +1,8 @@ {% include 'base.html' %} +{% if nick %} + +{% if quiz_set %}
{% for q in questions %} @@ -26,4 +29,14 @@
-
\ No newline at end of file + + +{% else %} + +
+ +
+ +{% endif %} + +{% endif %} diff --git a/templates/new_answer.html b/templates/new_answer.html deleted file mode 100644 index 0d690d4..0000000 --- a/templates/new_answer.html +++ /dev/null @@ -1,7 +0,0 @@ -{% include 'base.html' %} -
-Vastaa kyselyyn koodilla: - - -
-Saatoit myös päätyä tänne mikäli olet jo vastannut. diff --git a/templates/nick.html b/templates/nick.html deleted file mode 100644 index 92e166f..0000000 --- a/templates/nick.html +++ /dev/null @@ -1,6 +0,0 @@ -{% include 'base.html' %} -
-Anna itsellesi nimimerkki ensin: - - -
diff --git a/templates/quiz.html b/templates/quiz.html deleted file mode 100644 index 9e356c3..0000000 --- a/templates/quiz.html +++ /dev/null @@ -1,4 +0,0 @@ -{% include 'base.html' %} -
- -
-- cgit v1.2.3