Problem Statement
The public profile page (/u/<username>) inherits the visitor's system theme preference via the layout's theme detection script. However, there is no way for a visitor to toggle the theme manually without changing their OS settings.
Proposed Solution
Add a small theme toggle button in the public profile page header (sun/moon icon). Clicking it toggles between light and dark mode, persisted in localStorage for the visitor.
Alternatives Considered
- System preference only: Already implemented — this is additive
- No toggle on public pages: Limiting for visitors who want dark mode on a light-mode OS
Acceptance Criteria
Tech Context
The theme toggle logic already exists for the dashboard (in the layout's inline script). Extract it to a ThemeToggle component and reuse it on the public profile page.
Additional Context
This is a small, self-contained feature — perfect for a beginner contributor.
Problem Statement
The public profile page (
/u/<username>) inherits the visitor's system theme preference via the layout's theme detection script. However, there is no way for a visitor to toggle the theme manually without changing their OS settings.Proposed Solution
Add a small theme toggle button in the public profile page header (sun/moon icon). Clicking it toggles between light and dark mode, persisted in
localStoragefor the visitor.Alternatives Considered
Acceptance Criteria
darkclass on<html>and saves tolocalStorageTech Context
The theme toggle logic already exists for the dashboard (in the layout's inline script). Extract it to a
ThemeTogglecomponent and reuse it on the public profile page.Additional Context
This is a small, self-contained feature — perfect for a beginner contributor.