mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2026-03-03 09:36:35 +00:00
Update themes and match system
This commit is contained in:
180
src/theme.css
180
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;
|
||||
}
|
||||
Reference in New Issue
Block a user