Add light/dark mode theme support with OS sync

- Added theme state management (light/dark/system)
- Implemented OS theme detection and automatic sync
- Added theme toggle UI in sidebar with 3 buttons
- Applied dark mode styles to all components:
  - Sidebar with dark backgrounds and borders
  - Note editor with dark text and inputs
  - Toolbar buttons with dark hover states
  - TipTap editor with dark mode text and code blocks
- Theme preference saved to localStorage
- Enabled Tailwind dark mode with class strategy
- Smooth transitions between themes
This commit is contained in:
drelich
2026-03-17 00:07:23 +01:00
parent f4b324b702
commit f3096c16ca
5 changed files with 133 additions and 29 deletions

View File

@@ -19,6 +19,11 @@ code {
/* TipTap Editor Styles */
.ProseMirror {
min-height: 100%;
color: #111827;
}
.dark .ProseMirror {
color: #f3f4f6;
}
.ProseMirror:focus {
@@ -72,6 +77,12 @@ code {
border-radius: 0.25rem;
font-family: 'Courier New', monospace;
font-size: 0.9em;
color: #1f2937;
}
.dark .ProseMirror code {
background-color: #374151;
color: #f3f4f6;
}
.ProseMirror pre {
@@ -83,6 +94,10 @@ code {
margin: 1em 0;
}
.dark .ProseMirror pre {
background-color: #111827;
}
.ProseMirror pre code {
background-color: transparent;
padding: 0;