aboutsummaryrefslogtreecommitdiff
path: root/poll/public
diff options
context:
space:
mode:
authorLarsVomMars2021-01-21 12:48:36 +0100
committerLarsVomMars2021-01-21 12:48:36 +0100
commit448f455186ee695ce0c70574db4fe2b431ad6c55 (patch)
tree707a828b1fbb4e10ab4ba0f796690110d39cde1a /poll/public
parentfa4026fd87b17cc2c69f23da516f7399aae20f67 (diff)
FIXERINIO
Diffstat (limited to 'poll/public')
-rw-r--r--poll/public/index.html4
-rw-r--r--poll/public/script.js6
2 files changed, 6 insertions, 4 deletions
diff --git a/poll/public/index.html b/poll/public/index.html
index 26c7684..45379aa 100644
--- a/poll/public/index.html
+++ b/poll/public/index.html
@@ -20,10 +20,8 @@
</div>
<main>
-<!-- <form class="pure-form pure-form-stacked" action="api/answer" method="post">-->
<div class="pure-form pure-form-stacked">
<fieldset>
- <!-- TODO: Add progress -->
<legend>Schüler-Ranking</legend>
<p>Welche/r Schüler/in...</p>
<label id="question_label" for="question"></label>
@@ -34,8 +32,6 @@
<button id="skip-btn" class="pure-button pure-button-danger">Weiter</button>
</fieldset>
</div>
-
-<!-- </form>-->
</main>
<script src="script.js" charset="utf-8"></script>
diff --git a/poll/public/script.js b/poll/public/script.js
index dc46578..cdffa17 100644
--- a/poll/public/script.js
+++ b/poll/public/script.js
@@ -55,6 +55,12 @@ fetch(`/poll/api/question/${qid}?type=${type}`)
} else getNext(); // Resets
});
+fetch(`api/questions/${type}`)
+ .then(response => response.json())
+ .then(response => {
+ // TODO: PROGRESS POGGERS
+ });
+
function getNext(q = 0) {
window.location.assign(`/poll/?qid=${q}&type=${type}`);
}