From e390c4443e8ed1cbeb1d8a70c8038207cbafa7e2 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 2 Oct 2018 15:22:09 +0000 Subject: [PATCH] Fixes from SECOR spark * Puzzle list word-wraps * Puzzle pull mutation handler can cope with non-HTML nodes --- theme/puzzle-list.html | 33 +++---- theme/puzzle.html | 67 +++++++------- theme/scoreboard.html | 196 ++++++++++++++++++++--------------------- 3 files changed, 150 insertions(+), 146 deletions(-) diff --git a/theme/puzzle-list.html b/theme/puzzle-list.html index 32f79dc..d841bb7 100644 --- a/theme/puzzle-list.html +++ b/theme/puzzle-list.html @@ -35,32 +35,33 @@ function render(obj) { var id = puzzle[1]; var i = document.createElement('li'); + i.textContent = " "; l.appendChild(i); if (points === 0) { - i.textContent = "✿"; + i.textContent = "✿"; } else { - var a = document.createElement('a'); - i.appendChild(a); - a.textContent = points; + var a = document.createElement('a'); + i.appendChild(a); + a.textContent = points; a.href = "puzzle.html?cat=" + cat + "&points=" + points + "&pid=" + id; - } - } + } + } - puzzlesElement.appendChild(pdiv); - document.getElementById("puzzles").appendChild(puzzlesElement); + puzzlesElement.appendChild(pdiv); + document.getElementById("puzzles").appendChild(puzzlesElement); } } function init() { - fetch("puzzles.json") - .then(function(resp) { - return resp.json(); - }).then(function(obj) { - render(obj); - }).catch(function(err) { - console.log("Error", err); - }); + fetch("puzzles.json") + .then(function(resp) { + return resp.json(); + }).then(function(obj) { + render(obj); + }).catch(function(err) { + console.log("Error", err); + }); } document.addEventListener("DOMContentLoaded", init); diff --git a/theme/puzzle.html b/theme/puzzle.html index 87723b8..b36e6b5 100644 --- a/theme/puzzle.html +++ b/theme/puzzle.html @@ -6,6 +6,7 @@ + @@ -75,17 +77,18 @@ document.addEventListener("DOMContentLoaded", init);

Puzzle by

-
- - - Team ID:
- Answer:
- -
+
+ + + Team ID:
+ Answer:
+ +
diff --git a/theme/scoreboard.html b/theme/scoreboard.html index a50d9f1..1cff569 100644 --- a/theme/scoreboard.html +++ b/theme/scoreboard.html @@ -8,126 +8,126 @@