Skip to content

Commit f26f507

Browse files
committed
style: remove grid floor, add edge sidebar toggles, improve contrast
1 parent 9967ecf commit f26f507

File tree

3 files changed

+62
-41
lines changed

3 files changed

+62
-41
lines changed

src/app/globals.css

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@
66

77
/* Light Theme (Default) */
88
:root {
9-
--bg-primary: #f8fafc;
9+
--bg-primary: #f1f5f9;
1010
--bg-secondary: #ffffff;
11-
--bg-tertiary: #f1f5f9;
12-
--bg-elevated: #e2e8f0;
13-
--text-primary: #1e293b;
14-
--text-secondary: #475569;
15-
--text-muted: #64748b;
16-
--accent-primary: #3b82f6;
17-
--accent-secondary: #10b981;
18-
--accent-warning: #f59e0b;
19-
--accent-danger: #ef4444;
20-
--border-color: rgba(0, 0, 0, 0.12);
21-
--border-hover: rgba(0, 0, 0, 0.2);
22-
--glass-bg: rgba(255, 255, 255, 0.95);
23-
--shadow-color: rgba(0, 0, 0, 0.08);
24-
--code-bg: #f1f5f9;
25-
--section-divider: #e2e8f0;
11+
--bg-tertiary: #e2e8f0;
12+
--bg-elevated: #cbd5e1;
13+
--text-primary: #0f172a;
14+
--text-secondary: #334155;
15+
--text-muted: #475569;
16+
--accent-primary: #2563eb;
17+
--accent-secondary: #059669;
18+
--accent-warning: #d97706;
19+
--accent-danger: #dc2626;
20+
--border-color: rgba(0, 0, 0, 0.15);
21+
--border-hover: rgba(0, 0, 0, 0.25);
22+
--glass-bg: rgba(255, 255, 255, 0.98);
23+
--shadow-color: rgba(0, 0, 0, 0.12);
24+
--code-bg: #e2e8f0;
25+
--section-divider: #cbd5e1;
2626
}
2727

2828
/* Dark Theme */
@@ -316,3 +316,9 @@ input[type="checkbox"] {
316316
.attention-cell {
317317
transition: background-color 0.2s ease;
318318
}
319+
320+
/* Vertical text for sidebar toggles */
321+
.writing-mode-vertical {
322+
writing-mode: vertical-rl;
323+
text-orientation: mixed;
324+
}

src/components/3d/NetworkVisualization.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -299,25 +299,6 @@ function NetworkScene() {
299299
);
300300
}
301301

302-
// Grid floor - adapts to theme
303-
function GridFloor() {
304-
const theme = useNetworkStore(state => state.ui.theme);
305-
const gridColor = theme === 'dark' ? '#0a0a0f' : '#e2e8f0';
306-
const opacity = theme === 'dark' ? 0.3 : 0.5;
307-
308-
return (
309-
<mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, -3, 0]} receiveShadow>
310-
<planeGeometry args={[50, 50, 50, 50]} />
311-
<meshStandardMaterial
312-
color={gridColor}
313-
wireframe
314-
transparent
315-
opacity={opacity}
316-
/>
317-
</mesh>
318-
);
319-
}
320-
321302
// Background stars - only shown in dark mode
322303
function BackgroundStars() {
323304
const theme = useNetworkStore(state => state.ui.theme);

src/components/NeuralNetworkVisualizer.tsx

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,21 @@ function HeaderBar({ isMobile }: { isMobile: boolean }) {
6262

6363
return (
6464
<header className="fixed top-0 left-0 right-0 h-14 glass z-30 flex items-center justify-between px-2 sm:px-4">
65-
{/* Left: Toggle sidebar */}
65+
{/* Left: Logo and title */}
6666
<div className="flex items-center gap-2 sm:gap-4">
67-
{(isMobile || !ui.leftPanelOpen) && (
67+
{/* Mobile only hamburger menu */}
68+
{isMobile && (
6869
<button
6970
onClick={toggleLeftPanel}
7071
className="p-2 rounded-lg hover:bg-[var(--bg-tertiary)] transition-colors"
71-
aria-label="Toggle left panel"
72+
aria-label="Toggle menu"
7273
>
7374
<svg className="w-6 h-6 text-[var(--text-secondary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
7475
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
7576
</svg>
7677
</button>
7778
)}
78-
79+
7980
<div className="flex items-center gap-3">
8081
<div className="w-8 h-8 rounded-lg bg-blue-600 flex items-center justify-center">
8182
<svg className="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -156,11 +157,12 @@ function HeaderBar({ isMobile }: { isMobile: boolean }) {
156157
</svg>
157158
</a>
158159

159-
{(isMobile || !ui.rightPanelOpen) && (
160+
{/* Mobile only settings button */}
161+
{isMobile && (
160162
<button
161163
onClick={toggleRightPanel}
162164
className="p-2 rounded-lg hover:bg-[var(--bg-tertiary)] transition-colors"
163-
aria-label="Toggle right panel"
165+
aria-label="Toggle settings"
164166
>
165167
<svg className="w-6 h-6 text-[var(--text-secondary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
166168
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2}
@@ -309,6 +311,38 @@ export default function NeuralNetworkVisualizer() {
309311
{/* Right Panel */}
310312
<RightPanel />
311313

314+
{/* Left sidebar toggle arrow - shown when sidebar is closed */}
315+
{!isMobile && !ui.leftPanelOpen && (
316+
<button
317+
onClick={toggleLeftPanel}
318+
className="fixed left-0 top-1/2 -translate-y-1/2 z-30 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-r-lg px-2 py-4 shadow-lg hover:bg-[var(--bg-tertiary)] transition-all group"
319+
aria-label="Open layers panel"
320+
>
321+
<div className="flex flex-col items-center gap-2">
322+
<svg className="w-5 h-5 text-[var(--text-primary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
323+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
324+
</svg>
325+
<span className="text-xs font-medium text-[var(--text-secondary)] writing-mode-vertical">Layers</span>
326+
</div>
327+
</button>
328+
)}
329+
330+
{/* Right sidebar toggle arrow - shown when sidebar is closed */}
331+
{!isMobile && !ui.rightPanelOpen && (
332+
<button
333+
onClick={toggleRightPanel}
334+
className="fixed right-0 top-1/2 -translate-y-1/2 z-30 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-l-lg px-2 py-4 shadow-lg hover:bg-[var(--bg-tertiary)] transition-all group"
335+
aria-label="Open control panel"
336+
>
337+
<div className="flex flex-col items-center gap-2">
338+
<svg className="w-5 h-5 text-[var(--text-primary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
339+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
340+
</svg>
341+
<span className="text-xs font-medium text-[var(--text-secondary)] writing-mode-vertical">Controls</span>
342+
</div>
343+
</button>
344+
)}
345+
312346
{/* Live Example Bar (Bottom) */}
313347
<LiveExampleBar />
314348

0 commit comments

Comments
 (0)