From 41ec076b4b90f1b511d5bdcd38969b191186ffa2 Mon Sep 17 00:00:00 2001 From: Miguel Barão Date: Mon, 12 Mar 2018 23:03:05 +0000 Subject: [PATCH] - maintopics uses a table instead of list. --- serve.py | 2 +- templates/maintopics-table.html | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 templates/maintopics-table.html diff --git a/serve.py b/serve.py index d6298da..e31ebd4 100755 --- a/serve.py +++ b/serve.py @@ -121,7 +121,7 @@ class RootHandler(BaseHandler): @tornado.web.authenticated def get(self): uid = self.current_user - self.render('maintopics.html', + self.render('maintopics-table.html', uid=uid, name=self.learn.get_student_name(uid), state=self.learn.get_student_state(uid), diff --git a/templates/maintopics-table.html b/templates/maintopics-table.html new file mode 100644 index 0000000..cef271a --- /dev/null +++ b/templates/maintopics-table.html @@ -0,0 +1,149 @@ +{% autoescape %} + + + + + iLearn + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

{{ title }}

+ + + + + + + + + + {% for t in state %} + {% if t['level'] is None %} + + + + + + {% else %} + + + + + {% end %} + {% end %} + +
TópicoNível
+
+ {{ t['name'] }} +
+
+ +
+ + {{ t['name'] }} + + + + {% if t['level'] < 0.01 %} + + + + {% elif t['type']=='chapter' %} +
+ + + +
+ {% else %} +
+ + {{ round(t['level']*5)*'' + (5-round(t['level']*5))*'' }} + +
+ {% end %} +
+
+
+ + + + + + + -- libgit2 0.21.2