[PR #2432] [MERGED] feat(website): add a persistent light and dark theme switch #5225

Closed
opened 2026-10-31 01:04:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2432
Author: @N0zoM1z0
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @N0zoM1z0

Base: main ← Head: feat/website-theme-toggle


📝 Commits (1)

  • 59a0ef8 feat(website): add a persistent light and dark theme switch

📊 Changes

47 files changed (+31691 additions, -31305 deletions)

View changed files

📝 scripts/test-website.py (+15 -5)
📝 scripts/website.py (+1 -1)
📝 website/AGENTS.md (+3 -2)
📝 website/README.md (+22 -8)
📝 website/locales/ar/messages.po (+1645 -1635)
📝 website/locales/de/messages.po (+1645 -1635)
📝 website/locales/es/messages.po (+1645 -1635)
📝 website/locales/fa/messages.po (+1645 -1635)
📝 website/locales/fr/messages.po (+1645 -1635)
📝 website/locales/id/messages.po (+1645 -1635)
📝 website/locales/it/messages.po (+1645 -1635)
📝 website/locales/ja/messages.po (+1645 -1635)
📝 website/locales/ko/messages.po (+1645 -1635)
📝 website/locales/messages.pot (+1590 -1580)
📝 website/locales/pl/messages.po (+1645 -1635)
📝 website/locales/pt-BR/messages.po (+1645 -1635)
📝 website/locales/ru/messages.po (+1645 -1635)
📝 website/locales/th/messages.po (+1645 -1635)
📝 website/locales/tr/messages.po (+1645 -1635)
📝 website/locales/uk/messages.po (+1645 -1635)

...and 27 more files

📄 Description

Add a sun/moon button beside the language selector. A first visit follows the system preference; a manual choice is remembered across pages, language editions and tabs on the same host. Keyboard users get a translated action label and a 44px button.

One shared head script applies the theme before styles load and owns the resolved theme, browser color and change event. The existing palettes, embedded SVGs and dinosaur canvas follow that choice. Storage failures leave the current-page switch usable; delayed cross-tab notifications read the latest saved value. Without JavaScript, pages remain light and the switch is hidden.

The shared page scaffold, maintenance guide and regression check cover the new theme region. Fix the Get started button's hover background to use the theme palette. Catalog changes add two reviewed labels in all 18 translations; existing translations are unchanged, and most PO changes are regenerated source references.

Validation:

  • website.py check: 12 regression tests; 325 HTML pages, 323 indexed routes and 20,793 local references verified.
  • Strict gettext coverage: all 18 catalogs contain 1,479 translations; GNU format checks pass and existing translation values are unchanged.
  • Chromium: 152 edition/layout/path/theme cases, plus 57 follow-up checks covering system changes, persistence, keyboard activation, blocked storage, delayed cross-tab notifications, no-JavaScript reading, all 17 reading pages and intermediate widths.
  • Rendered pixels confirm the dinosaur canvas and all five SVG figures follow manual theme overrides at both / and /rea/.
  • npm run check:fast, formatting and git diff --check pass.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2432 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `feat/website-theme-toggle` --- ### 📝 Commits (1) - [`59a0ef8`](https://github.com/morluto/rea/commit/59a0ef81ed5cca15b2646a930f73ad9a791b619c) feat(website): add a persistent light and dark theme switch ### 📊 Changes **47 files changed** (+31691 additions, -31305 deletions) <details> <summary>View changed files</summary> 📝 `scripts/test-website.py` (+15 -5) 📝 `scripts/website.py` (+1 -1) 📝 `website/AGENTS.md` (+3 -2) 📝 `website/README.md` (+22 -8) 📝 `website/locales/ar/messages.po` (+1645 -1635) 📝 `website/locales/de/messages.po` (+1645 -1635) 📝 `website/locales/es/messages.po` (+1645 -1635) 📝 `website/locales/fa/messages.po` (+1645 -1635) 📝 `website/locales/fr/messages.po` (+1645 -1635) 📝 `website/locales/id/messages.po` (+1645 -1635) 📝 `website/locales/it/messages.po` (+1645 -1635) 📝 `website/locales/ja/messages.po` (+1645 -1635) 📝 `website/locales/ko/messages.po` (+1645 -1635) 📝 `website/locales/messages.pot` (+1590 -1580) 📝 `website/locales/pl/messages.po` (+1645 -1635) 📝 `website/locales/pt-BR/messages.po` (+1645 -1635) 📝 `website/locales/ru/messages.po` (+1645 -1635) 📝 `website/locales/th/messages.po` (+1645 -1635) 📝 `website/locales/tr/messages.po` (+1645 -1635) 📝 `website/locales/uk/messages.po` (+1645 -1635) _...and 27 more files_ </details> ### 📄 Description Add a sun/moon button beside the language selector. A first visit follows the system preference; a manual choice is remembered across pages, language editions and tabs on the same host. Keyboard users get a translated action label and a 44px button. One shared head script applies the theme before styles load and owns the resolved theme, browser color and change event. The existing palettes, embedded SVGs and dinosaur canvas follow that choice. Storage failures leave the current-page switch usable; delayed cross-tab notifications read the latest saved value. Without JavaScript, pages remain light and the switch is hidden. The shared page scaffold, maintenance guide and regression check cover the new theme region. Fix the Get started button's hover background to use the theme palette. Catalog changes add two reviewed labels in all 18 translations; existing translations are unchanged, and most PO changes are regenerated source references. Validation: - `website.py check`: 12 regression tests; 325 HTML pages, 323 indexed routes and 20,793 local references verified. - Strict gettext coverage: all 18 catalogs contain 1,479 translations; GNU format checks pass and existing translation values are unchanged. - Chromium: 152 edition/layout/path/theme cases, plus 57 follow-up checks covering system changes, persistence, keyboard activation, blocked storage, delayed cross-tab notifications, no-JavaScript reading, all 17 reading pages and intermediate widths. - Rendered pixels confirm the dinosaur canvas and all five SVG figures follow manual theme overrides at both `/` and `/rea/`. - `npm run check:fast`, formatting and `git diff --check` pass. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
morluto/rea#5225
No description provided.