Implement comprehensive dark mode functionality
Features implemented:
- Shop-level default theme setting (database migration included)
- User-level theme preference override
- Theme hierarchy: localStorage > user preference > shop default > system default
- CSS custom properties for comprehensive dark/light theme switching
- Theme toggle button in navigation with real-time switching
- Shop settings UI for default theme configuration
- User settings UI for personal theme preference
Technical implementation:
- Added default_theme column to Shop model
- Enhanced User model theme_id functionality
- CSS variables system for seamless theme switching
- JavaScript localStorage management for persistent user choices
- Template logic respecting theme priority hierarchy
All static inline styles cleanup completed as prerequisite work.
Summary by CodeRabbit
-
New Features
- Light/Dark theme support with automatic selection (user preference, shop default, or saved choice) and instant switching.
- Theme preference controls in User Settings; default theme selector in Shop Settings.
- Theme toggle UI.
-
UI
- Comprehensive dark-mode styling across buttons, forms, cards, alerts, and carts.
- Improved checkout for pending crypto payments with per-quote View and Cancel actions and clearer messaging.
- Refined empty cart layout and minor button class cleanups.
- Simplified refund address forms (removed optional labels).
-
Documentation
- Overhauled migration guide with autogeneration flow and backup reminders.
- Added CSS theme audit report and recommendations.
Edited by CodeRabbit