Skip to content

Commit 1e36f53

Browse files
Merge pull request #26 from upayanmazumder-DevLabs/dev
Fix Settings, Scrollbar and Docs
2 parents dedeb07 + a3cf7ad commit 1e36f53

4 files changed

Lines changed: 75 additions & 12 deletions

File tree

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: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,26 +351,85 @@ section table {
351351
}
352352

353353
::-webkit-scrollbar-track {
354-
background: var(--background);
354+
background: #181b26;
355355
border-radius: var(--border-radius-medium);
356356
}
357357

358358
::-webkit-scrollbar-thumb {
359-
background-color: #3c445a;
360-
border: 4px solid var(--background);
359+
background-color: #2b3244;
360+
border: 3px solid #181b26;
361361
border-radius: var(--border-radius-medium);
362362
transition: background-color var(--transition-fast);
363363
}
364364

365365
::-webkit-scrollbar-thumb:hover {
366-
background-color: #4e5a76;
366+
background-color: #40485c;
367367
}
368368

369369
::-webkit-scrollbar-corner {
370-
background: var(--background);
370+
background: #181b26;
371371
}
372372

373373
* {
374-
scrollbar-width: auto;
375-
scrollbar-color: #3c445a var(--background);
374+
scrollbar-width: thin;
375+
scrollbar-color: #2b3244 #181b26;
376+
}
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;
376435
}

app/src/components/Settings/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const Settings: React.FC = () => {
3838

3939
return (
4040
<div className="px-2 sm:px-6 flex flex-col md:flex-row md:items-start md:gap-2 items-stretch gap-4">
41-
<Card className="flex flex-col items-center md:items-start gap-4 w-full md:w-1/3 min-w-[220px] max-w-full md:max-w-xs p-6">
41+
<Card className="flex flex-col justify-between md:items-start gap-4 w-full md:w-1/3 min-w-[220px] max-w-full md:max-w-xs p-6" style={{ height: "-webkit-fill-available" }}>
4242
<Profile
4343
user={user}
4444
imageError={imageError}

app/src/components/ui/Card/Card.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { motion, Easing } from 'framer-motion';
66
interface CardProps {
77
children: ReactNode;
88
className?: string;
9+
style?: React.CSSProperties;
910
hoverable?: boolean;
1011
onClick?: () => void;
1112
disabled?: boolean;
@@ -27,6 +28,7 @@ const elevationMap = {
2728
const Card = ({
2829
children,
2930
className = '',
31+
style = {},
3032
hoverable = false,
3133
onClick,
3234
disabled = false,
@@ -65,7 +67,7 @@ const Card = ({
6567
tabIndex={onClick && !disabled ? 0 : undefined}
6668
role={onClick && !disabled ? 'button' : undefined}
6769
aria-label={ariaLabel}
68-
style={{ outline: 'none', maxWidth: '-webkit-fill-available' }}
70+
style={{ outline: 'none', maxWidth: '-webkit-fill-available', ...style }}
6971
onKeyDown={handleKeyDown}
7072
>
7173
{children}

0 commit comments

Comments
 (0)