@@ -313,20 +401,21 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
}
.tooltip-content {
- background: #24283b;
- border: 2px solid #a9b1d6;
+ background: var(--tooltip-bg);
+ border: 2px solid var(--tooltip-border);
border-radius: 8px;
padding: 16px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
font-size: 13px;
- color: #e0e0e0;
+ color: var(--text-primary);
text-align: left;
+ transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.tooltip-header {
font-weight: bold;
font-size: 14px;
- color: #d0d0d0;
+ color: var(--text-primary);
margin-bottom: 8px;
white-space: normal;
word-wrap: break-word;
@@ -334,7 +423,7 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
.tooltip-dealer {
font-size: 12px;
- color: #c0c0c0;
+ color: var(--text-secondary);
margin-bottom: 8px;
}
@@ -343,6 +432,7 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
gap: 12px;
margin-bottom: 8px;
font-size: 12px;
+ color: var(--text-secondary);
}
.stat-item {
@@ -358,34 +448,57 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
.tooltip-description {
margin-bottom: 8px;
padding: 8px;
- background: rgba(160, 160, 160, 0.1);
- border-left: 2px solid #a9b1d6;
+ background: var(--bg-secondary);
+ border-left: 2px solid var(--tooltip-border);
border-radius: 2px;
font-size: 12px;
white-space: normal;
word-wrap: break-word;
max-height: 60px;
overflow-y: auto;
+ color: var(--text-primary);
}
.tooltip-first-post {
margin-bottom: 8px;
padding: 8px;
- background: rgba(160, 160, 160, 0.1);
- border-left: 2px solid #a9b1d6;
+ background: var(--bg-secondary);
+ border-left: 2px solid var(--tooltip-border);
border-radius: 2px;
font-size: 12px;
white-space: normal;
word-wrap: break-word;
max-height: 60px;
overflow-y: auto;
+ color: var(--text-primary);
}
.tooltip-times {
font-size: 11px;
- color: #b0b0b0;
- border-top: 1px solid #555555;
+ color: var(--text-secondary);
+ border-top: 1px solid var(--border-color);
padding-top: 8px;
margin-top: 8px;
}
+
+/* Filter input styling */
+:deep(.v-text-field) {
+ --v-field-border-color: #cccccc;
+}
+
+html[data-bs-theme="light"] :deep(.v-text-field) {
+ --v-field-border-color: #e8e8e8;
+}
+
+html[data-bs-theme="light"] :deep(.v-field__input) {
+ background-color: #fafafa !important;
+}
+
+html[data-bs-theme="light"] :deep(.v-field--focused .v-field__input) {
+ background-color: #ffffff !important;
+}
+
+html[data-bs-theme="dark"] :deep(.v-text-field) {
+ --v-field-border-color: #555555;
+}
diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js
index 0329d4e..29bec4e 100644
--- a/src/plugins/vuetify.js
+++ b/src/plugins/vuetify.js
@@ -1,35 +1,68 @@
/**
* plugins/vuetify.js
*
- * Framework documentation: https://vuetifyjs.com`
+ * Framework documentation: https://vuetifyjs.com
*/
// Styles
import "@mdi/font/css/materialdesignicons.css";
import "vuetify/styles";
-const tokyoNight = {
- dark: true,
- colors: {
- background: "#1a1b26",
- surface: "#24283b",
- primary: "#7aa2f7",
- secondary: "#b4f9f8",
- accent: "#ff9e64",
- error: "#f7768e",
- info: "#2ac3de",
- success: "#9ece6a",
- warning: "#e0af68",
- },
-};
-
// Composables
import { createVuetify } from "vuetify";
-// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
-export default createVuetify({
+const lightTheme = {
+ dark: false,
+ colors: {
+ background: "#ffffff",
+ surface: "#f5f5f5",
+ primary: "#1976d2",
+ secondary: "#424242",
+ accent: "#82b1ff",
+ error: "#f44336",
+ info: "#2196f3",
+ success: "#4caf50",
+ warning: "#ff9800",
+ },
+};
+
+const darkTheme = {
+ dark: true,
+ colors: {
+ background: "#1a1a1a",
+ surface: "#2a2a2a",
+ primary: "#5b9cf5",
+ secondary: "#a0a0a0",
+ accent: "#7aa2f7",
+ error: "#f87171",
+ info: "#60a5fa",
+ success: "#4ade80",
+ warning: "#facc15",
+ },
+};
+
+function getDefaultTheme() {
+ // Check for saved theme preference
+ const savedTheme = localStorage.getItem('vuetify-theme');
+ if (savedTheme) {
+ return savedTheme;
+ }
+
+ // Check system preference
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
+ return prefersDark ? 'dark' : 'light';
+}
+
+// Create vuetify instance
+const vuetify = createVuetify({
theme: {
- defaultTheme: "tokyoNight",
- themes: { tokyoNight },
+ defaultTheme: getDefaultTheme(),
+ themes: {
+ light: lightTheme,
+ dark: darkTheme,
+ },
},
});
+
+// Export the vuetify instance so other parts of the app can access it
+export { vuetify as default };
\ No newline at end of file
diff --git a/src/theme.css b/src/theme.css
index 40f0fdd..c6f10b1 100644
--- a/src/theme.css
+++ b/src/theme.css
@@ -21,8 +21,81 @@
direction: ltr;
}
+/* Theme-aware CSS variables */
+:root {
+ /* Light theme (default) */
+ --bg-primary: #ffffff;
+ --bg-secondary: #f5f5f5;
+ --text-primary: #212529;
+ --text-secondary: #6c757d;
+ --border-color: #dee2e6;
+ --tooltip-bg: #f8f9fa;
+ --tooltip-border: #dee2e6;
+ --tooltip-text: #212529;
+ --link-color: #0d6efd;
+ --link-hover: #0b5ed7;
+ --link-visited: #6f42c1;
+ --footer-bg: #f8f9fa;
+ --footer-text: #212529;
+}
+
+/* Dark theme */
+@media (prefers-color-scheme: dark) {
+ :root {
+ --bg-primary: #1a1a1a;
+ --bg-secondary: #2a2a2a;
+ --text-primary: #e0e0e0;
+ --text-secondary: #a0a0a0;
+ --border-color: #3a3a3a;
+ --tooltip-bg: #2a2a2a;
+ --tooltip-border: #444444;
+ --tooltip-text: #e0e0e0;
+ --link-color: #5b9cf5;
+ --link-hover: #60a5fa;
+ --link-visited: #888888;
+ --footer-bg: #1a1a1a;
+ --footer-text: #e0e0e0;
+ }
+}
+
+/* Support for explicit data-bs-theme attribute (Bootstrap override) */
+html[data-bs-theme="dark"] {
+ --bg-primary: #1a1a1a;
+ --bg-secondary: #2a2a2a;
+ --text-primary: #e0e0e0;
+ --text-secondary: #a0a0a0;
+ --border-color: #3a3a3a;
+ --tooltip-bg: #2a2a2a;
+ --tooltip-border: #444444;
+ --tooltip-text: #e0e0e0;
+ --link-color: #e8e8e8;
+ --link-hover: #60a5fa;
+ --link-visited: #888888;
+ --footer-bg: #1a1a1a;
+ --footer-text: #e0e0e0;
+}
+
+html[data-bs-theme="light"] {
+ --bg-primary: #ffffff;
+ --bg-secondary: #f5f5f5;
+ --text-primary: #212529;
+ --text-secondary: #6c757d;
+ --border-color: #dee2e6;
+ --tooltip-bg: #f8f9fa;
+ --tooltip-border: #dee2e6;
+ --tooltip-text: #212529;
+ --link-color: #333333;
+ --link-hover: #0b5ed7;
+ --link-visited: #6f42c1;
+ --footer-bg: #f8f9fa;
+ --footer-text: #212529;
+}
+
body {
max-width: 100%;
+ background-color: var(--bg-primary);
+ color: var(--text-primary);
+ transition: background-color 0.3s ease, color 0.3s ease;
}
html {
@@ -33,11 +106,12 @@ html {
}
footer {
- background: #212529;
- color: white;
+ background: var(--footer-bg);
+ color: var(--footer-text);
padding: 3px;
padding-right: 10px;
padding-left: 10px;
+ border-top: 1px solid var(--border-color);
}
.footer-left {
@@ -49,6 +123,14 @@ footer {
}
.green-score {
+ color: rgb(34, 139, 34) !important;
+}
+
+html[data-bs-theme="light"] .green-score {
+ color: rgb(34, 139, 34) !important;
+}
+
+html[data-bs-theme="dark"] .green-score {
color: rgb(158, 206, 106) !important;
}
@@ -57,15 +139,16 @@ footer {
}
a {
- color: var(--v-theme-primary);
+ color: var(--link-color);
+ transition: color 0.2s ease;
}
a:hover {
- color: #d65d03;
+ color: var(--link-hover);
}
a:visited {
- color: #53514f;
+ color: var(--link-visited);
}
@media (min-width: 769px) {
@@ -75,3 +158,90 @@ a:visited {
font-size: 1.2rem;
}
}
+
+/* Tooltip theme support */
+.deal-tooltip {
+ pointer-events: none;
+ max-width: 400px;
+}
+
+.tooltip-content {
+ background: var(--tooltip-bg);
+ border: 2px solid var(--tooltip-border);
+ border-radius: 8px;
+ padding: 16px;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+ font-size: 13px;
+ color: var(--tooltip-text);
+ text-align: left;
+ transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
+}
+
+.tooltip-header {
+ font-weight: bold;
+ font-size: 14px;
+ color: var(--text-primary);
+ margin-bottom: 8px;
+ white-space: normal;
+ word-wrap: break-word;
+}
+
+.tooltip-dealer {
+ font-size: 12px;
+ color: var(--text-secondary);
+ margin-bottom: 8px;
+}
+
+.tooltip-stats {
+ display: flex;
+ gap: 12px;
+ margin-bottom: 8px;
+ font-size: 12px;
+ color: var(--text-secondary);
+}
+
+.stat-item {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+}
+
+.stat-item .material-symbols-outlined {
+ font-size: 16px;
+}
+
+.tooltip-description {
+ margin-bottom: 8px;
+ padding: 8px;
+ background: var(--bg-secondary);
+ border-left: 2px solid var(--tooltip-border);
+ border-radius: 2px;
+ font-size: 12px;
+ white-space: normal;
+ word-wrap: break-word;
+ max-height: 60px;
+ overflow-y: auto;
+ color: var(--text-primary);
+}
+
+.tooltip-first-post {
+ margin-bottom: 8px;
+ padding: 8px;
+ background: var(--bg-secondary);
+ border-left: 2px solid var(--tooltip-border);
+ border-radius: 2px;
+ font-size: 12px;
+ white-space: normal;
+ word-wrap: break-word;
+ max-height: 60px;
+ overflow-y: auto;
+ color: var(--text-primary);
+}
+
+.tooltip-times {
+ font-size: 11px;
+ color: var(--text-secondary);
+ border-top: 1px solid var(--border-color);
+ padding-top: 8px;
+ margin-top: 8px;
+}
\ No newline at end of file