feat(reader): expand reading theme palette with 20 named themes

Replace the original 5-theme allowlist (light, sepia, dark, night,
high-contrast) with a richer 20-theme palette organized into tonal
families: neutrals (light, paper, slate, oled), warm tones (sepia,
parchment, warm, candlelight), cool tones (azure, sky, arctic, frost),
and evening tones (dusk, sunset, twilight, forest, moss, solarized).

The backend validator in UpdateSettings now accepts all 20 theme names,
and the frontend Tailwind build is updated to include the new theme CSS
variables and preflight reset.
This commit is contained in:
john-okeefe committed 2026-04-19 21:50:40 -04:00
1 parent ba502ec750
commit 3825b93d22
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -497,7 +497,11 @@ func (h *ReaderHandler) UpdateSettings(c *echo.Context) error {
// Validate settings
if readingTheme, ok := settings["reading_theme"].(string); ok {
validThemes := map[string]bool{
"light": true, "sepia": true, "dark": true, "night": true, "high-contrast": true,
"light": true, "paper": true, "sepia": true, "parchment": true,
"warm": true, "candlelight": true, "azure": true, "sky": true,
"arctic": true, "frost": true, "dusk": true, "sunset": true,
"twilight": true, "forest": true, "moss": true, "slate": true,
"oled": true, "solarized": true,
}
if !validThemes[readingTheme] {
return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid reading theme"})