Skip to content

Commit a3cf7ad

Browse files
Enhance docs layout and theme integration for improved UI consistency
1 parent 83cb271 commit a3cf7ad

File tree

2 files changed

+64
-3
lines changed

2 files changed

+64
-3
lines changed

app/src/app/docs/layout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ export default function DocsLayout({ children }: { children: React.ReactNode })
88
<div className="min-h-screen">
99
{/* Main content */}
1010
<div className="mr-64 overflow-y-auto min-h-screen">
11-
<div className="p-8 my-2">{children}</div>
11+
<div className="p-8 my-2 docs-theme">
12+
<div className="max-w-5xl mx-auto">{children}</div>
13+
</div>
1214
</div>
1315

1416
{/* Sidebar */}
1517
<aside
16-
className="w-64 fixed right-0 top-0 h-screen overflow-y-auto px-6 py-10"
18+
className="w-64 fixed right-0 top-16 h-[calc(100vh-64px)] overflow-y-auto px-6 py-10"
1719
style={{
1820
backgroundColor: 'var(--card-background)',
1921
borderLeft: '1px solid #3a4152',
@@ -36,7 +38,7 @@ export default function DocsLayout({ children }: { children: React.ReactNode })
3638
textDecoration: 'none',
3739
}}
3840
onMouseEnter={(e) => {
39-
e.currentTarget.style.color = 'var(--theme-blue)';
41+
e.currentTarget.style.color = 'var(--text-link-hover-color)';
4042
}}
4143
onMouseLeave={(e) => {
4244
e.currentTarget.style.color = '#a0aec0';

app/src/app/globals.css

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,62 @@ section table {
374374
scrollbar-width: thin;
375375
scrollbar-color: #2b3244 #181b26;
376376
}
377+
378+
/* Docs theme overrides to align docs with site UI */
379+
.docs-theme {
380+
color: var(--foreground);
381+
}
382+
/* Neutralize bright background utilities inside docs to use app cards */
383+
.docs-theme .border,
384+
.docs-theme [class*="border-"] {
385+
border-color: #3a4152 !important;
386+
}
387+
.docs-theme [class*="bg-gradient-to-"],
388+
.docs-theme .bg-white,
389+
.docs-theme .bg-gray-50,
390+
.docs-theme .bg-gray-100,
391+
.docs-theme .bg-blue-50,
392+
.docs-theme .bg-green-50,
393+
.docs-theme .bg-purple-50,
394+
.docs-theme .bg-emerald-100,
395+
.docs-theme .bg-yellow-50 {
396+
background: var(--card-background) !important;
397+
}
398+
.docs-theme .text-gray-900,
399+
.docs-theme .text-gray-800,
400+
.docs-theme .text-gray-700,
401+
.docs-theme .text-gray-600,
402+
.docs-theme .text-gray-500,
403+
.docs-theme .text-gray-400,
404+
.docs-theme .text-blue-900,
405+
.docs-theme .text-blue-800,
406+
.docs-theme .text-green-900,
407+
.docs-theme .text-green-800,
408+
.docs-theme .text-purple-900,
409+
.docs-theme .text-purple-800 {
410+
color: var(--foreground) !important;
411+
}
412+
.docs-theme .prose {
413+
max-width: 100%;
414+
}
415+
.docs-theme pre {
416+
background: #23283a !important;
417+
color: #e0e6f0;
418+
border: 1px solid #3a4152;
419+
}
420+
.docs-theme pre code {
421+
background: transparent !important;
422+
color: inherit;
423+
}
424+
.docs-theme code {
425+
background: #23283a;
426+
color: #e0e6f0;
427+
}
428+
429+
/* Ensure links in docs retain themed link colors over utility overrides */
430+
.docs-theme a {
431+
color: var(--text-link-color) !important;
432+
}
433+
.docs-theme a:hover {
434+
color: var(--text-link-hover-color) !important;
435+
}

0 commit comments

Comments
 (0)