aboutsummaryrefslogtreecommitdiff
path: root/admin/public
diff options
context:
space:
mode:
authorMarvin Borner2021-01-29 14:42:34 +0100
committerMarvin Borner2021-01-29 14:42:34 +0100
commit4482d4ca8a69dcfa3b082436a02cf25ee0870be0 (patch)
tree00c26423aefd7843499aba519432de9760cb6c59 /admin/public
parentaec1e8f2cd4c0fdedd200fc30094587c0834d372 (diff)
blabla
Diffstat (limited to 'admin/public')
-rw-r--r--admin/public/index.html7
-rw-r--r--admin/public/prediction.html28
-rw-r--r--admin/public/prediction.js11
3 files changed, 44 insertions, 2 deletions
diff --git a/admin/public/index.html b/admin/public/index.html
index 83d3a00..f2506f2 100644
--- a/admin/public/index.html
+++ b/admin/public/index.html
@@ -24,8 +24,11 @@
<ul class="pure-menu-list">
<li class="pure-menu-item"><a href="ranking.html" class="pure-menu-link">Ranking</a></li>
<li class="pure-menu-item"><a href="questions.html" class="pure-menu-link">Fragen</a></li>
-<!-- <li class="pure-menu-item"><a href="votes.html" class="pure-menu-link">Votes</a></li>-->
-<!-- <li class="pure-menu-item"><a href="participation.html" class="pure-menu-link">Teilnahme</a></li>-->
+ <li class="pure-menu-item">
+ <a href="prediction.html" class="pure-menu-link">Wo sieht mich mein Lehrer in 10 Jahren</a>
+ </li>
+ <!-- <li class="pure-menu-item"><a href="votes.html" class="pure-menu-link">Votes</a></li>-->
+ <!-- <li class="pure-menu-item"><a href="participation.html" class="pure-menu-link">Teilnahme</a></li>-->
</ul>
</div>
</div>
diff --git a/admin/public/prediction.html b/admin/public/prediction.html
new file mode 100644
index 0000000..99e35e3
--- /dev/null
+++ b/admin/public/prediction.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <link
+ rel="stylesheet"
+ href="https://unpkg.com/purecss@2.0.3/build/pure-min.css"
+ integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ"
+ crossorigin="anonymous"
+ />
+ <link rel="stylesheet" href="style.css" type="text/css" media="all" />
+
+ <title>Fragen</title>
+ </head>
+ <body>
+ <div class="pure-menu pure-menu-horizontal">
+ <a href="/" class="pure-menu-item pure-menu-link">Home</a>
+ <a href="/auth/api/logout" class="pure-menu-item pure-menu-link">Logout</a>
+ </div>
+ <div class="card">
+ <h2>Wo sieht mich mein Lehrer in 10 Jahren?</h2>
+ <ul id="list"></ul>
+ </div>
+
+ <script src="prediction.js"></script>
+ </body>
+</html>
diff --git a/admin/public/prediction.js b/admin/public/prediction.js
new file mode 100644
index 0000000..66afb06
--- /dev/null
+++ b/admin/public/prediction.js
@@ -0,0 +1,11 @@
+const list = document.getElementById("list");
+
+fetch("api/prediction")
+ .then((r) => r.json())
+ .then((r) => {
+ r.forEach((d) => {
+ const elem = document.createElement("li");
+ elem.innerText = `${d.uname} ${d.umid || ""} ${d.usur}: ${d.tname} ${d.tmid || ""} ${d.tsur}`;
+ list.appendChild(elem);
+ });
+ });