Add dark mode to the web UI #83

Merged
danny merged 1 commit from issue28_dark_mode into main 2026-07-09 18:12:19 +01:00
Collaborator

Closes #28.

  • Theme cookie (nfq_forwarder_theme) read server-side so the correct theme is present on the very first byte, no flash of the wrong mode.
  • Toggle button injected on every page (including the unauthenticated login page) via common.js.
  • style.css colours moved to a light/dark palette-plus-active-variable system.
  • Audit of existing colours for visibility in both modes found and fixed two real issues: the config-edit success banner had no dark-mode counterpart at all, and the initial dark accent colour left primary-button white text under 3.5:1 contrast against it.
  • make lint/make test clean; manually verified via a real httptest.Server round trip (no cookie / valid dark cookie / invalid cookie, on both the login page and an authenticated page).
Closes #28. - Theme cookie (`nfq_forwarder_theme`) read server-side so the correct theme is present on the very first byte, no flash of the wrong mode. - Toggle button injected on every page (including the unauthenticated login page) via `common.js`. - `style.css` colours moved to a light/dark palette-plus-active-variable system. - Audit of existing colours for visibility in both modes found and fixed two real issues: the config-edit success banner had no dark-mode counterpart at all, and the initial dark accent colour left primary-button white text under 3.5:1 contrast against it. - `make lint`/`make test` clean; manually verified via a real httptest.Server round trip (no cookie / valid dark cookie / invalid cookie, on both the login page and an authenticated page).
Add dark mode to the web UI
All checks were successful
CI / lint (push) Successful in 24s
CI / build (push) Successful in 28s
CI / release (push) Has been skipped
CI / lint (pull_request) Successful in 26s
CI / build (pull_request) Successful in 26s
CI / release (pull_request) Has been skipped
0146446922
Theme choice persists via a cookie, read server-side so the correct
theme is present on the very first byte with no flash of the wrong
mode. A toggle button is injected on every page (including the
unauthenticated login page) by common.js. Colours move to a
light/dark palette-plus-active-variable system in style.css.

Auditing existing colours for visibility in both modes surfaced two
real issues, both fixed: the config-edit success banner had no
dark-mode counterpart at all, and the initial dark accent colour left
primary button text under 3.5:1 contrast.

Closes #28

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
claude requested review from danny 2026-07-09 17:53:48 +01:00
danny approved these changes 2026-07-09 18:12:14 +01:00
danny left a comment

LGTM and tested Ok - works well.

LGTM and tested Ok - works well.
danny merged commit 393fcb3dc5 into main 2026-07-09 18:12:19 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
keyop-go/nfq_forwarder!83
No description provided.