From d87be0bfcb5d9d15d38096e6fa992c3c66db29cb Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 13 Sep 2023 19:24:05 -0600 Subject: [PATCH] Color twiddling --- theme/basic.css | 7 ++++++- theme/puzzle.mjs | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/theme/basic.css b/theme/basic.css index df89d5e..9b28c51 100644 --- a/theme/basic.css +++ b/theme/basic.css @@ -48,6 +48,10 @@ input, select { margin: 0.2em; max-width: 30em; } +input { + background-color: #ccc4; + color: inherit; +} .notification, .error { padding: 0 1em; border-radius: 8px; @@ -99,7 +103,8 @@ nav li, .category li { max-width: 100%; } input:invalid { - border-color: red; + background-color: #800; + color: white; } .answer_ok { cursor: help; diff --git a/theme/puzzle.mjs b/theme/puzzle.mjs index 7d845ad..07509cf 100644 --- a/theme/puzzle.mjs +++ b/theme/puzzle.mjs @@ -150,7 +150,9 @@ async function loadPuzzle(category, points) { document.querySelector("title").textContent = title document.querySelector("#title").textContent = title document.querySelector("#authors").textContent = puzzle.Authors.join(", ") - document.querySelector("#answer").pattern = window.puzzle.AnswerPattern + if (puzzle.AnswerPattern) { + document.querySelector("#answer").pattern = puzzle.AnswerPattern + } puzzleElement().innerHTML = puzzle.Body console.info("Adding attached scripts...")