From 1b8053d9b5c93b11f74f5be3883bdd91c47a549f Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 11 Mar 2020 17:35:46 -0600 Subject: [PATCH] Help with this puzzle link --- theme/basic.css | 9 +++++++++ theme/puzzle.html | 1 + theme/puzzle.js | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/theme/basic.css b/theme/basic.css index e7bb81e..721eec5 100644 --- a/theme/basic.css +++ b/theme/basic.css @@ -140,3 +140,12 @@ li[draggable] { #cacheButton.disabled { display: none; } + +#help { + text-decoration: none; + color: #fff; + background-color: #118; + padding: 0.25em; + border: 1px solid black; + font-size: 120%; +} \ No newline at end of file diff --git a/theme/puzzle.html b/theme/puzzle.html index a7be166..6ef271a 100644 --- a/theme/puzzle.html +++ b/theme/puzzle.html @@ -25,6 +25,7 @@ Team ID:
Answer:
+
diff --git a/theme/puzzle.js b/theme/puzzle.js index 2c084c6..920e271 100644 --- a/theme/puzzle.js +++ b/theme/puzzle.js @@ -151,6 +151,12 @@ function submit(e) { function loadPuzzle(categoryName, points, puzzleId) { let puzzle = document.getElementById("puzzle") let base = "content/" + categoryName + "/" + puzzleId + "/" + + let helpElement = document.querySelector("#help") + if (helpElement) { + helpElement.classList.remove("hidden") + helpElement.href = "https://mattermost.cyfi.training/cyber-fire/channels/puzzle-" + categoryName + } fetch(base + "puzzle.json") .then(resp => {