From 44ac35e21be58fbffa3103a1891f10bdf8338a81 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 7 Mar 2020 01:29:38 +0100 Subject: [PATCH] Add mastery checkboxes --- style.html.j2 | 9 +++++++++ style.js | 3 +++ style.scss | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/style.html.j2 b/style.html.j2 index d0b96a9..e759f05 100644 --- a/style.html.j2 +++ b/style.html.j2 @@ -180,6 +180,15 @@ {% endfor %} {% endif %} + +
+ {% for component in xml.components %} + {% if component["@db_entry"] | endswith("Mastery") %} + ❏ ❏ ❏ ❏ ❏ + ❏ ❏ ❏ ❏ ❏
+ {% endif %} + {% endfor %} +
diff --git a/style.js b/style.js index fe6026f..3f5b67f 100644 --- a/style.js +++ b/style.js @@ -49,6 +49,9 @@ env.addFilter('all', function(iterable) { env.addFilter('startswith', function(string, match) { return string.slice(0, match.length) === match; }); +env.addFilter('endswith', function(string, match) { + return string.endsWith(match); +}); env.addFilter('tail', function(sequence) { return sequence.slice(1); }); diff --git a/style.scss b/style.scss index de442d3..bb39bc1 100644 --- a/style.scss +++ b/style.scss @@ -137,6 +137,12 @@ } } + .bottom { + position: absolute; + bottom:0; + left:0; + right:0; + } } }