Skip to content

Commit 8584d27

Browse files
authored
benchmarks website dark mode (#6886)
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
1 parent bf95b6f commit 8584d27

4 files changed

Lines changed: 97 additions & 9 deletions

File tree

Lines changed: 70 additions & 0 deletions
Loading

benchmarks-website/src/components/ChartContainer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export default function ChartContainer({
453453
display: true,
454454
grid: {
455455
display: true,
456-
color: 'rgba(0, 0, 0, 0.12)',
456+
color: 'rgba(166, 166, 166, 0.12)',
457457
},
458458
ticks: {
459459
maxRotation: 45,
@@ -481,7 +481,7 @@ export default function ChartContainer({
481481
display: true,
482482
beginAtZero: true,
483483
grid: {
484-
color: 'rgba(0, 0, 0, 0.12)',
484+
color: 'rgba(166, 166, 166, 0.12)',
485485
},
486486
ticks: {
487487
font: {

benchmarks-website/src/components/Header.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export default function Header({
2424
2525
</button>
2626
<a href="/" className="logo-link">
27-
<img
28-
src="/vortex_black_nobg.svg"
29-
alt="Vortex"
30-
className="site-logo"
31-
/>
27+
<picture>
28+
<source srcset="/vortex_black_nobg.svg" media="(prefers-color-scheme: light)"/>
29+
<source srcset="/vortex_white_nobg.svg" media="(prefers-color-scheme: dark)"/>
30+
<img src="/vortex_black_nobg.svg" alt="Vortex" className="site-logo"/>
31+
</picture>
3232
</a>
3333
</div>
3434

benchmarks-website/src/styles/index.css

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@
3535
--radius-lg: 12px;
3636
}
3737

38+
@media (prefers-color-scheme: dark) { :root {
39+
--primary-color: var(--vortex-blue);
40+
--primary-hover: #8a9cff;
41+
--accent-color: var(--vortex-green);
42+
--bg-color: #050507;
43+
--bg-secondary: #121219;
44+
--text-color: #F5F5F7;
45+
--text-secondary: #A0A0B0;
46+
--border-color: #30303a;
47+
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
48+
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.7);
49+
--shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.8);
50+
}}
51+
3852
/* Reset and base styles */
3953
* {
4054
box-sizing: border-box;
@@ -100,6 +114,7 @@ code, pre {
100114
padding: 0 32px;
101115
width: 100%;
102116
gap: 24px;
117+
background: var(--bg-secondary);
103118
}
104119

105120
.header-left {
@@ -177,6 +192,7 @@ code, pre {
177192
padding: 8px 20px;
178193
border: 1px solid var(--border-color);
179194
background: var(--bg-color);
195+
color: var(--text-color);
180196
border-radius: var(--radius-md);
181197
cursor: pointer;
182198
font-size: 14px;
@@ -206,6 +222,7 @@ code, pre {
206222
font-size: 14px;
207223
font-weight: 500;
208224
background: var(--bg-color);
225+
color: var(--text-color);
209226
transition: border-color 0.2s;
210227
}
211228

@@ -264,7 +281,7 @@ code, pre {
264281
/* Sidebar Navigation */
265282
.sidebar {
266283
width: var(--sidebar-width);
267-
background: rgba(250, 250, 250, 0.98);
284+
background: var(--bg-secondary);
268285
-webkit-backdrop-filter: blur(10px);
269286
backdrop-filter: blur(10px);
270287
border-right: 1px solid var(--border-color);
@@ -508,6 +525,7 @@ code, pre {
508525
padding: 16px 32px;
509526
background: var(--bg-secondary);
510527
border-bottom: 1px solid var(--border-color);
528+
border-radius: var(--radius-lg);
511529
cursor: pointer;
512530
-webkit-user-select: none;
513531
user-select: none;
@@ -516,7 +534,7 @@ code, pre {
516534
}
517535

518536
.benchmark-header:hover {
519-
background: #F5F5F5;
537+
background: var(--bg-color);
520538
}
521539

522540
.title-wrapper {

0 commit comments

Comments
 (0)