diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2026-11-06 00:50:10 +0100 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2026-11-06 00:50:10 +0100 |
| commit | e3ed5f39e8a83d070466964c8ac37246a260c778 (patch) | |
| tree | 3dbe0acd224f0214bcda1e1ab5af2d928c340efd /pages | |
| parent | 45f94d99bd855511bca9fd942a641942298642a5 (diff) | |
Spamcheck: an attempt at a simple no-JS captcha
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/spamcheck.mustache | 33 | ||||
| -rw-r--r-- | pages/style.css | 5 |
2 files changed, 38 insertions, 0 deletions
diff --git a/pages/spamcheck.mustache b/pages/spamcheck.mustache new file mode 100644 index 0000000..181e873 --- /dev/null +++ b/pages/spamcheck.mustache @@ -0,0 +1,33 @@ +<!doctype html> +<html lang="en"> +<head> + {{> headmeta}} + <title>tirclogv (spamcheck)</title> +</head> +<body> + <main> + <h1>Are you human?</h1> + <p> + Sorry, the server is currently receiving a large number of requests. + Please answer the question to proceed. + </p> + {{#incorrect}} + <p style="color: red">That answer is incorrect.</p> + {{/incorrect}} + <form action="/spamcheck/submit" method="get"> + <input type="hidden" name="hash" value="{{&hash}}"> + <input type="hidden" name="url" value="{{prevurl}}"> + <p> + <label for="ans">{{&question}}</label> + <input type="text" id="ans" name="ans" placeholder="answer..." size="8" style="font-size: 100%" required autofocus> + </p> + <p> + <input type="submit" value="OK" style="min-width: 80px"> + </p> + </form> + </main> + <script> + document.getElementById("ans").value = ""; // if the browser helpfully remembered something, that's not helpful + </script> +</body> +</html> diff --git a/pages/style.css b/pages/style.css index 2e4c791..e9725b7 100644 --- a/pages/style.css +++ b/pages/style.css @@ -30,6 +30,11 @@ body { --link-color: #abf; --calendar-month-stripe-color: #446; } + + input[type="text"] { + background-color: #444; + color: #fff; + } } html, body { |
