Skip to content

Commit f3d4e52

Browse files
committed
ui: enforce brand consistency throughout the codebase
1 parent dbb2297 commit f3d4e52

File tree

11 files changed

+101
-84
lines changed

11 files changed

+101
-84
lines changed

apps/web/src/app/(main)/dashboard/account/page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,27 @@ const AccountPageContent = memo(function AccountPageContent({
2323
<ArrowLeft className="h-4 w-4" />
2424
<span>Back to Dashboard</span>
2525
</Link>
26-
<h1 className="text-2xl md:text-3xl font-semibold text-white">
26+
<h1 className="text-2xl md:text-3xl font-semibold text-text-primary">
2727
Account Settings
2828
</h1>
2929
</div>
3030

3131
<div className="bg-ox-sidebar border border-dash-border rounded-lg p-6 max-w-2xl">
3232
<div className="space-y-4">
3333
<div>
34-
<label className="text-sm text-zinc-400 mb-2 block">Plan</label>
34+
<label className="text-sm text-text-muted mb-2 block">Plan</label>
3535
<div className="flex items-center gap-2">
36-
<span className="text-lg font-semibold text-white">{plan}</span>
36+
<span className="text-lg font-semibold text-text-primary">
37+
{plan}
38+
</span>
3739
{isPaidUser && <ActiveTag />}
3840
</div>
3941
</div>
4042
{!isPaidUser && (
4143
<div>
4244
<Link
4345
href="/pricing"
44-
className="inline-flex items-center justify-center px-3 py-1.5 bg-ox-purple hover:bg-ox-purple-2 text-white rounded-md transition-colors text-xs font-medium"
46+
className="inline-flex items-center justify-center px-3 py-1.5 bg-ox-purple hover:bg-ox-purple-2 text-text-primary rounded-md transition-colors text-xs font-medium"
4547
>
4648
be a pro
4749
</Link>
@@ -60,7 +62,7 @@ export default function AccountPage() {
6062
<div className="w-full h-full flex flex-col p-6 bg-ox-content">
6163
{isLoading ? (
6264
<div className="flex items-center justify-center h-full">
63-
<span className="text-zinc-400">Loading...</span>
65+
<span className="text-text-muted">Loading...</span>
6466
</div>
6567
) : (
6668
<AccountPageContent isPaidUser={isPaidUser} />

apps/web/src/app/(main)/dashboard/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ export default function DashboardLayout({
3131
<div className="flex-1 flex flex-col h-full bg-dash-base">
3232
<div className="xl:hidden flex items-center h-16 px-4 border-b border-dash-border bg-dash-base">
3333
<IconWrapper onClick={() => setShowSidebar(true)}>
34-
<Bars3Icon className="size-5 text-ox-purple" />
34+
<Bars3Icon className="size-5 text-brand-purple" />
3535
</IconWrapper>
36-
<Link href="/" className="ml-4 text-lg font-semibold text-ox-white hover:text-ox-purple transition-colors">
36+
<Link
37+
href="/"
38+
className="ml-4 text-lg font-semibold text-text-primary hover:text-brand-purple transition-colors"
39+
>
3740
Opensox
3841
</Link>
3942
</div>

apps/web/src/app/(main)/dashboard/pro/dashboard/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function ProDashboardPage() {
1717
if (isLoading) {
1818
return (
1919
<div className="w-full h-full flex items-center justify-center bg-ox-content">
20-
<p className="text-white">Loading...</p>
20+
<p className="text-text-primary">Loading...</p>
2121
</div>
2222
);
2323
}
@@ -29,7 +29,7 @@ export default function ProDashboardPage() {
2929
return (
3030
<div className="w-full h-full flex items-center justify-center bg-ox-content p-6">
3131
<div className="max-w-2xl mx-auto text-center">
32-
<h1 className="text-2xl md:text-3xl font-semibold text-white mb-4">
32+
<h1 className="text-2xl md:text-3xl font-semibold text-text-primary mb-4">
3333
hi investors, ajeetunc is on the way to deliver the shareholder value.
3434
soon you&apos;ll see all the pro perks here. thanks for investing
3535
</h1>

apps/web/src/app/(main)/dashboard/sheet/page.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ const SheetTableRow = memo(function SheetTableRow({
5353
isComingSoon ? "opacity-50" : ""
5454
}`}
5555
>
56-
<TableCell className="text-white text-[12px] sm:text-sm p-3 text-left">
56+
<TableCell className="text-text-primary text-[12px] sm:text-sm p-3 text-left">
5757
{index}
5858
</TableCell>
5959

60-
<TableCell className="text-white text-[12px] sm:text-sm p-3">
60+
<TableCell className="text-text-primary text-[12px] sm:text-sm p-3">
6161
<div className="flex items-center gap-2">
6262
<span className="max-w-[80px] md:max-w-none break-words">
6363
{module.name}
@@ -72,7 +72,7 @@ const SheetTableRow = memo(function SheetTableRow({
7272

7373
<TableCell className="text-center p-3">
7474
{isComingSoon ? (
75-
<span className="inline-flex items-center gap-1 text-gray-500 cursor-not-allowed pointer-events-none">
75+
<span className="inline-flex items-center gap-1 text-text-muted cursor-not-allowed pointer-events-none">
7676
<FileText className="h-4 w-4" />
7777
<span className="text-[12px] sm:text-sm font-medium">read</span>
7878
</span>
@@ -81,7 +81,7 @@ const SheetTableRow = memo(function SheetTableRow({
8181
href={`/sheet/${module.id}`}
8282
target="_blank"
8383
rel="noopener noreferrer"
84-
className="inline-flex items-center gap-1 text-white hover:text-ox-purple transition-colors"
84+
className="inline-flex items-center gap-1 text-text-primary hover:text-brand-purple transition-colors"
8585
>
8686
<FileText className="h-4 w-4" />
8787
<span className="text-[12px] sm:text-sm font-medium">read</span>
@@ -122,7 +122,7 @@ const SheetTableRow = memo(function SheetTableRow({
122122
onCheckboxChange(module.id, checked === true)
123123
}
124124
disabled={isComingSoon}
125-
className="border-ox-purple/50 data-[state=checked]:bg-ox-purple data-[state=checked]:border-ox-purple data-[state=checked]:text-white disabled:opacity-50 disabled:cursor-not-allowed"
125+
className="border-ox-purple/50 data-[state=checked]:bg-ox-purple data-[state=checked]:border-ox-purple data-[state=checked]:text-text-primary disabled:opacity-50 disabled:cursor-not-allowed"
126126
/>
127127
</div>
128128
</TableCell>
@@ -320,7 +320,7 @@ export default function SheetPage() {
320320
if (isLoading) {
321321
return (
322322
<div className="w-full p-6 flex items-center justify-center h-[80vh]">
323-
<p className="text-ox-gray">Loading...</p>
323+
<p className="text-text-muted">Loading...</p>
324324
</div>
325325
);
326326
}
@@ -329,33 +329,33 @@ export default function SheetPage() {
329329
<div className="w-full h-full flex flex-col p-2 sm:p-6 overflow-hidden">
330330
<div className="w-[95vw] md:w-[90vw] lg:w-full flex items-start justify-between pb-6 flex-row lg:flex-shrink-0 lg:gap-4">
331331
<div className="flex flex-col gap-2">
332-
<h2 className="text-xl sm:text-2xl md:text-3xl font-semibold text-white tracking-tight">
332+
<h2 className="text-xl sm:text-2xl md:text-3xl font-semibold text-text-primary tracking-tight">
333333
30 days of Open Source sheet
334334
</h2>
335-
<span className="text-xs text-ox-white">
335+
<span className="text-xs text-text-secondary">
336336
(i don&apos;t have a marketing budget,
337337
<br className="sm:hidden" /> please share this sheet with others 🙏
338338
:)
339339
</span>
340340
</div>
341341
<div className="flex items-center md:gap-3 flex-shrink-0">
342342
{copied && (
343-
<Badge className="bg-ox-purple text-white border-0 flex items-center gap-1">
343+
<Badge className="bg-brand-purple text-text-primary border-0 flex items-center gap-1">
344344
<Check className="h-3 w-3" />
345345
Copied
346346
</Badge>
347347
)}
348348
<button
349349
onClick={handleDownloadPDF}
350-
className="p-2 text-white hover:text-ox-purple transition-colors rounded-md hover:bg-ox-header/50"
350+
className="p-2 text-text-primary hover:text-brand-purple transition-colors rounded-md hover:bg-ox-header/50"
351351
title="Download as PDF"
352352
aria-label="Download as PDF"
353353
>
354354
<Download className="h-5 w-5" />
355355
</button>
356356
<button
357357
onClick={handleShare}
358-
className="p-2 text-white hover:text-ox-purple transition-colors rounded-md hover:bg-ox-header/50"
358+
className="p-2 text-text-primary hover:text-brand-purple transition-colors rounded-md hover:bg-ox-header/50"
359359
title="Share sheet"
360360
aria-label="Share sheet"
361361
>
@@ -370,7 +370,7 @@ export default function SheetPage() {
370370
</div>
371371

372372
<div className="mb-6 flex-shrink-0">
373-
<p className="text-white text-sm italic">
373+
<p className="text-text-primary text-sm italic">
374374
&quot;sometimes, these modules may feel boring and hard af but
375375
that&apos;s the cost of learning something worthy. you go through
376376
it. you win. simple.&quot; — ajeet
@@ -384,20 +384,20 @@ export default function SheetPage() {
384384
[&::-webkit-scrollbar]:w-2
385385
[&::-webkit-scrollbar]:h-2
386386
[&::-webkit-scrollbar-track]:bg-transparent
387-
[&::-webkit-scrollbar-thumb]:bg-ox-purple/30
387+
[&::-webkit-scrollbar-thumb]:bg-brand-purple/30
388388
[&::-webkit-scrollbar-thumb]:rounded-full
389-
[&::-webkit-scrollbar-thumb]:hover:bg-ox-purple/50
389+
[&::-webkit-scrollbar-thumb]:hover:bg-brand-purple/50
390390
"
391391
>
392392
<Table className="w-full min-w-[600px] sm:min-w-[800px]">
393393
<TableHeader>
394-
<TableRow className="border-b border-dash-border bg-ox-header">
394+
<TableRow className="border-b border-dash-border bg-dash-surface">
395395
{tableColumns.map((name, i) => (
396396
<TableHead
397397
key={name}
398398
className={[
399-
"px-3 py-3 font-semibold text-white text-[12px] sm:text-sm whitespace-nowrap",
400-
"sticky top-0 z-30 bg-ox-header",
399+
"px-3 py-3 font-semibold text-text-primary text-[12px] sm:text-sm whitespace-nowrap",
400+
"sticky top-0 z-30 bg-dash-surface",
401401
i === 0 ? "text-left" : "text-center",
402402
].join(" ")}
403403
>

apps/web/src/app/(main)/sheet/[moduleId]/page.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export default function ModuleDocPage() {
158158

159159
if (currentModule.comingSoon) {
160160
return (
161-
<div className="min-h-screen bg-ox-header text-white font-DMfont">
161+
<div className="min-h-screen bg-ox-header text-text-primary font-DMfont">
162162
<div className="max-w-4xl mx-auto px-6 py-8">
163163
<div className="mb-6">
164164
<Link
@@ -168,7 +168,7 @@ export default function ModuleDocPage() {
168168
<ArrowLeft className="h-4 w-4" />
169169
<span>Back to Sheet</span>
170170
</Link>
171-
<h1 className="text-3xl font-bold text-white mb-2">
171+
<h1 className="text-3xl font-bold text-text-primary mb-2">
172172
{currentModule.name}
173173
</h1>
174174
</div>
@@ -177,7 +177,7 @@ export default function ModuleDocPage() {
177177
<Badge className="bg-ox-purple/20 text-ox-purple border-ox-purple/30 mb-4">
178178
Soon
179179
</Badge>
180-
<p className="text-gray-300 text-lg">
180+
<p className="text-text-secondary text-lg">
181181
This module is coming very soon. Stay tuned!
182182
</p>
183183
</div>
@@ -187,7 +187,7 @@ export default function ModuleDocPage() {
187187
}
188188

189189
return (
190-
<div className="min-h-screen bg-ox-header text-white font-DMfont">
190+
<div className="min-h-screen bg-ox-header text-text-primary font-DMfont">
191191
<div className="max-w-4xl mx-auto px-6 py-8">
192192
{/* Header with back button and actions */}
193193
<div className="mb-6">
@@ -201,30 +201,30 @@ export default function ModuleDocPage() {
201201
</Link>
202202
<div className="flex items-center gap-3 flex-shrink-0">
203203
{copied && (
204-
<Badge className="bg-ox-purple text-white border-0 flex items-center gap-1">
204+
<Badge className="bg-brand-purple text-text-primary border-0 flex items-center gap-1">
205205
<Check className="h-3 w-3" />
206206
Copied
207207
</Badge>
208208
)}
209209
<button
210210
onClick={handleDownloadPDF}
211-
className="p-2 text-white hover:text-ox-purple transition-colors rounded-md hover:bg-ox-content/50"
211+
className="p-2 text-text-primary hover:text-brand-purple transition-colors rounded-md hover:bg-ox-content/50"
212212
title="Download as PDF"
213213
aria-label="Download as PDF"
214214
>
215215
<Download className="h-5 w-5" />
216216
</button>
217217
<button
218218
onClick={handleShare}
219-
className="p-2 text-white hover:text-ox-purple transition-colors rounded-md hover:bg-ox-content/50"
219+
className="p-2 text-text-primary hover:text-brand-purple transition-colors rounded-md hover:bg-ox-content/50"
220220
title="Share module"
221221
aria-label="Share module"
222222
>
223223
<Share2 className="h-5 w-5" />
224224
</button>
225225
</div>
226226
</div>
227-
<h1 className="text-3xl font-bold text-white mb-2">
227+
<h1 className="text-3xl font-bold text-text-primary mb-2">
228228
{currentModule.name}
229229
</h1>
230230
</div>
@@ -234,7 +234,7 @@ export default function ModuleDocPage() {
234234
<div
235235
// eslint-disable-next-line react/no-danger -- Safe: docContent is sanitized with DOMPurify before rendering
236236
dangerouslySetInnerHTML={{ __html: sanitizedDocContent }}
237-
className="text-white [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-4 [&_h1]:mt-6 [&_h1]:text-white [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:mb-3 [&_h2]:mt-5 [&_h2]:text-white [&_p]:text-gray-300 [&_p]:mb-4 [&_p]:leading-relaxed [&_ul]:list-disc [&_ul]:ml-6 [&_ul]:mb-4 [&_ul]:text-gray-300 [&_li]:mb-2 [&_pre]:bg-ox-sidebar [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:mb-4 [&_pre]:font-DMfont [&_pre]:border [&_pre]:border-ox-header [&_code]:text-ox-purple [&_code]:bg-ox-sidebar [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:font-DMfont [&_img]:max-w-full [&_img]:h-auto [&_img]:rounded-lg [&_img]:my-5 [&_img]:border [&_img]:border-ox-header"
237+
className="text-text-primary [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-4 [&_h1]:mt-6 [&_h1]:text-text-primary [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:mb-3 [&_h2]:mt-5 [&_h2]:text-text-primary [&_p]:text-text-secondary [&_p]:mb-4 [&_p]:leading-relaxed [&_ul]:list-disc [&_ul]:ml-6 [&_ul]:mb-4 [&_ul]:text-text-secondary [&_li]:mb-2 [&_pre]:bg-ox-sidebar [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:mb-4 [&_pre]:font-DMfont [&_pre]:border [&_pre]:border-ox-header [&_code]:text-brand-purple [&_code]:bg-ox-sidebar [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:font-DMfont [&_img]:max-w-full [&_img]:h-auto [&_img]:rounded-lg [&_img]:my-5 [&_img]:border [&_img]:border-ox-header"
238238
/>
239239
</div>
240240
</div>

apps/web/src/components/dashboard/DashboardHeader.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ export const DashboardHeader = () => {
2727
className="flex h-full w-[40%] justify-start space-x-3 items-center"
2828
>
2929
<IconWrapper className="block xl:hidden" onClick={menuClickHander}>
30-
<Bars3Icon className="size-4 text-ox-purple"></Bars3Icon>
30+
<Bars3Icon className="size-4 text-brand-purple"></Bars3Icon>
3131
</IconWrapper>
32-
<Link href="/" className="text-lg md:text-2xl font-medium hover:text-ox-purple transition-colors">
32+
<Link
33+
href="/"
34+
className="text-lg md:text-2xl font-medium hover:text-brand-purple transition-colors"
35+
>
3336
Opensox
3437
</Link>
3538
</div>
@@ -38,7 +41,7 @@ export const DashboardHeader = () => {
3841
className="flex h-full w-1/2 md:w-[40%] items-center justify-end space-x-2 lg:space-x-8"
3942
>
4043
<Button
41-
className="font-bold text-xs flex hover:bg-white-500 text-white bg-ox-purple cursor-pointer p-2 h-7 md:p-auto md:h-auto"
44+
className="font-bold text-xs flex hover:bg-white-500 text-text-primary bg-ox-purple cursor-pointer p-2 h-7 md:p-auto md:h-auto"
4245
onClick={startHandler}
4346
>
4447
Find projects

0 commit comments

Comments
 (0)