Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Fix theme system: hardcoded colors, page navigation, and full theme support

LearningCircuit4e5b6d28b83f
diff --git a/src/local_deep_research/defaults/default_settings.json b/src/local_deep_research/defaults/default_settings.json
index 3ba73bff2c..af7135e7da 100644
--- a/src/local_deep_research/defaults/default_settings.json
+++ b/src/local_deep_research/defaults/default_settings.json
@@ -198,36 +198,33 @@
},
"app.theme": {
"category": "app_interface",
- "description": "User interface color theme. 'System' follows your operating system preference.",
+ "description": "User interface color theme. Choose from 20 themes including popular developer themes.",
"editable": true,
"max_value": null,
"min_value": null,
"name": "UI Theme",
"options": [
- {
- "label": "Dark",
- "value": "dark"
- },
- {
- "label": "Light",
- "value": "light"
- },
- {
- "label": "Sepia (Reading)",
- "value": "sepia"
- },
- {
- "label": "High Contrast",
- "value": "high-contrast"
- },
- {
- "label": "Midnight Blue",
- "value": "midnight"
- },
- {
- "label": "System Default",
- "value": "system"
- }
+ {"label": "Dark (Default)", "value": "dark"},
+ {"label": "Light", "value": "light"},
+ {"label": "Sepia (Reading)", "value": "sepia"},
+ {"label": "High Contrast", "value": "high-contrast"},
+ {"label": "Midnight Blue", "value": "midnight"},
+ {"label": "Ocean", "value": "ocean"},
+ {"label": "Forest", "value": "forest"},
+ {"label": "Sunset", "value": "sunset"},
+ {"label": "Rose", "value": "rose"},
+ {"label": "Lavender", "value": "lavender"},
+ {"label": "Nord", "value": "nord"},
+ {"label": "Dracula", "value": "dracula"},
+ {"label": "Monokai", "value": "monokai"},
+ {"label": "Solarized Dark", "value": "solarized-dark"},
+ {"label": "Solarized Light", "value": "solarized-light"},
+ {"label": "Gruvbox Dark", "value": "gruvbox-dark"},
+ {"label": "Gruvbox Light", "value": "gruvbox-light"},
+ {"label": "Tokyo Night", "value": "tokyo-night"},
+ {"label": "Catppuccin", "value": "catppuccin"},
+ {"label": "One Dark", "value": "one-dark"},
+ {"label": "System Default", "value": "system"}
],
"step": null,
"type": "APP",
diff --git a/src/local_deep_research/web/static/css/collections.css b/src/local_deep_research/web/static/css/collections.css
index 9876c4091c..b98e61cbe6 100644
--- a/src/local_deep_research/web/static/css/collections.css
+++ b/src/local_deep_research/web/static/css/collections.css
@@ -491,36 +491,39 @@
}
.ldr-btn-collections-success {
- background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
- color: white;
- box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
+ background: var(--success-color);
+ color: var(--bg-primary);
+ box-shadow: 0 4px 15px rgba(var(--success-color-rgb), 0.3);
}
.ldr-btn-collections-success:hover {
transform: translateY(-2px);
- box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
+ box-shadow: 0 6px 20px rgba(var(--success-color-rgb), 0.4);
+ filter: brightness(1.1);
}
.ldr-btn-collections-warning {
- background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
- color: white;
- box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
+ background: var(--warning-color);
+ color: var(--bg-primary);
+ box-shadow: 0 4px 15px rgba(var(--warning-color-rgb), 0.3);
}
.ldr-btn-collections-warning:hover {
transform: translateY(-2px);
- box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
+ box-shadow: 0 6px 20px rgba(var(--warning-color-rgb), 0.4);
+ filter: brightness(1.1);
}
.ldr-btn-collections-danger {
- background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
- color: white;
- box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
+ background: var(--error-color);
+ color: var(--bg-primary);
+ box-shadow: 0 4px 15px rgba(var(--error-color-rgb), 0.3);
}
.ldr-btn-collections-danger:hover {
transform: translateY(-2px);
- box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
+ box-shadow: 0 6px 20px rgba(var(--error-color-rgb), 0.4);
+ filter: brightness(0.9);
}
.ldr-btn-lg {
@@ -542,25 +545,25 @@
.ldr-btn-outline-success {
background-color: transparent;
- color: #28a745;
- border: 2px solid #28a745;
+ color: var(--success-color);
+ border: 2px solid var(--success-color);
}
.ldr-btn-outline-success:hover {
- background-color: #28a745;
- color: white;
+ background-color: var(--success-color);
+ color: var(--bg-primary);
transform: translateY(-2px);
}
.ldr-btn-outline-warning {
background-color: transparent;
- color: #ffc107;
- border: 2px solid #ffc107;
+ color: var(--warning-color);
+ border: 2px solid var(--warning-color);
}
.ldr-btn-outline-warning:hover {
- background-color: #ffc107;
- color: white;
+ background-color: var(--warning-color);
+ color: var(--bg-primary);
transform: translateY(-2px);
}
diff --git a/src/local_deep_research/web/static/css/mobile-navigation.css b/src/local_deep_research/web/static/css/mobile-navigation.css
index 488ef34049..a4013eab47 100644
--- a/src/local_deep_research/web/static/css/mobile-navigation.css
+++ b/src/local_deep_research/web/static/css/mobile-navigation.css
@@ -549,3 +549,153 @@
--mobile-sheet-bg: #0a1628;
--mobile-sheet-handle: #2a4a70;
}
+
+[data-theme="ocean"] {
+ --mobile-nav-bg: #0c1929;
+ --mobile-nav-border: #1e3a5f;
+ --mobile-nav-text: #7aa2c4;
+ --mobile-nav-active: #00bcd4;
+ --mobile-nav-text-active: #00bcd4;
+ --mobile-sheet-bg: #0a1422;
+ --mobile-sheet-handle: #2a4a6a;
+}
+
+[data-theme="forest"] {
+ --mobile-nav-bg: #1a2416;
+ --mobile-nav-border: #2d4025;
+ --mobile-nav-text: #8ba07a;
+ --mobile-nav-active: #4caf50;
+ --mobile-nav-text-active: #4caf50;
+ --mobile-sheet-bg: #151f12;
+ --mobile-sheet-handle: #3a5030;
+}
+
+[data-theme="sunset"] {
+ --mobile-nav-bg: #2d1b2d;
+ --mobile-nav-border: #4a2c4a;
+ --mobile-nav-text: #c4a3a3;
+ --mobile-nav-active: #ff6b6b;
+ --mobile-nav-text-active: #ff6b6b;
+ --mobile-sheet-bg: #251828;
+ --mobile-sheet-handle: #5a3a5a;
+}
+
+[data-theme="rose"] {
+ --mobile-nav-bg: #2d1b24;
+ --mobile-nav-border: #4a2c3a;
+ --mobile-nav-text: #c4a3b0;
+ --mobile-nav-active: #ff69b4;
+ --mobile-nav-text-active: #ff69b4;
+ --mobile-sheet-bg: #251820;
+ --mobile-sheet-handle: #5a3a4a;
+}
+
+[data-theme="lavender"] {
+ --mobile-nav-bg: #1e1b2d;
+ --mobile-nav-border: #352c4a;
+ --mobile-nav-text: #a8a3c4;
+ --mobile-nav-active: #9370db;
+ --mobile-nav-text-active: #9370db;
+ --mobile-sheet-bg: #181525;
+ --mobile-sheet-handle: #453a6a;
+}
+
+[data-theme="nord"] {
+ --mobile-nav-bg: #2e3440;
+ --mobile-nav-border: #3b4252;
+ --mobile-nav-text: #81a1c1;
+ --mobile-nav-active: #88c0d0;
+ --mobile-nav-text-active: #88c0d0;
+ --mobile-sheet-bg: #242933;
+ --mobile-sheet-handle: #4c566a;
+}
+
+[data-theme="dracula"] {
+ --mobile-nav-bg: #282a36;
+ --mobile-nav-border: #44475a;
+ --mobile-nav-text: #6272a4;
+ --mobile-nav-active: #bd93f9;
+ --mobile-nav-text-active: #bd93f9;
+ --mobile-sheet-bg: #21222c;
+ --mobile-sheet-handle: #555970;
+}
+
+[data-theme="monokai"] {
+ --mobile-nav-bg: #272822;
+ --mobile-nav-border: #3e3d32;
+ --mobile-nav-text: #75715e;
+ --mobile-nav-active: #a6e22e;
+ --mobile-nav-text-active: #a6e22e;
+ --mobile-sheet-bg: #1e1f1c;
+ --mobile-sheet-handle: #4e4d42;
+}
+
+[data-theme="solarized-dark"] {
+ --mobile-nav-bg: #002b36;
+ --mobile-nav-border: #073642;
+ --mobile-nav-text: #586e75;
+ --mobile-nav-active: #268bd2;
+ --mobile-nav-text-active: #268bd2;
+ --mobile-sheet-bg: #001e26;
+ --mobile-sheet-handle: #094152;
+}
+
+[data-theme="solarized-light"] {
+ --mobile-nav-bg: #eee8d5;
+ --mobile-nav-border: #ddd6c3;
+ --mobile-nav-text: #657b83;
+ --mobile-nav-active: #268bd2;
+ --mobile-nav-text-active: #268bd2;
+ --mobile-sheet-bg: #fdf6e3;
+ --mobile-sheet-handle: #ccc6b3;
+}
+
+[data-theme="gruvbox-dark"] {
+ --mobile-nav-bg: #282828;
+ --mobile-nav-border: #3c3836;
+ --mobile-nav-text: #928374;
+ --mobile-nav-active: #fabd2f;
+ --mobile-nav-text-active: #fabd2f;
+ --mobile-sheet-bg: #1d2021;
+ --mobile-sheet-handle: #504945;
+}
+
+[data-theme="gruvbox-light"] {
+ --mobile-nav-bg: #f2e5bc;
+ --mobile-nav-border: #e2d5ac;
+ --mobile-nav-text: #7c6f64;
+ --mobile-nav-active: #b57614;
+ --mobile-nav-text-active: #b57614;
+ --mobile-sheet-bg: #fbf1c7;
+ --mobile-sheet-handle: #d2c59c;
+}
+
+[data-theme="tokyo-night"] {
+ --mobile-nav-bg: #1a1b26;
+ --mobile-nav-border: #24283b;
+ --mobile-nav-text: #565f89;
+ --mobile-nav-active: #7aa2f7;
+ --mobile-nav-text-active: #7aa2f7;
+ --mobile-sheet-bg: #16161e;
+ --mobile-sheet-handle: #343b5a;
+}
+
+[data-theme="catppuccin"] {
+ --mobile-nav-bg: #1e1e2e;
+ --mobile-nav-border: #313244;
+ --mobile-nav-text: #6c7086;
+ --mobile-nav-active: #cba6f7;
+ --mobile-nav-text-active: #cba6f7;
+ --mobile-sheet-bg: #181825;
+ --mobile-sheet-handle: #45475a;
+}
+
+[data-theme="one-dark"] {
+ --mobile-nav-bg: #21252b;
+ --mobile-nav-border: #2c313c;
+ --mobile-nav-text: #5c6370;
+ --mobile-nav-active: #61afef;
+ --mobile-nav-text-active: #61afef;
+ --mobile-sheet-bg: #1b1f23;
+ --mobile-sheet-handle: #3e4451;
+}
diff --git a/src/local_deep_research/web/static/css/news.css b/src/local_deep_research/web/static/css/news.css
index 0789672780..335cf80745 100644
--- a/src/local_deep_research/web/static/css/news.css
+++ b/src/local_deep_research/web/static/css/news.css
@@ -1,18 +1,5 @@
/* News Page Styles - Following LDR Design System */
-
-/* Import LDR color variables */
-:root {
- --bg-primary: #121212;
- --bg-secondary: #1e1e2d;
- --bg-tertiary: #2a2a3a;
- --accent-primary: #6e4ff6;
- --accent-secondary: #9179f0;
- --accent-tertiary: #40bfff;
- --text-primary: #f5f5f5;
- --text-secondary: #c0c0cc;
- --text-muted: #8a8aa0;
- --border-color: #343452;
-}
+/* Note: Color variables inherited from themes.css */
/* Alert Container */
.ldr-settings-alert-container {
diff --git a/src/local_deep_research/web/static/css/settings.css b/src/local_deep_research/web/static/css/settings.css
index 2b46b46489..4292564e29 100644
--- a/src/local_deep_research/web/static/css/settings.css
+++ b/src/local_deep_research/web/static/css/settings.css
@@ -314,7 +314,7 @@
top: 100%;
right: 0;
background-color: rgba(0, 0, 0, 0.9);
- color: #fff;
+ color: var(--text-primary);
padding: 6px 10px;
border-radius: 4px;
font-size: 0.8rem;
@@ -1184,25 +1184,25 @@
/* Add styling for Reset to Defaults button */
#reset-to-defaults-button {
margin-left: 10px;
- background-color: #e74c3c;
- color: #fff;
+ background-color: var(--error-color);
+ color: var(--bg-primary);
border: none;
}
#reset-to-defaults-button:hover {
- background-color: #c0392b;
+ filter: brightness(0.85);
}
/* Add styling for Fix Corrupted Settings button */
#fix-corrupted-button {
margin-left: 10px;
- background-color: #3498db;
- color: #fff;
+ background-color: var(--accent-primary);
+ color: var(--bg-primary);
border: none;
}
#fix-corrupted-button:hover {
- background-color: #2980b9;
+ background-color: var(--accent-secondary);
}
.ldr-settings-item .ldr-checkbox-label {
@@ -1223,9 +1223,9 @@
transform: translateY(-50%);
width: 10px;
height: 10px;
- border: 2px solid rgba(100, 100, 255, 0.3);
+ border: 2px solid rgba(var(--accent-primary-rgb), 0.3);
border-radius: 50%;
- border-top-color: #6060ff;
+ border-top-color: var(--accent-primary);
animation: spinner 0.8s linear infinite;
z-index: 10;
}
diff --git a/src/local_deep_research/web/static/css/styles.css b/src/local_deep_research/web/static/css/styles.css
index 182a18fa62..9ce19cabb4 100644
--- a/src/local_deep_research/web/static/css/styles.css
+++ b/src/local_deep_research/web/static/css/styles.css
@@ -181,7 +181,7 @@ a:hover {
.ldr-sidebar-nav li.active {
color: var(--accent-primary);
- background-color: rgba(110, 79, 246, 0.1);
+ background-color: rgba(var(--accent-primary-rgb), 0.1);
border-left-color: var(--accent-primary);
}
@@ -304,7 +304,56 @@ a:hover {
align-items: center;
}
-/* Theme Toggle Button */
+/* Theme Selector Dropdown */
+.ldr-theme-selector {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ background: var(--bg-tertiary);
+ border: 1px solid var(--border-color);
+ border-radius: 8px;
+ padding: 0.25rem 0.5rem;
+ transition: all 0.2s ease;
+}
+
+.ldr-theme-selector:hover {
+ border-color: var(--accent-primary);
+}
+
+.ldr-theme-selector:focus-within {
+ border-color: var(--accent-primary);
+ box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.2);
+}
+
+.ldr-theme-icon {
+ color: var(--accent-primary);
+ font-size: 0.9rem;
+}
+
+.ldr-theme-dropdown {
+ background: transparent;
+ border: none;
+ color: var(--text-primary);
+ font-size: 0.85rem;
+ padding: 0.25rem 0.5rem 0.25rem 0;
+ cursor: pointer;
+ outline: none;
+ min-width: 120px;
+ max-width: 160px;
+}
+
+.ldr-theme-dropdown option,
+.ldr-theme-dropdown optgroup {
+ background: var(--bg-secondary);
+ color: var(--text-primary);
+}
+
+.ldr-theme-dropdown optgroup {
+ font-weight: 600;
+ color: var(--text-muted);
+}
+
+/* Legacy theme toggle button (kept for compatibility) */
.ldr-theme-toggle {
background: transparent;
border: 1px solid var(--border-color);
@@ -447,7 +496,7 @@ textarea, input[type="text"] {
textarea:focus, input[type="text"]:focus {
outline: none;
border-color: var(--accent-primary);
- box-shadow: 0 0 0 3px rgba(110, 79, 246, 0.2);
+ box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.2);
}
.btn {
@@ -487,7 +536,7 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-btn-outline:hover {
- background-color: rgba(64, 191, 255, 0.1);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.1);
}
.ldr-delete-btn {
@@ -496,16 +545,16 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-delete-btn:hover {
- background-color: rgba(250, 92, 124, 0.1);
+ background-color: rgba(var(--error-color-rgb), 0.1);
}
.ldr-terminate-btn {
- color: #e74c3c;
- border-color: #e74c3c;
+ color: var(--error-color);
+ border-color: var(--error-color);
}
.ldr-terminate-btn:hover {
- background-color: rgba(231, 76, 60, 0.1);
+ background-color: rgba(var(--error-color-rgb), 0.1);
}
.btn:disabled {
@@ -544,7 +593,7 @@ textarea:focus, input[type="text"]:focus {
.ldr-mode-option.active {
border-color: var(--accent-primary);
- background-color: rgba(110, 79, 246, 0.1);
+ background-color: rgba(var(--accent-primary-rgb), 0.1);
}
.ldr-mode-icon {
@@ -658,18 +707,18 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-status-indicator.ldr-status-completed {
- background-color: rgba(10, 207, 151, 0.2);
+ background-color: rgba(var(--success-color-rgb), 0.2);
color: var(--success-color);
}
.ldr-status-indicator.ldr-status-failed,
.ldr-status-indicator.ldr-status-error {
- background-color: rgba(250, 92, 124, 0.2);
+ background-color: rgba(var(--error-color-rgb), 0.2);
color: var(--error-color);
}
.ldr-status-indicator.ldr-status-in_progress {
- background-color: rgba(64, 191, 255, 0.2);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.2);
color: var(--accent-tertiary);
}
@@ -737,7 +786,7 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-sound-test-content .ldr-test-tip {
- background-color: rgba(64, 191, 255, 0.1);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.1);
border-radius: 6px;
padding: 10px;
margin: 10px 0;
@@ -791,29 +840,29 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-status-completed {
- background-color: rgba(10, 207, 151, 0.15);
+ background-color: rgba(var(--success-color-rgb), 0.15);
color: var(--success-color);
}
.ldr-status-in-progress {
- background-color: rgba(64, 191, 255, 0.15);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.15);
color: var(--accent-tertiary);
animation: pulse 2s infinite;
}
.ldr-status-failed {
- background-color: rgba(250, 92, 124, 0.15);
+ background-color: rgba(var(--error-color-rgb), 0.15);
color: var(--error-color);
}
.ldr-status-suspended {
- background-color: rgba(243, 156, 18, 0.15);
- color: #ffc107;
+ background-color: rgba(var(--warning-color-rgb), 0.15);
+ color: var(--warning-color);
}
.ldr-status-terminating {
- background-color: rgba(231, 76, 60, 0.15);
- color: #e74c3c;
+ background-color: rgba(var(--error-color-rgb), 0.15);
+ color: var(--error-color);
animation: pulse 1.5s infinite;
}
@@ -1085,7 +1134,7 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-phase-termination {
- color: #e74c3c;
+ color: var(--error-color);
font-weight: bold;
}
@@ -1098,7 +1147,7 @@ textarea:focus, input[type="text"]:focus {
.ldr-error-message {
padding: 1rem;
- background-color: rgba(250, 92, 124, 0.1);
+ background-color: rgba(var(--error-color-rgb), 0.1);
border: 1px solid var(--error-color);
border-radius: 8px;
color: var(--error-color);
@@ -1120,7 +1169,7 @@ textarea:focus, input[type="text"]:focus {
.ldr-spinner {
width: 40px;
height: 40px;
- border: 4px solid rgba(110, 79, 246, 0.2);
+ border: 4px solid rgba(var(--accent-primary-rgb), 0.2);
border-left-color: var(--accent-primary);
border-radius: 50%;
animation: spin 1s linear infinite;
@@ -1188,14 +1237,14 @@ textarea:focus, input[type="text"]:focus {
/* External link styling for sidebar and mobile navigation - more subtle */
.ldr-sidebar-nav ul li.ldr-external-link {
color: var(--text-primary);
- border-left: 3px solid #607d8b;
+ border-left: 3px solid var(--text-muted);
margin-bottom: 10px;
padding-left: 17px;
opacity: 0.75;
}
.ldr-sidebar-nav ul li.ldr-external-link:hover {
- background-color: rgba(96, 125, 139, 0.1);
+ background-color: rgba(var(--text-muted-rgb), 0.1);
opacity: 1;
cursor: pointer;
}
@@ -1519,24 +1568,24 @@ textarea:focus, input[type="text"]:focus {
/* File path styling from the first version */
.ldr-file-path {
- background-color: #1a1a1a;
+ background-color: var(--bg-secondary);
padding: 10px;
border-radius: 4px;
font-family: monospace;
margin: 15px 0;
word-break: break-all;
- border: 1px solid #333;
+ border: 1px solid var(--border-color);
}
.ldr-config-example {
- background-color: #0a0a0a;
+ background-color: var(--bg-primary);
padding: 15px;
border-radius: 4px;
font-family: monospace;
margin: 15px 0;
overflow-x: auto;
- border: 1px solid #333;
- color: #e6e6e6;
+ border: 1px solid var(--border-color);
+ color: var(--text-primary);
}
.mt-4 {
@@ -1551,8 +1600,8 @@ textarea:focus, input[type="text"]:focus {
justify-content: center;
gap: 8px;
padding: 8px 16px;
- background-color: #3498db;
- color: white;
+ background-color: var(--accent-primary);
+ color: var(--bg-primary);
border: none;
border-radius: 4px;
cursor: pointer;
@@ -1560,7 +1609,7 @@ textarea:focus, input[type="text"]:focus {
}
#try-again-btn:hover {
- background-color: #2980b9;
+ background-color: var(--accent-secondary);
}
#try-again-btn i {
@@ -1768,14 +1817,14 @@ textarea:focus, input[type="text"]:focus {
/* Add warning message styling */
.ldr-warning-message {
- background-color: rgba(255, 193, 7, 0.1);
- color: #ffc107;
- border-color: rgba(255, 193, 7, 0.2);
+ background-color: rgba(var(--warning-color-rgb), 0.1);
+ color: var(--warning-color);
+ border-color: rgba(var(--warning-color-rgb), 0.2);
}
/* Styling for search engine selection log entries */
.ldr-console-log-entry[data-log-type="info"][data-engine-selected="true"] {
- background-color: rgba(64, 191, 255, 0.05);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.05);
border-left: 2px solid var(--accent-tertiary);
padding-left: calc(0.5rem - 2px);
font-weight: 500;
@@ -1792,9 +1841,9 @@ textarea:focus, input[type="text"]:focus {
padding: 10px 15px;
border-radius: 4px;
border-left: 4px solid;
- background-color: rgba(220, 53, 69, 0.1);
- color: #dc3545;
- border-color: rgba(220, 53, 69, 0.2);
+ background-color: rgba(var(--error-color-rgb), 0.1);
+ color: var(--error-color);
+ border-color: rgba(var(--error-color-rgb), 0.2);
font-weight: 500;
}
@@ -1817,7 +1866,7 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-small-btn:hover {
- background-color: rgba(110, 79, 246, 0.2);
+ background-color: rgba(var(--accent-primary-rgb), 0.2);
color: var(--text-primary);
}
@@ -1876,7 +1925,7 @@ textarea:focus, input[type="text"]:focus {
.ldr-search-input:focus {
outline: none;
border-color: var(--accent-primary);
- box-shadow: 0 0 0 3px rgba(110, 79, 246, 0.2);
+ box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.2);
}
/* Toast Notifications */
@@ -1959,8 +2008,8 @@ textarea:focus, input[type="text"]:focus {
font-weight: 600;
transition: all 0.2s;
border-radius: 8px;
- background-color: rgba(64, 191, 255, 0.05);
- border: 1px solid rgba(64, 191, 255, 0.1);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.05);
+ border: 1px solid rgba(var(--accent-tertiary-rgb), 0.1);
width: 100%;
text-align: left;
font-family: inherit;
@@ -1969,8 +2018,8 @@ textarea:focus, input[type="text"]:focus {
.ldr-advanced-options-toggle:hover {
color: var(--accent-secondary);
- background-color: rgba(110, 79, 246, 0.1);
- border-color: rgba(110, 79, 246, 0.2);
+ background-color: rgba(var(--accent-primary-rgb), 0.1);
+ border-color: rgba(var(--accent-primary-rgb), 0.2);
}
.ldr-advanced-options-toggle .ldr-toggle-text {
@@ -1987,7 +2036,7 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-advanced-options-panel {
- background-color: rgba(42, 42, 58, 0.5);
+ background-color: rgba(var(--bg-tertiary-rgb), 0.5);
border-radius: 8px;
padding: 0 1.5rem;
margin-bottom: 1.5rem;
@@ -2049,7 +2098,7 @@ textarea:focus, input[type="text"]:focus {
}
.ldr-checkbox-label:hover {
- background-color: rgba(64, 191, 255, 0.05);
+ background-color: rgba(var(--accent-tertiary-rgb), 0.05);
}
.ldr-checkbox-label input[type="checkbox"] {
@@ -2092,7 +2141,7 @@ input[type="number"].ldr-form-control::-webkit-inner-spin-button {
.ldr-form-control:focus {
outline: none;
border-color: var(--accent-primary);
- box-shadow: 0 0 0 3px rgba(110, 79, 246, 0.15);
+ box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}
/* Notification Group Styles from app-refactoring */
@@ -2144,7 +2193,7 @@ input[type="number"].ldr-form-control::-webkit-inner-spin-button {
.ldr-custom-dropdown-input:focus {
outline: none;
border-color: var(--accent-primary);
- box-shadow: 0 0 0 3px rgba(110, 79, 246, 0.2);
+ box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.2);
}
.ldr-custom-dropdown-list {
@@ -2173,7 +2222,7 @@ input[type="number"].ldr-form-control::-webkit-inner-spin-button {
}
.ldr-custom-dropdown-item.active {
- background-color: rgba(110, 79, 246, 0.2);
+ background-color: rgba(var(--accent-primary-rgb), 0.2);
}
.ldr-custom-dropdown-item .ldr-highlight {
@@ -2192,7 +2241,7 @@ input[type="number"].ldr-form-control::-webkit-inner-spin-button {
border-top: 1px solid var(--border-color);
color: var(--accent-tertiary);
font-size: 0.9em;
- background-color: rgba(110, 79, 246, 0.05);
+ background-color: rgba(var(--accent-primary-rgb), 0.05);
}
.ldr-model-warning {
@@ -2259,18 +2308,18 @@ input[type="number"].ldr-form-control::-webkit-inner-spin-button {
}
.ldr-star-rating .ldr-star {
- color: #444;
+ color: var(--text-muted);
transition: color 0.2s ease;
user-select: none;
cursor: pointer;
}
.ldr-star-rating .ldr-star.active {
- color: #ffd700;
+ color: var(--warning-color);
}
.ldr-star-rating .ldr-star.ldr-hover {
- color: #ffd700;
+ color: var(--warning-color);
}
.ldr-metadata-item .ldr-star-rating {
@@ -2340,7 +2389,7 @@ input[type="number"].ldr-form-control::-webkit-inner-spin-button {
}
.ldr-feedback-option:hover {
- background: rgba(110, 79, 246, 0.1);
+ background: rgba(var(--accent-primary-rgb), 0.1);
border-color: var(--accent-primary);
color: var(--text-primary);
text-decoration: none;
diff --git a/src/local_deep_research/web/static/css/subscriptions.css b/src/local_deep_research/web/static/css/subscriptions.css
index 82f88917c8..9f59a4e081 100644
--- a/src/local_deep_research/web/static/css/subscriptions.css
+++ b/src/local_deep_research/web/static/css/subscriptions.css
@@ -1,18 +1,5 @@
/* Subscriptions Management Page Styles */
-
-/* Import LDR color variables */
-:root {
- --bg-primary: #121212;
- --bg-secondary: #1e1e2d;
- --bg-tertiary: #2a2a3a;
- --accent-primary: #6e4ff6;
- --accent-secondary: #9179f0;
- --accent-tertiary: #40bfff;
- --text-primary: #f5f5f5;
- --text-secondary: #c0c0cc;
- --text-muted: #8a8aa0;
- --border-color: #343452;
-}
+/* Note: Color variables inherited from themes.css */
.ldr-subscriptions-page {
padding: 20px;
@@ -74,7 +61,7 @@
.ldr-stat-value {
font-size: 2.5rem;
font-weight: bold;
- color: #2c5aa0;
+ color: var(--accent-primary);
margin-bottom: 5px;
}
@@ -121,16 +108,16 @@
}
.ldr-status-indicator.active {
- background: #4caf50;
- box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
+ background: var(--success-color);
+ box-shadow: 0 0 8px rgba(var(--success-color-rgb), 0.6);
}
.ldr-status-indicator.ldr-inactive {
- background: #f44336;
+ background: var(--error-color);
}
.ldr-status-indicator.ldr-checking {
- background: #ff9800;
+ background: var(--warning-color);
animation: pulse 1.5s infinite;
}
@@ -193,8 +180,8 @@
}
.ldr-folder-item.active {
- background-color: #e3f2fd;
- color: #2c5aa0;
+ background-color: rgba(var(--accent-primary-rgb), 0.1);
+ color: var(--accent-primary);
}
.ldr-folder-count {
@@ -206,8 +193,8 @@
}
.ldr-folder-item.active .ldr-folder-count {
- background: #2c5aa0;
- color: white;
+ background: var(--accent-primary);
+ color: var(--bg-primary);
}
/* Main Content Area */
@@ -249,7 +236,7 @@
}
.ldr-search-box input:focus {
- border-color: #2c5aa0;
+ border-color: var(--accent-primary);
}
.ldr-filter-options {
@@ -318,16 +305,16 @@
}
.ldr-btn-icon:hover {
- color: #2c5aa0;
+ color: var(--accent-primary);
}
.ldr-btn-icon.btn-danger {
- color: #dc3545;
+ color: var(--error-color);
}
.ldr-btn-icon.btn-danger:hover {
- color: #c82333;
- background-color: rgba(220, 53, 69, 0.1);
+ color: var(--error-color);
+ background-color: rgba(var(--error-color-rgb), 0.1);
border-radius: 4px;
}
@@ -357,23 +344,23 @@
}
.ldr-status-badge.ldr-status-active {
- background: #d4edda;
- color: #155724;
+ background: rgba(var(--success-color-rgb), 0.2);
+ color: var(--success-color);
}
.ldr-status-badge.ldr-status-paused {
- background: #f8d7da;
- color: #721c24;
+ background: rgba(var(--error-color-rgb), 0.2);
+ color: var(--error-color);
}
.ldr-frequency-badge {
- background: #e2e3e5;
- color: #383d41;
+ background: var(--bg-tertiary);
+ color: var(--text-secondary);
}
.ldr-folder-badge {
- background: #d1ecf1;
- color: #0c5460;
+ background: rgba(var(--accent-tertiary-rgb), 0.2);
+ color: var(--accent-tertiary);
}
.ldr-subscription-stats {
@@ -393,7 +380,7 @@
}
.ldr-source-link {
- color: #2c5aa0;
+ color: var(--accent-primary);
text-decoration: none;
}
@@ -456,7 +443,7 @@
}
.ldr-history-item-header a:hover {
- color: #2c5aa0;
+ color: var(--accent-primary);
}
.ldr-history-date {
diff --git a/src/local_deep_research/web/static/css/themes.css b/src/local_deep_research/web/static/css/themes.css
index 8a18b0ff2c..7341ae1b80 100644
--- a/src/local_deep_research/web/static/css/themes.css
+++ b/src/local_deep_research/web/static/css/themes.css
@@ -219,6 +219,591 @@
--card-bg: var(--bg-secondary);
}
+/* Ocean Theme - Deep sea blues and teals */
+[data-theme="ocean"] {
+ --bg-primary: #0c1821;
+ --bg-secondary: #1b2838;
+ --bg-tertiary: #2a3f54;
+ --accent-primary: #00b4d8;
+ --accent-secondary: #0096c7;
+ --accent-tertiary: #48cae4;
+ --text-primary: #e0f7fa;
+ --text-secondary: #b2ebf2;
+ --text-muted: #80deea;
+ --border-color: #0077b6;
+ --success-color: #00e676;
+ --warning-color: #ffd54f;
+ --error-color: #ff5252;
+
+ --bg-primary-rgb: 12, 24, 33;
+ --bg-secondary-rgb: 27, 40, 56;
+ --bg-tertiary-rgb: 42, 63, 84;
+ --accent-primary-rgb: 0, 180, 216;
+ --accent-secondary-rgb: 0, 150, 199;
+ --accent-tertiary-rgb: 72, 202, 228;
+ --text-primary-rgb: 224, 247, 250;
+ --text-secondary-rgb: 178, 235, 242;
+ --text-muted-rgb: 128, 222, 234;
+ --border-color-rgb: 0, 119, 182;
+ --success-color-rgb: 0, 230, 118;
+ --warning-color-rgb: 255, 213, 79;
+ --error-color-rgb: 255, 82, 82;
+
+ --card-shadow: 0 4px 20px rgba(0, 119, 182, 0.3);
+ --glow-effect: 0 0 15px rgba(0, 180, 216, 0.3);
+ --gradient-bg: linear-gradient(135deg, #1b2838 0%, #0c1821 100%);
+ --overlay-color: rgba(12, 24, 33, 0.7);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Forest Theme - Natural greens */
+[data-theme="forest"] {
+ --bg-primary: #1a2f1a;
+ --bg-secondary: #243524;
+ --bg-tertiary: #2e4a2e;
+ --accent-primary: #4caf50;
+ --accent-secondary: #81c784;
+ --accent-tertiary: #a5d6a7;
+ --text-primary: #e8f5e9;
+ --text-secondary: #c8e6c9;
+ --text-muted: #a5d6a7;
+ --border-color: #388e3c;
+ --success-color: #69f0ae;
+ --warning-color: #ffca28;
+ --error-color: #ef5350;
+
+ --bg-primary-rgb: 26, 47, 26;
+ --bg-secondary-rgb: 36, 53, 36;
+ --bg-tertiary-rgb: 46, 74, 46;
+ --accent-primary-rgb: 76, 175, 80;
+ --accent-secondary-rgb: 129, 199, 132;
+ --accent-tertiary-rgb: 165, 214, 167;
+ --text-primary-rgb: 232, 245, 233;
+ --text-secondary-rgb: 200, 230, 201;
+ --text-muted-rgb: 165, 214, 167;
+ --border-color-rgb: 56, 142, 60;
+ --success-color-rgb: 105, 240, 174;
+ --warning-color-rgb: 255, 202, 40;
+ --error-color-rgb: 239, 83, 80;
+
+ --card-shadow: 0 4px 20px rgba(56, 142, 60, 0.25);
+ --glow-effect: 0 0 15px rgba(76, 175, 80, 0.3);
+ --gradient-bg: linear-gradient(135deg, #243524 0%, #1a2f1a 100%);
+ --overlay-color: rgba(26, 47, 26, 0.7);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Sunset Theme - Warm orange and pink */
+[data-theme="sunset"] {
+ --bg-primary: #1a1a2e;
+ --bg-secondary: #2d2d44;
+ --bg-tertiary: #3d3d5c;
+ --accent-primary: #ff6b6b;
+ --accent-secondary: #feca57;
+ --accent-tertiary: #ff9ff3;
+ --text-primary: #ffeaa7;
+ --text-secondary: #fdcb6e;
+ --text-muted: #fab1a0;
+ --border-color: #e17055;
+ --success-color: #00d2d3;
+ --warning-color: #feca57;
+ --error-color: #ff6b6b;
+
+ --bg-primary-rgb: 26, 26, 46;
+ --bg-secondary-rgb: 45, 45, 68;
+ --bg-tertiary-rgb: 61, 61, 92;
+ --accent-primary-rgb: 255, 107, 107;
+ --accent-secondary-rgb: 254, 202, 87;
+ --accent-tertiary-rgb: 255, 159, 243;
+ --text-primary-rgb: 255, 234, 167;
+ --text-secondary-rgb: 253, 203, 110;
+ --text-muted-rgb: 250, 177, 160;
+ --border-color-rgb: 225, 112, 85;
+ --success-color-rgb: 0, 210, 211;
+ --warning-color-rgb: 254, 202, 87;
+ --error-color-rgb: 255, 107, 107;
+
+ --card-shadow: 0 4px 20px rgba(225, 112, 85, 0.3);
+ --glow-effect: 0 0 15px rgba(255, 107, 107, 0.3);
+ --gradient-bg: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
+ --overlay-color: rgba(26, 26, 46, 0.7);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Rose Theme - Pink and magenta */
+[data-theme="rose"] {
+ --bg-primary: #2d1b2d;
+ --bg-secondary: #3d2640;
+ --bg-tertiary: #4d3154;
+ --accent-primary: #f48fb1;
+ --accent-secondary: #f06292;
+ --accent-tertiary: #ec407a;
+ --text-primary: #fce4ec;
+ --text-secondary: #f8bbd0;
+ --text-muted: #f48fb1;
+ --border-color: #ad1457;
+ --success-color: #69f0ae;
+ --warning-color: #ffe082;
+ --error-color: #ff5252;
+
+ --bg-primary-rgb: 45, 27, 45;
+ --bg-secondary-rgb: 61, 38, 64;
+ --bg-tertiary-rgb: 77, 49, 84;
+ --accent-primary-rgb: 244, 143, 177;
+ --accent-secondary-rgb: 240, 98, 146;
+ --accent-tertiary-rgb: 236, 64, 122;
+ --text-primary-rgb: 252, 228, 236;
+ --text-secondary-rgb: 248, 187, 208;
+ --text-muted-rgb: 244, 143, 177;
+ --border-color-rgb: 173, 20, 87;
+ --success-color-rgb: 105, 240, 174;
+ --warning-color-rgb: 255, 224, 130;
+ --error-color-rgb: 255, 82, 82;
+
+ --card-shadow: 0 4px 20px rgba(173, 20, 87, 0.3);
+ --glow-effect: 0 0 15px rgba(244, 143, 177, 0.3);
+ --gradient-bg: linear-gradient(135deg, #3d2640 0%, #2d1b2d 100%);
+ --overlay-color: rgba(45, 27, 45, 0.7);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Lavender Theme - Soft purple hues */
+[data-theme="lavender"] {
+ --bg-primary: #1e1e3f;
+ --bg-secondary: #2a2a54;
+ --bg-tertiary: #363669;
+ --accent-primary: #b39ddb;
+ --accent-secondary: #9575cd;
+ --accent-tertiary: #7e57c2;
+ --text-primary: #ede7f6;
+ --text-secondary: #d1c4e9;
+ --text-muted: #b39ddb;
+ --border-color: #7e57c2;
+ --success-color: #69f0ae;
+ --warning-color: #ffe082;
+ --error-color: #ff5252;
+
+ --bg-primary-rgb: 30, 30, 63;
+ --bg-secondary-rgb: 42, 42, 84;
+ --bg-tertiary-rgb: 54, 54, 105;
+ --accent-primary-rgb: 179, 157, 219;
+ --accent-secondary-rgb: 149, 117, 205;
+ --accent-tertiary-rgb: 126, 87, 194;
+ --text-primary-rgb: 237, 231, 246;
+ --text-secondary-rgb: 209, 196, 233;
+ --text-muted-rgb: 179, 157, 219;
+ --border-color-rgb: 126, 87, 194;
+ --success-color-rgb: 105, 240, 174;
+ --warning-color-rgb: 255, 224, 130;
+ --error-color-rgb: 255, 82, 82;
+
+ --card-shadow: 0 4px 20px rgba(126, 87, 194, 0.3);
+ --glow-effect: 0 0 15px rgba(179, 157, 219, 0.3);
+ --gradient-bg: linear-gradient(135deg, #2a2a54 0%, #1e1e3f 100%);
+ --overlay-color: rgba(30, 30, 63, 0.7);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Nord Theme - Arctic blues (Nord palette) */
+[data-theme="nord"] {
+ --bg-primary: #2e3440;
+ --bg-secondary: #3b4252;
+ --bg-tertiary: #434c5e;
+ --accent-primary: #88c0d0;
+ --accent-secondary: #81a1c1;
+ --accent-tertiary: #5e81ac;
+ --text-primary: #eceff4;
+ --text-secondary: #e5e9f0;
+ --text-muted: #d8dee9;
+ --border-color: #4c566a;
+ --success-color: #a3be8c;
+ --warning-color: #ebcb8b;
+ --error-color: #bf616a;
+
+ --bg-primary-rgb: 46, 52, 64;
+ --bg-secondary-rgb: 59, 66, 82;
+ --bg-tertiary-rgb: 67, 76, 94;
+ --accent-primary-rgb: 136, 192, 208;
+ --accent-secondary-rgb: 129, 161, 193;
+ --accent-tertiary-rgb: 94, 129, 172;
+ --text-primary-rgb: 236, 239, 244;
+ --text-secondary-rgb: 229, 233, 240;
+ --text-muted-rgb: 216, 222, 233;
+ --border-color-rgb: 76, 86, 106;
+ --success-color-rgb: 163, 190, 140;
+ --warning-color-rgb: 235, 203, 139;
+ --error-color-rgb: 191, 97, 106;
+
+ --card-shadow: 0 4px 20px rgba(46, 52, 64, 0.5);
+ --glow-effect: 0 0 15px rgba(136, 192, 208, 0.2);
+ --gradient-bg: linear-gradient(135deg, #3b4252 0%, #2e3440 100%);
+ --overlay-color: rgba(46, 52, 64, 0.7);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Dracula Theme - Purple/pink dark */
+[data-theme="dracula"] {
+ --bg-primary: #282a36;
+ --bg-secondary: #343746;
+ --bg-tertiary: #44475a;
+ --accent-primary: #bd93f9;
+ --accent-secondary: #ff79c6;
+ --accent-tertiary: #8be9fd;
+ --text-primary: #f8f8f2;
+ --text-secondary: #e2e2dc;
+ --text-muted: #6272a4;
+ --border-color: #44475a;
+ --success-color: #50fa7b;
+ --warning-color: #f1fa8c;
+ --error-color: #ff5555;
+
+ --bg-primary-rgb: 40, 42, 54;
+ --bg-secondary-rgb: 52, 55, 70;
+ --bg-tertiary-rgb: 68, 71, 90;
+ --accent-primary-rgb: 189, 147, 249;
+ --accent-secondary-rgb: 255, 121, 198;
+ --accent-tertiary-rgb: 139, 233, 253;
+ --text-primary-rgb: 248, 248, 242;
+ --text-secondary-rgb: 226, 226, 220;
+ --text-muted-rgb: 98, 114, 164;
+ --border-color-rgb: 68, 71, 90;
+ --success-color-rgb: 80, 250, 123;
+ --warning-color-rgb: 241, 250, 140;
+ --error-color-rgb: 255, 85, 85;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
+ --glow-effect: 0 0 15px rgba(189, 147, 249, 0.3);
+ --gradient-bg: linear-gradient(135deg, #343746 0%, #282a36 100%);
+ --overlay-color: rgba(40, 42, 54, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Monokai Theme - Vibrant on dark */
+[data-theme="monokai"] {
+ --bg-primary: #272822;
+ --bg-secondary: #3e3d32;
+ --bg-tertiary: #49483e;
+ --accent-primary: #a6e22e;
+ --accent-secondary: #f92672;
+ --accent-tertiary: #66d9ef;
+ --text-primary: #f8f8f2;
+ --text-secondary: #cfcfc2;
+ --text-muted: #75715e;
+ --border-color: #49483e;
+ --success-color: #a6e22e;
+ --warning-color: #e6db74;
+ --error-color: #f92672;
+
+ --bg-primary-rgb: 39, 40, 34;
+ --bg-secondary-rgb: 62, 61, 50;
+ --bg-tertiary-rgb: 73, 72, 62;
+ --accent-primary-rgb: 166, 226, 46;
+ --accent-secondary-rgb: 249, 38, 114;
+ --accent-tertiary-rgb: 102, 217, 239;
+ --text-primary-rgb: 248, 248, 242;
+ --text-secondary-rgb: 207, 207, 194;
+ --text-muted-rgb: 117, 113, 94;
+ --border-color-rgb: 73, 72, 62;
+ --success-color-rgb: 166, 226, 46;
+ --warning-color-rgb: 230, 219, 116;
+ --error-color-rgb: 249, 38, 114;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
+ --glow-effect: 0 0 15px rgba(166, 226, 46, 0.2);
+ --gradient-bg: linear-gradient(135deg, #3e3d32 0%, #272822 100%);
+ --overlay-color: rgba(39, 40, 34, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Solarized Dark Theme */
+[data-theme="solarized-dark"] {
+ --bg-primary: #002b36;
+ --bg-secondary: #073642;
+ --bg-tertiary: #0a4351;
+ --accent-primary: #268bd2;
+ --accent-secondary: #2aa198;
+ --accent-tertiary: #859900;
+ --text-primary: #fdf6e3;
+ --text-secondary: #eee8d5;
+ --text-muted: #93a1a1;
+ --border-color: #586e75;
+ --success-color: #859900;
+ --warning-color: #b58900;
+ --error-color: #dc322f;
+
+ --bg-primary-rgb: 0, 43, 54;
+ --bg-secondary-rgb: 7, 54, 66;
+ --bg-tertiary-rgb: 10, 67, 81;
+ --accent-primary-rgb: 38, 139, 210;
+ --accent-secondary-rgb: 42, 161, 152;
+ --accent-tertiary-rgb: 133, 153, 0;
+ --text-primary-rgb: 253, 246, 227;
+ --text-secondary-rgb: 238, 232, 213;
+ --text-muted-rgb: 147, 161, 161;
+ --border-color-rgb: 88, 110, 117;
+ --success-color-rgb: 133, 153, 0;
+ --warning-color-rgb: 181, 137, 0;
+ --error-color-rgb: 220, 50, 47;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
+ --glow-effect: 0 0 15px rgba(38, 139, 210, 0.2);
+ --gradient-bg: linear-gradient(135deg, #073642 0%, #002b36 100%);
+ --overlay-color: rgba(0, 43, 54, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Solarized Light Theme */
+[data-theme="solarized-light"] {
+ --bg-primary: #fdf6e3;
+ --bg-secondary: #eee8d5;
+ --bg-tertiary: #ddd6c3;
+ --accent-primary: #268bd2;
+ --accent-secondary: #2aa198;
+ --accent-tertiary: #859900;
+ --text-primary: #073642;
+ --text-secondary: #586e75;
+ --text-muted: #93a1a1;
+ --border-color: #93a1a1;
+ --success-color: #859900;
+ --warning-color: #b58900;
+ --error-color: #dc322f;
+
+ --bg-primary-rgb: 253, 246, 227;
+ --bg-secondary-rgb: 238, 232, 213;
+ --bg-tertiary-rgb: 221, 214, 195;
+ --accent-primary-rgb: 38, 139, 210;
+ --accent-secondary-rgb: 42, 161, 152;
+ --accent-tertiary-rgb: 133, 153, 0;
+ --text-primary-rgb: 7, 54, 66;
+ --text-secondary-rgb: 88, 110, 117;
+ --text-muted-rgb: 147, 161, 161;
+ --border-color-rgb: 147, 161, 161;
+ --success-color-rgb: 133, 153, 0;
+ --warning-color-rgb: 181, 137, 0;
+ --error-color-rgb: 220, 50, 47;
+
+ --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
+ --glow-effect: 0 0 10px rgba(38, 139, 210, 0.15);
+ --gradient-bg: linear-gradient(135deg, #eee8d5 0%, #fdf6e3 100%);
+ --overlay-color: rgba(7, 54, 66, 0.3);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Gruvbox Dark Theme */
+[data-theme="gruvbox-dark"] {
+ --bg-primary: #282828;
+ --bg-secondary: #3c3836;
+ --bg-tertiary: #504945;
+ --accent-primary: #fe8019;
+ --accent-secondary: #fabd2f;
+ --accent-tertiary: #83a598;
+ --text-primary: #ebdbb2;
+ --text-secondary: #d5c4a1;
+ --text-muted: #a89984;
+ --border-color: #665c54;
+ --success-color: #b8bb26;
+ --warning-color: #fabd2f;
+ --error-color: #fb4934;
+
+ --bg-primary-rgb: 40, 40, 40;
+ --bg-secondary-rgb: 60, 56, 54;
+ --bg-tertiary-rgb: 80, 73, 69;
+ --accent-primary-rgb: 254, 128, 25;
+ --accent-secondary-rgb: 250, 189, 47;
+ --accent-tertiary-rgb: 131, 165, 152;
+ --text-primary-rgb: 235, 219, 178;
+ --text-secondary-rgb: 213, 196, 161;
+ --text-muted-rgb: 168, 153, 132;
+ --border-color-rgb: 102, 92, 84;
+ --success-color-rgb: 184, 187, 38;
+ --warning-color-rgb: 250, 189, 47;
+ --error-color-rgb: 251, 73, 52;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
+ --glow-effect: 0 0 15px rgba(254, 128, 25, 0.2);
+ --gradient-bg: linear-gradient(135deg, #3c3836 0%, #282828 100%);
+ --overlay-color: rgba(40, 40, 40, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Gruvbox Light Theme */
+[data-theme="gruvbox-light"] {
+ --bg-primary: #fbf1c7;
+ --bg-secondary: #ebdbb2;
+ --bg-tertiary: #d5c4a1;
+ --accent-primary: #d65d0e;
+ --accent-secondary: #af3a03;
+ --accent-tertiary: #427b58;
+ --text-primary: #3c3836;
+ --text-secondary: #504945;
+ --text-muted: #7c6f64;
+ --border-color: #bdae93;
+ --success-color: #79740e;
+ --warning-color: #b57614;
+ --error-color: #9d0006;
+
+ --bg-primary-rgb: 251, 241, 199;
+ --bg-secondary-rgb: 235, 219, 178;
+ --bg-tertiary-rgb: 213, 196, 161;
+ --accent-primary-rgb: 214, 93, 14;
+ --accent-secondary-rgb: 175, 58, 3;
+ --accent-tertiary-rgb: 66, 123, 88;
+ --text-primary-rgb: 60, 56, 54;
+ --text-secondary-rgb: 80, 73, 69;
+ --text-muted-rgb: 124, 111, 100;
+ --border-color-rgb: 189, 174, 147;
+ --success-color-rgb: 121, 116, 14;
+ --warning-color-rgb: 181, 118, 20;
+ --error-color-rgb: 157, 0, 6;
+
+ --card-shadow: 0 2px 12px rgba(60, 56, 54, 0.1);
+ --glow-effect: 0 0 10px rgba(214, 93, 14, 0.15);
+ --gradient-bg: linear-gradient(135deg, #ebdbb2 0%, #fbf1c7 100%);
+ --overlay-color: rgba(60, 56, 54, 0.3);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Tokyo Night Theme - Neon on dark */
+[data-theme="tokyo-night"] {
+ --bg-primary: #1a1b26;
+ --bg-secondary: #24283b;
+ --bg-tertiary: #343b58;
+ --accent-primary: #7aa2f7;
+ --accent-secondary: #bb9af7;
+ --accent-tertiary: #7dcfff;
+ --text-primary: #c0caf5;
+ --text-secondary: #a9b1d6;
+ --text-muted: #565f89;
+ --border-color: #414868;
+ --success-color: #9ece6a;
+ --warning-color: #e0af68;
+ --error-color: #f7768e;
+
+ --bg-primary-rgb: 26, 27, 38;
+ --bg-secondary-rgb: 36, 40, 59;
+ --bg-tertiary-rgb: 52, 59, 88;
+ --accent-primary-rgb: 122, 162, 247;
+ --accent-secondary-rgb: 187, 154, 247;
+ --accent-tertiary-rgb: 125, 207, 255;
+ --text-primary-rgb: 192, 202, 245;
+ --text-secondary-rgb: 169, 177, 214;
+ --text-muted-rgb: 86, 95, 137;
+ --border-color-rgb: 65, 72, 104;
+ --success-color-rgb: 158, 206, 106;
+ --warning-color-rgb: 224, 175, 104;
+ --error-color-rgb: 247, 118, 142;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
+ --glow-effect: 0 0 15px rgba(122, 162, 247, 0.3);
+ --gradient-bg: linear-gradient(135deg, #24283b 0%, #1a1b26 100%);
+ --overlay-color: rgba(26, 27, 38, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* Catppuccin Mocha Theme - Pastel dark */
+[data-theme="catppuccin"] {
+ --bg-primary: #1e1e2e;
+ --bg-secondary: #313244;
+ --bg-tertiary: #45475a;
+ --accent-primary: #cba6f7;
+ --accent-secondary: #f5c2e7;
+ --accent-tertiary: #89dceb;
+ --text-primary: #cdd6f4;
+ --text-secondary: #bac2de;
+ --text-muted: #6c7086;
+ --border-color: #585b70;
+ --success-color: #a6e3a1;
+ --warning-color: #f9e2af;
+ --error-color: #f38ba8;
+
+ --bg-primary-rgb: 30, 30, 46;
+ --bg-secondary-rgb: 49, 50, 68;
+ --bg-tertiary-rgb: 69, 71, 90;
+ --accent-primary-rgb: 203, 166, 247;
+ --accent-secondary-rgb: 245, 194, 231;
+ --accent-tertiary-rgb: 137, 220, 235;
+ --text-primary-rgb: 205, 214, 244;
+ --text-secondary-rgb: 186, 194, 222;
+ --text-muted-rgb: 108, 112, 134;
+ --border-color-rgb: 88, 91, 112;
+ --success-color-rgb: 166, 227, 161;
+ --warning-color-rgb: 249, 226, 175;
+ --error-color-rgb: 243, 139, 168;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
+ --glow-effect: 0 0 15px rgba(203, 166, 247, 0.2);
+ --gradient-bg: linear-gradient(135deg, #313244 0%, #1e1e2e 100%);
+ --overlay-color: rgba(30, 30, 46, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
+/* One Dark Theme - Atom inspired */
+[data-theme="one-dark"] {
+ --bg-primary: #21252b;
+ --bg-secondary: #282c34;
+ --bg-tertiary: #353b45;
+ --accent-primary: #61afef;
+ --accent-secondary: #c678dd;
+ --accent-tertiary: #56b6c2;
+ --text-primary: #abb2bf;
+ --text-secondary: #9da5b4;
+ --text-muted: #5c6370;
+ --border-color: #3e4451;
+ --success-color: #98c379;
+ --warning-color: #e5c07b;
+ --error-color: #e06c75;
+
+ --bg-primary-rgb: 33, 37, 43;
+ --bg-secondary-rgb: 40, 44, 52;
+ --bg-tertiary-rgb: 53, 59, 69;
+ --accent-primary-rgb: 97, 175, 239;
+ --accent-secondary-rgb: 198, 120, 221;
+ --accent-tertiary-rgb: 86, 182, 194;
+ --text-primary-rgb: 171, 178, 191;
+ --text-secondary-rgb: 157, 165, 180;
+ --text-muted-rgb: 92, 99, 112;
+ --border-color-rgb: 62, 68, 81;
+ --success-color-rgb: 152, 195, 121;
+ --warning-color-rgb: 229, 192, 123;
+ --error-color-rgb: 224, 108, 117;
+
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
+ --glow-effect: 0 0 15px rgba(97, 175, 239, 0.2);
+ --gradient-bg: linear-gradient(135deg, #282c34 0%, #21252b 100%);
+ --overlay-color: rgba(33, 37, 43, 0.8);
+ --backdrop-blur: blur(10px);
+ --primary-color: var(--accent-primary);
+ --card-bg: var(--bg-secondary);
+}
+
/* ====================================
THEME-SPECIFIC ADJUSTMENTS
==================================== */
diff --git a/src/local_deep_research/web/static/js/collection_details.js b/src/local_deep_research/web/static/js/collection_details.js
index 6deedecdca..5eb6ad318e 100644
--- a/src/local_deep_research/web/static/js/collection_details.js
+++ b/src/local_deep_research/web/static/js/collection_details.js
@@ -212,9 +212,9 @@ function renderDocuments() {
<div class="ldr-document-info">
<div class="ldr-document-title">
${escapeHtml(doc.filename)}
- ${doc.has_pdf ? '<i class="fas fa-file-pdf" style="color: #dc3545; margin-left: 8px;" title="PDF stored"></i>' : ''}
- ${doc.has_text_db ? '<i class="fas fa-file-alt" style="color: #28a745; margin-left: 8px;" title="Text content available"></i>' : ''}
- ${doc.in_other_collections ? `<i class="fas fa-link" style="color: #667eea; margin-left: 8px;" title="In ${doc.other_collections_count + 1} collections"></i>` : ''}
+ ${doc.has_pdf ? '<i class="fas fa-file-pdf" style="color: var(--error-color); margin-left: 8px;" title="PDF stored"></i>' : ''}
+ ${doc.has_text_db ? '<i class="fas fa-file-alt" style="color: var(--success-color); margin-left: 8px;" title="Text content available"></i>' : ''}
+ ${doc.in_other_collections ? `<i class="fas fa-link" style="color: var(--accent-primary); margin-left: 8px;" title="In ${doc.other_collections_count + 1} collections"></i>` : ''}
</div>
<div class="ldr-document-meta">
${doc.file_size ? `Size: ${formatBytes(doc.file_size)} • ` : ''}
diff --git a/src/local_deep_research/web/static/js/components/detail.js b/src/local_deep_research/web/static/js/components/detail.js
index 1bc1e8c082..31d14d3d59 100644
--- a/src/local_deep_research/web/static/js/components/detail.js
+++ b/src/local_deep_research/web/static/js/components/detail.js
@@ -4,6 +4,32 @@
* Manages the display of research details and token metrics for a specific research
*/
(function() {
+ /**
+ * Get chart colors from CSS variables for theme support
+ */
+ function getChartColors() {
+ const style = getComputedStyle(document.documentElement);
+ return {
+ // Primary accent (for total/main data)
+ accent: style.getPropertyValue('--accent-primary').trim() || '#6e4ff6',
+ accentRgb: style.getPropertyValue('--accent-primary-rgb').trim() || '110, 79, 246',
+ // Tertiary accent (for input tokens)
+ tertiary: style.getPropertyValue('--accent-tertiary').trim() || '#40bfff',
+ tertiaryRgb: style.getPropertyValue('--accent-tertiary-rgb').trim() || '64, 191, 255',
+ // Error color (for output tokens)
+ error: style.getPropertyValue('--error-color').trim() || '#fa5c7c',
+ errorRgb: style.getPropertyValue('--error-color-rgb').trim() || '250, 92, 124',
+ // Success color
+ success: style.getPropertyValue('--success-color').trim() || '#0acf97',
+ successRgb: style.getPropertyValue('--success-color-rgb').trim() || '10, 207, 151',
+ // Text colors
+ textPrimary: style.getPropertyValue('--text-primary').trim() || '#f5f5f5',
+ textMuted: style.getPropertyValue('--text-muted').trim() || '#8a8aa0',
+ // Background
+ bgPrimary: style.getPropertyValue('--bg-primary').trim() || '#121212',
+ };
+ }
+
// DOM Elements
let queryElement = null;
let statusElement = null;
@@ -457,6 +483,9 @@
timelineChart.destroy();
}
+ // Get theme-aware colors
+ const colors = getChartColors();
+
timelineChart = new Chart(ctx, {
type: 'line',
data: {
@@ -464,8 +493,8 @@
datasets: [{
label: 'Cumulative Total Tokens',
data: cumulativeTokens,
- borderColor: 'rgba(75, 192, 192, 1)',
- backgroundColor: 'rgba(75, 192, 192, 0.1)',
+ borderColor: colors.success,
+ backgroundColor: `rgba(${colors.successRgb}, 0.1)`,
borderWidth: 3,
fill: true,
tension: 0.1,
@@ -474,8 +503,8 @@
}, {
label: 'Cumulative Input Tokens',
data: cumulativePromptTokens,
- borderColor: 'rgba(54, 162, 235, 1)',
- backgroundColor: 'rgba(54, 162, 235, 0.05)',
+ borderColor: colors.tertiary,
+ backgroundColor: `rgba(${colors.tertiaryRgb}, 0.05)`,
borderWidth: 2,
fill: true,
tension: 0.1,
@@ -484,8 +513,8 @@
}, {
label: 'Cumulative Output Tokens',
data: cumulativeCompletionTokens,
- borderColor: 'rgba(255, 99, 132, 1)',
- backgroundColor: 'rgba(255, 99, 132, 0.05)',
+ borderColor: colors.error,
+ backgroundColor: `rgba(${colors.errorRgb}, 0.05)`,
borderWidth: 2,
fill: true,
tension: 0.1,
@@ -494,8 +523,8 @@
}, {
label: 'Input Tokens per Call',
data: promptTokens,
- borderColor: 'rgba(54, 162, 235, 0.8)',
- backgroundColor: 'rgba(54, 162, 235, 0.1)',
+ borderColor: `rgba(${colors.tertiaryRgb}, 0.8)`,
+ backgroundColor: `rgba(${colors.tertiaryRgb}, 0.1)`,
borderWidth: 1,
fill: false,
tension: 0.1,
@@ -506,8 +535,8 @@
}, {
label: 'Output Tokens per Call',
data: completionTokens,
- borderColor: 'rgba(255, 99, 132, 0.8)',
- backgroundColor: 'rgba(255, 99, 132, 0.1)',
+ borderColor: `rgba(${colors.errorRgb}, 0.8)`,
+ backgroundColor: `rgba(${colors.errorRgb}, 0.1)`,
borderWidth: 1,
fill: false,
tension: 0.1,
diff --git a/src/local_deep_research/web/static/js/components/details.js b/src/local_deep_research/web/static/js/components/details.js
index 878b007aea..a1a200e73f 100644
--- a/src/local_deep_research/web/static/js/components/details.js
+++ b/src/local_deep_research/web/static/js/components/details.js
@@ -11,6 +11,26 @@
let timelineChart = null;
let searchChart = null;
+ /**
+ * Get chart colors from CSS variables for theme support
+ */
+ function getChartColors() {
+ const style = getComputedStyle(document.documentElement);
+ return {
+ // Primary accent
+ accent: style.getPropertyValue('--accent-primary').trim() || '#6e4ff6',
+ accentRgb: style.getPropertyValue('--accent-primary-rgb').trim() || '110, 79, 246',
+ // Success color
+ success: style.getPropertyValue('--success-color').trim() || '#0acf97',
+ successRgb: style.getPropertyValue('--success-color-rgb').trim() || '10, 207, 151',
+ // Text colors
+ textPrimary: style.getPropertyValue('--text-primary').trim() || '#f5f5f5',
+ textMuted: style.getPropertyValue('--text-muted').trim() || '#8a8aa0',
+ // Background
+ bgPrimary: style.getPropertyValue('--bg-primary').trim() || '#121212',
+ };
+ }
+
// Format large numbers with commas
function formatNumber(num) {
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@ -626,6 +646,9 @@
console.log('Enhanced chart data:', chartData);
+ // Get theme-aware colors
+ const colors = getChartColors();
+
timelineChart = new Chart(ctx, {
type: 'bar',
data: {
@@ -634,8 +657,8 @@
{
label: 'Input Tokens',
data: promptTokens,
- backgroundColor: 'rgba(99, 102, 241, 0.8)',
- borderColor: 'rgba(99, 102, 241, 1)',
+ backgroundColor: `rgba(${colors.accentRgb}, 0.8)`,
+ borderColor: colors.accent,
borderWidth: 1,
borderRadius: 4,
borderSkipped: false,
@@ -643,8 +666,8 @@
{
label: 'Output Tokens',
data: completionTokens,
- backgroundColor: 'rgba(34, 197, 94, 0.8)',
- borderColor: 'rgba(34, 197, 94, 1)',
+ backgroundColor: `rgba(${colors.successRgb}, 0.8)`,
+ borderColor: colors.success,
borderWidth: 1,
borderRadius: 4,
borderSkipped: false,
@@ -982,9 +1005,9 @@
// Update truncation status
const truncationStatus = document.getElementById('co-truncation-status');
if (overview.truncation_occurred) {
- truncationStatus.innerHTML = `<span style="color: #ff4444;">Yes (${overview.truncated_count} requests)</span>`;
+ truncationStatus.innerHTML = `<span style="color: var(--error-color);">Yes (${overview.truncated_count} requests)</span>`;
} else {
- truncationStatus.innerHTML = '<span style="color: #4CAF50;">No truncation</span>';
+ truncationStatus.innerHTML = '<span style="color: var(--success-color);">No truncation</span>';
}
// Display phase breakdown
diff --git a/src/local_deep_research/web/static/js/components/progress.js b/src/local_deep_research/web/static/js/components/progress.js
index da9a1a1d51..498dbb2a1c 100644
--- a/src/local_deep_research/web/static/js/components/progress.js
+++ b/src/local_deep_research/web/static/js/components/progress.js
@@ -1063,8 +1063,16 @@
const ctx = canvas.getContext('2d');
+ // Get theme colors from CSS variables
+ const style = getComputedStyle(document.documentElement);
+ const bgColor = style.getPropertyValue('--bg-tertiary').trim() || '#343a40';
+ const errorColor = style.getPropertyValue('--error-color').trim() || '#dc3545';
+ const successColor = style.getPropertyValue('--success-color').trim() || '#28a745';
+ const accentColor = style.getPropertyValue('--accent-primary').trim() || '#007bff';
+ const textColor = style.getPropertyValue('--text-primary').trim() || '#ffffff';
+
// Draw background
- ctx.fillStyle = '#343a40'; // Dark background
+ ctx.fillStyle = bgColor;
ctx.beginPath();
ctx.arc(16, 16, 16, 0, 2 * Math.PI);
ctx.fill();
@@ -1077,23 +1085,23 @@
// Color based on status
if (isError) {
- ctx.fillStyle = '#dc3545'; // Danger red
+ ctx.fillStyle = errorColor;
} else if (progress >= 100) {
- ctx.fillStyle = '#28a745'; // Success green
+ ctx.fillStyle = successColor;
} else {
- ctx.fillStyle = '#007bff'; // Primary blue
+ ctx.fillStyle = accentColor;
}
ctx.fill();
// Draw center circle
- ctx.fillStyle = '#343a40';
+ ctx.fillStyle = bgColor;
ctx.beginPath();
ctx.arc(16, 16, 8, 0, 2 * Math.PI);
ctx.fill();
// Draw letter R
- ctx.fillStyle = '#ffffff';
+ ctx.fillStyle = textColor;
ctx.font = 'bold 14px Arial';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
diff --git a/src/local_deep_research/web/static/js/components/settings_sync.js b/src/local_deep_research/web/static/js/components/settings_sync.js
index 71cf2913cb..5696a3e64a 100644
--- a/src/local_deep_research/web/static/js/components/settings_sync.js
+++ b/src/local_deep_research/web/static/js/components/settings_sync.js
@@ -171,6 +171,13 @@ function connectMenuSettings() {
// Call this function after the page and other scripts are loaded
document.addEventListener('DOMContentLoaded', function() {
- // Wait a bit to ensure other scripts have loaded
- setTimeout(connectMenuSettings, 1000);
+ // Use requestIdleCallback for better performance, fallback to requestAnimationFrame
+ if (typeof requestIdleCallback === 'function') {
+ requestIdleCallback(connectMenuSettings, { timeout: 500 });
+ } else if (typeof requestAnimationFrame === 'function') {
+ requestAnimationFrame(connectMenuSettings);
+ } else {
+ // Fallback for older browsers
+ setTimeout(connectMenuSettings, 100);
+ }
});
diff --git a/src/local_deep_research/web/static/js/pdf_upload_handler.js b/src/local_deep_research/web/static/js/pdf_upload_handler.js
index 20c70736a7..f25487c782 100644
--- a/src/local_deep_research/web/static/js/pdf_upload_handler.js
+++ b/src/local_deep_research/web/static/js/pdf_upload_handler.js
@@ -189,7 +189,7 @@ class PDFUploadHandler {
*/
highlight() {
if (!this.isDragOver) {
- this.queryTextarea.style.backgroundColor = 'rgba(110, 79, 246, 0.1)';
+ this.queryTextarea.style.backgroundColor = 'rgba(var(--accent-primary-rgb), 0.1)';
this.queryTextarea.style.border = '2px dashed var(--accent-primary, #6e4ff6)';
this.queryTextarea.style.transition = 'all 0.2s ease';
this.isDragOver = true;
diff --git a/src/local_deep_research/web/static/js/services/theme.js b/src/local_deep_research/web/static/js/services/theme.js
index b2fb145327..9dcec69e37 100644
--- a/src/local_deep_research/web/static/js/services/theme.js
+++ b/src/local_deep_research/web/static/js/services/theme.js
@@ -20,16 +20,38 @@
// Available themes (must match CSS definitions in themes.css)
const THEMES = {
- 'dark': { label: 'Dark', icon: 'fa-moon' },
- 'light': { label: 'Light', icon: 'fa-sun' },
- 'sepia': { label: 'Sepia', icon: 'fa-book-open' },
- 'high-contrast': { label: 'High Contrast', icon: 'fa-eye' },
- 'midnight': { label: 'Midnight', icon: 'fa-cloud-moon' },
- 'system': { label: 'System', icon: 'fa-desktop' }
+ // Core themes
+ 'dark': { label: 'Dark', icon: 'fa-moon', group: 'core' },
+ 'light': { label: 'Light', icon: 'fa-sun', group: 'core' },
+ 'sepia': { label: 'Sepia', icon: 'fa-book-open', group: 'core' },
+ 'high-contrast': { label: 'High Contrast', icon: 'fa-eye', group: 'core' },
+ 'midnight': { label: 'Midnight', icon: 'fa-cloud-moon', group: 'core' },
+ // Nature themes
+ 'ocean': { label: 'Ocean', icon: 'fa-water', group: 'nature' },
+ 'forest': { label: 'Forest', icon: 'fa-tree', group: 'nature' },
+ 'sunset': { label: 'Sunset', icon: 'fa-sun', group: 'nature' },
+ 'rose': { label: 'Rose', icon: 'fa-heart', group: 'nature' },
+ 'lavender': { label: 'Lavender', icon: 'fa-spa', group: 'nature' },
+ // Popular developer themes
+ 'nord': { label: 'Nord', icon: 'fa-snowflake', group: 'dev' },
+ 'dracula': { label: 'Dracula', icon: 'fa-ghost', group: 'dev' },
+ 'monokai': { label: 'Monokai', icon: 'fa-code', group: 'dev' },
+ 'solarized-dark': { label: 'Solarized Dark', icon: 'fa-adjust', group: 'dev' },
+ 'solarized-light': { label: 'Solarized Light', icon: 'fa-circle', group: 'dev' },
+ 'gruvbox-dark': { label: 'Gruvbox Dark', icon: 'fa-square', group: 'dev' },
+ 'gruvbox-light': { label: 'Gruvbox Light', icon: 'fa-square-full', group: 'dev' },
+ 'tokyo-night': { label: 'Tokyo Night', icon: 'fa-city', group: 'dev' },
+ 'catppuccin': { label: 'Catppuccin', icon: 'fa-cat', group: 'dev' },
+ 'one-dark': { label: 'One Dark', icon: 'fa-atom', group: 'dev' },
+ // System
+ 'system': { label: 'System', icon: 'fa-desktop', group: 'system' }
};
- // Theme cycle order for quick toggle button
- const THEME_CYCLE = ['dark', 'light', 'sepia'];
+ // Valid theme names for validation
+ const VALID_THEMES = Object.keys(THEMES);
+
+ // Theme cycle order for quick toggle button (subset of popular themes)
+ const THEME_CYCLE = ['dark', 'light', 'nord', 'dracula'];
/**
* Get user ID from page context (if available)
@@ -155,9 +177,9 @@
* Set theme with both local and server sync
*/
function setTheme(theme, syncToServer = true) {
- // Validate theme
- if (!THEMES[theme]) {
- console.warn('Invalid theme:', theme);
+ // Validate theme using VALID_THEMES array
+ if (!VALID_THEMES.includes(theme)) {
+ console.warn('Invalid theme:', theme, '- falling back to dark');
theme = 'dark';
}
@@ -168,6 +190,77 @@
}
}
+ /**
+ * Populate a dropdown with all available themes
+ */
+ function populateThemeDropdown(selectElement) {
+ if (!selectElement) return;
+
+ // Clear existing options
+ selectElement.innerHTML = '';
+
+ // Group themes
+ const groups = {
+ 'core': 'Core Themes',
+ 'nature': 'Nature',
+ 'dev': 'Developer Themes',
+ 'system': 'System'
+ };
+
+ // Create optgroups
+ Object.entries(groups).forEach(([groupKey, groupLabel]) => {
+ const themesInGroup = Object.entries(THEMES).filter(([_, t]) => t.group === groupKey);
+ if (themesInGroup.length > 0) {
+ const optgroup = document.createElement('optgroup');
+ optgroup.label = groupLabel;
+
+ themesInGroup.forEach(([value, theme]) => {
+ const option = document.createElement('option');
+ option.value = value;
+ option.textContent = theme.label;
+ optgroup.appendChild(option);
+ });
+
+ selectElement.appendChild(optgroup);
+ }
+ });
+
+ // Set current value
+ selectElement.value = getCurrentTheme();
+ }
+
+ /**
+ * Set up the header theme dropdown
+ */
+ function setupHeaderDropdown() {
+ const dropdown = document.getElementById('theme-dropdown');
+ if (!dropdown) return;
+
+ // Populate dropdown (always repopulate to ensure it has options)
+ populateThemeDropdown(dropdown);
+
+ // Only add event listeners if not already added (prevent duplicates)
+ if (!dropdown.dataset.themeInitialized) {
+ dropdown.dataset.themeInitialized = 'true';
+
+ // Handle change
+ dropdown.addEventListener('change', (e) => {
+ setTheme(e.target.value, true);
+ });
+
+ // Update dropdown when theme changes elsewhere
+ window.addEventListener('themechange', (e) => {
+ const currentDropdown = document.getElementById('theme-dropdown');
+ if (currentDropdown && currentDropdown.value !== e.detail.theme) {
+ currentDropdown.value = e.detail.theme;
+ }
+ });
+ }
+
+ // Always ensure current value is set
+ dropdown.value = getCurrentTheme();
+ }
+
/**
* Cycle to next theme (for quick toggle button)
*/
@@ -177,11 +270,12 @@
// If current theme is not in cycle (e.g., high-contrast), start from beginning
if (currentIndex === -1) {
- currentIndex = -1;
+ currentIndex = 0;
+ } else {
+ currentIndex = (currentIndex + 1) % THEME_CYCLE.length;
}
- const nextIndex = (currentIndex + 1) % THEME_CYCLE.length;
- const nextTheme = THEME_CYCLE[nextIndex];
+ const nextTheme = THEME_CYCLE[currentIndex];
setTheme(nextTheme);
return nextTheme;
}
@@ -258,41 +352,49 @@
* Initialize theme on page load
*/
function initializeTheme() {
- // Apply stored theme immediately (FOUC should already be handled in head)
+ // Get stored theme - FOUC prevention script in <head> already applied it
const storedTheme = getCurrentTheme();
- applyTheme(storedTheme);
+
+ // Validate stored theme (in case localStorage was corrupted)
+ const validatedTheme = VALID_THEMES.includes(storedTheme) ? storedTheme : 'dark';
+ if (validatedTheme !== storedTheme) {
+ console.warn('Invalid stored theme, resetting to dark');
+ applyTheme(validatedTheme);
+ }
// Try to load from server and sync (for logged-in users)
+ // Only update if server theme is valid AND different
loadThemeFromServer().then(serverTheme => {
- if (serverTheme && serverTheme !== storedTheme) {
+ if (serverTheme && VALID_THEMES.includes(serverTheme) && serverTheme !== getCurrentTheme()) {
console.log('Server has different theme, syncing:', serverTheme);
applyTheme(serverTheme);
- // Update localStorage with server value
- const storageKey = getStorageKey();
- localStorage.setItem(storageKey, serverTheme);
}
});
// Set up system preference listener
setupSystemThemeListener();
- // Set up quick toggle button
+ // Set up header theme dropdown (new)
+ setupHeaderDropdown();
+
+ // Set up quick toggle button (legacy, kept for compatibility)
const quickToggle = document.getElementById('theme-toggle');
if (quickToggle) {
quickToggle.addEventListener('click', (e) => {
e.preventDefault();
cycleTheme();
});
- updateThemeToggles(storedTheme, getEffectiveTheme(storedTheme));
+ updateThemeToggles(validatedTheme, getEffectiveTheme(validatedTheme));
}
- console.log('Theme service initialized');
+ console.log('Theme service initialized with', Object.keys(THEMES).length, 'themes');
}
// Expose API globally
window.themeService = {
THEMES,
THEME_CYCLE,
+ VALID_THEMES,
getCurrentTheme,
getEffectiveTheme,
setTheme,
@@ -302,7 +404,9 @@
clearTheme,
clearAllThemes,
initializeTheme,
- applyTheme
+ applyTheme,
+ populateThemeDropdown,
+ setupHeaderDropdown
};
// Initialize when DOM is ready
@@ -312,4 +416,25 @@
// DOM already loaded, initialize immediately
initializeTheme();
}
+
+ // Handle back-forward cache (bfcache) - reinitialize dropdown when page is restored
+ window.addEventListener('pageshow', function(event) {
+ if (event.persisted) {
+ // Page was restored from bfcache, reinitialize dropdown
+ console.log('Page restored from bfcache, reinitializing theme dropdown');
+ setupHeaderDropdown();
+ }
+ });
+
+ // Also handle visibilitychange for tab switching
+ document.addEventListener('visibilitychange', function() {
+ if (document.visibilityState === 'visible') {
+ // Ensure dropdown is populated when tab becomes visible
+ const dropdown = document.getElementById('theme-dropdown');
+ if (dropdown && dropdown.options.length === 0) {
+ console.log('Theme dropdown was empty, repopulating');
+ setupHeaderDropdown();
+ }
+ }
+ });
})();
diff --git a/src/local_deep_research/web/static/js/services/ui.js b/src/local_deep_research/web/static/js/services/ui.js
index 6f5bbb0658..efbab6ada2 100644
--- a/src/local_deep_research/web/static/js/services/ui.js
+++ b/src/local_deep_research/web/static/js/services/ui.js
@@ -330,15 +330,23 @@ function updateFavicon(status) {
canvas.height = 32;
const ctx = canvas.getContext('2d');
+ // Get theme colors from CSS variables
+ const style = getComputedStyle(document.documentElement);
+ const successColor = style.getPropertyValue('--success-color').trim() || '#28a745';
+ const errorColor = style.getPropertyValue('--error-color').trim() || '#dc3545';
+ const mutedColor = style.getPropertyValue('--text-muted').trim() || '#6c757d';
+ const accentColor = style.getPropertyValue('--accent-primary').trim() || '#007bff';
+ const bgPrimary = style.getPropertyValue('--bg-primary').trim() || '#ffffff';
+
// Background color based on status
- let bgColor = '#007bff'; // Default blue
+ let bgColor = accentColor; // Default accent
if (status === 'completed') {
- bgColor = '#28a745'; // Success green
+ bgColor = successColor;
} else if (status === 'failed' || status === 'error') {
- bgColor = '#dc3545'; // Error red
+ bgColor = errorColor;
} else if (status === 'cancelled') {
- bgColor = '#6c757d'; // Gray
+ bgColor = mutedColor;
}
// Draw circle background
@@ -348,7 +356,7 @@ function updateFavicon(status) {
ctx.fill();
// Draw inner circle
- ctx.fillStyle = '#ffffff';
+ ctx.fillStyle = bgPrimary;
ctx.beginPath();
ctx.arc(16, 16, 10, 0, 2 * Math.PI);
ctx.fill();
diff --git a/src/local_deep_research/web/templates/base.html b/src/local_deep_research/web/templates/base.html
index 77a8e27e89..c2fbca4c40 100644
--- a/src/local_deep_research/web/templates/base.html
+++ b/src/local_deep_research/web/templates/base.html
@@ -4,15 +4,21 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
+ <meta name="user-id" content="{{ session.username|default('anonymous', true) }}">
<title>{% block title %}Deep Research System{% endblock %}</title>
<link rel="icon" type="image/png" href="/static/favicon.png">
<!-- FOUC Prevention: Apply theme before any rendering -->
<script>
(function() {
+ var validThemes = ['dark','light','sepia','high-contrast','midnight','ocean','forest','sunset','rose','lavender','nord','dracula','monokai','solarized-dark','solarized-light','gruvbox-dark','gruvbox-light','tokyo-night','catppuccin','one-dark','system'];
var userId = '{{ session.username|default("anonymous", true) }}';
var storageKey = 'ldr-theme-' + userId;
var theme = localStorage.getItem(storageKey) || 'dark';
+ // Validate theme
+ if (validThemes.indexOf(theme) === -1) {
+ theme = 'dark';
+ }
var effectiveTheme = theme;
if (theme === 'system') {
effectiveTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
@@ -27,15 +33,15 @@
<!-- Load all vendor dependencies and styles through Vite -->
{{ vite_asset('js/app.js') }}
- <!-- Theme definitions must load before main styles -->
- <link rel="stylesheet" href="/static/css/themes.css">
-
<!-- Keep local styles that aren't in npm packages -->
<link rel="stylesheet" href="/static/css/styles.css">
<link rel="stylesheet" href="/static/css/help-system.css">
<link rel="stylesheet" href="/static/css/mobile-navigation.css">
<link rel="stylesheet" href="/static/css/mobile-responsive.css">
+ <!-- Theme overrides must load AFTER base styles to take precedence -->
+ <link rel="stylesheet" href="/static/css/themes.css">
+
<!-- Force hide sidebar on mobile with inline CSS for highest priority -->
<style>
@media (max-width: 767px) {
@@ -76,11 +82,14 @@
{% if session.username %}
<div class="ldr-top-bar">
<div class="ldr-top-bar-left">
- <!-- Theme quick toggle -->
- <button type="button" id="theme-toggle" class="ldr-theme-toggle"
- title="Toggle theme" aria-label="Toggle color theme">
- <i class="fas fa-moon"></i>
- </button>
+ <!-- Theme dropdown selector -->
+ <div class="ldr-theme-selector">
+ <i class="fas fa-palette ldr-theme-icon"></i>
+ <select id="theme-dropdown" class="ldr-theme-dropdown"
+ title="Select theme" aria-label="Select color theme">
+ <!-- Options populated by theme.js -->
+ </select>
+ </div>
</div>
<div class="ldr-top-bar-right">
<div class="ldr-user-menu">
diff --git a/src/local_deep_research/web/templates/pages/news.html b/src/local_deep_research/web/templates/pages/news.html
index a63355a3b9..b9b0ee358d 100644
--- a/src/local_deep_research/web/templates/pages/news.html
+++ b/src/local_deep_research/web/templates/pages/news.html
@@ -10,28 +10,18 @@
<link rel="stylesheet" href="/static/css/news.css">
<link rel="stylesheet" href="/static/css/news-enhanced.css">
<style>
- /* Override Bootstrap defaults to ensure dark theme */
- body {
- background-color: #121212 !important;
- color: #f5f5f5 !important;
- }
- .ldr-main-content {
- background-color: #121212 !important;
- }
-
/* Define the button styles */
.ldr-filter-btn {
background-color: var(--accent-tertiary);
- color: white; /* White text color */
- padding: 5px 10px; /* Padding inside the button */
- border: none; /* Remove borders */
- border-radius: 5px; /* Rounded corners */
- cursor: pointer; /* Change cursor to a pointer on hover */
+ color: var(--bg-primary);
+ padding: 5px 10px;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
}
- /* Add some styles for when the user hovers over the button */
.ldr-filter-btn:hover {
- background-color: #87ceeb;
+ filter: brightness(1.15);
}
</style>
{% endblock %}
diff --git a/src/local_deep_research/web/templates/pages/subscriptions.html b/src/local_deep_research/web/templates/pages/subscriptions.html
index 1ca610afae..e22311c1ca 100644
--- a/src/local_deep_research/web/templates/pages/subscriptions.html
+++ b/src/local_deep_research/web/templates/pages/subscriptions.html
@@ -7,41 +7,34 @@
{% block extra_head %}
<link rel="stylesheet" href="/static/css/subscriptions.css">
<style>
- /* Override Bootstrap defaults to ensure dark theme */
- body {
- background-color: #121212 !important;
- color: #f5f5f5 !important;
- }
- .ldr-main-content {
- background-color: #121212 !important;
- }
+ /* Theme-aware modal and form styles */
.modal-content {
- background-color: #1e1e2d !important;
- color: #f5f5f5 !important;
+ background-color: var(--bg-secondary);
+ color: var(--text-primary);
}
.ldr-form-control, .form-select {
- background-color: #2a2a3a !important;
- border-color: #343452 !important;
- color: #f5f5f5 !important;
+ background-color: var(--bg-tertiary);
+ border-color: var(--border-color);
+ color: var(--text-primary);
}
.ldr-form-control:focus, .form-select:focus {
- background-color: #2a2a3a !important;
- border-color: #6e4ff6 !important;
- color: #f5f5f5 !important;
- box-shadow: 0 0 0 0.2rem rgba(110, 79, 246, 0.25) !important;
+ background-color: var(--bg-tertiary);
+ border-color: var(--accent-primary);
+ color: var(--text-primary);
+ box-shadow: 0 0 0 0.2rem rgba(var(--accent-primary-rgb), 0.25);
}
.btn-secondary {
- background-color: #2a2a3a !important;
- border-color: #343452 !important;
+ background-color: var(--bg-tertiary);
+ border-color: var(--border-color);
}
.btn-secondary:hover {
- background-color: #343452 !important;
- border-color: #343452 !important;
+ background-color: var(--border-color);
+ border-color: var(--border-color);
}
.alert {
- background-color: #2a2a3a !important;
- border-color: #343452 !important;
- color: #f5f5f5 !important;
+ background-color: var(--bg-tertiary);
+ border-color: var(--border-color);
+ color: var(--text-primary);
}
</style>
{% endblock %}