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...")