Skip to content

Commit 1a8f58f

Browse files
committed
ui: make sheet mob responsive
1 parent 3e7291b commit 1a8f58f

File tree

3 files changed

+62
-58
lines changed

3 files changed

+62
-58
lines changed

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

Lines changed: 60 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const tableColumns = [
2828
"Module Name",
2929
"Doc",
3030
"Watch",
31-
"Live Sessions / Doubts",
31+
"Live Sessions",
3232
"Done?",
3333
] as const;
3434

@@ -59,10 +59,12 @@ const SheetTableRow = memo(function SheetTableRow({
5959

6060
<TableCell className="text-white text-[12px] sm:text-sm p-3">
6161
<div className="flex items-center gap-2">
62-
<span>{module.name}</span>
62+
<span className="max-w-[80px] md:max-w-none break-words">
63+
{module.name}
64+
</span>
6365
{isComingSoon && (
6466
<Badge className="bg-ox-purple/20 text-ox-purple border-ox-purple/30 text-[10px] px-2 py-0.5">
65-
Coming Soon
67+
Soon
6668
</Badge>
6769
)}
6870
</div>
@@ -324,18 +326,19 @@ export default function SheetPage() {
324326
}
325327

326328
return (
327-
<div className="w-full h-full flex flex-col p-6 sm:p-6 overflow-hidden">
328-
<div className="flex items-center justify-between pb-6 flex-shrink-0 flex-wrap gap-4">
329-
<div className="flex items-center gap-3 flex-wrap">
329+
<div className="w-full h-full flex flex-col p-2 sm:p-6 overflow-hidden">
330+
<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">
331+
<div className="flex flex-col gap-2">
330332
<h2 className="text-xl sm:text-2xl md:text-3xl font-semibold text-white tracking-tight">
331333
30 days of Open Source sheet
332334
</h2>
333335
<span className="text-xs text-ox-white">
334-
(i don&apos;t have a marketing budget, please share this sheet with
335-
others 🙏 :)
336+
(i don&apos;t have a marketing budget,
337+
<br className="sm:hidden" /> please share this sheet with others 🙏
338+
:)
336339
</span>
337340
</div>
338-
<div className="flex items-center gap-3 flex-shrink-0">
341+
<div className="flex items-center md:gap-3 flex-shrink-0">
339342
{copied && (
340343
<Badge className="bg-ox-purple text-white border-0 flex items-center gap-1">
341344
<Check className="h-3 w-3" />
@@ -360,63 +363,64 @@ export default function SheetPage() {
360363
</button>
361364
</div>
362365
</div>
366+
<div className="w-[96vw] lg:w-full flex-1 flex flex-col overflow-hidden">
367+
{/* Progress Bar */}
368+
<div className="mb-6 flex-shrink-0">
369+
<ProgressBar completed={completedCount} total={totalModules} />
370+
</div>
363371

364-
{/* Progress Bar */}
365-
<div className="mb-6 flex-shrink-0">
366-
<ProgressBar completed={completedCount} total={totalModules} />
367-
</div>
368-
369-
<div className="mb-6 flex-shrink-0">
370-
<p className="text-white text-sm italic">
371-
&quot;sometimes, these modules may feel boring and hard af but
372-
that&apos;s the cost of learning something worthy. you go through it.
373-
you win. simple.&quot; — ajeet
374-
</p>
375-
</div>
372+
<div className="mb-6 flex-shrink-0">
373+
<p className="text-white text-sm italic">
374+
&quot;sometimes, these modules may feel boring and hard af but
375+
that&apos;s the cost of learning something worthy. you go through
376+
it. you win. simple.&quot; — ajeet
377+
</p>
378+
</div>
376379

377-
<div
378-
className="
380+
<div
381+
className="
379382
w-full bg-ox-content border border-ox-header rounded-lg
380-
flex-1 overflow-y-auto overflow-x-auto relative
383+
flex-1 overflow-auto relative
381384
[&::-webkit-scrollbar]:w-2
382-
[&::-webkit-scrollbar]:h-1
385+
[&::-webkit-scrollbar]:h-2
383386
[&::-webkit-scrollbar-track]:bg-transparent
384387
[&::-webkit-scrollbar-thumb]:bg-ox-purple/30
385388
[&::-webkit-scrollbar-thumb]:rounded-full
386389
[&::-webkit-scrollbar-thumb]:hover:bg-ox-purple/50
387390
"
388-
>
389-
<Table className="w-full min-w-[800px]">
390-
<TableHeader>
391-
<TableRow className="border-b border-ox-header bg-ox-header">
392-
{tableColumns.map((name, i) => (
393-
<TableHead
394-
key={name}
395-
className={[
396-
"px-3 py-3 font-semibold text-white text-[12px] sm:text-sm whitespace-nowrap",
397-
"sticky top-0 z-30 bg-ox-header",
398-
i === 0 ? "text-left" : "text-center",
399-
].join(" ")}
400-
>
401-
{name}
402-
</TableHead>
403-
))}
404-
</TableRow>
405-
</TableHeader>
391+
>
392+
<Table className="w-full min-w-[600px] sm:min-w-[800px]">
393+
<TableHeader>
394+
<TableRow className="border-b border-ox-header bg-ox-header">
395+
{tableColumns.map((name, i) => (
396+
<TableHead
397+
key={name}
398+
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",
401+
i === 0 ? "text-left" : "text-center",
402+
].join(" ")}
403+
>
404+
{name}
405+
</TableHead>
406+
))}
407+
</TableRow>
408+
</TableHeader>
406409

407-
<TableBody>
408-
{sheetModules.map((module, index) => (
409-
<SheetTableRow
410-
key={module.id}
411-
module={module}
412-
index={index}
413-
isCompleted={completedSteps.includes(module.id)}
414-
onCheckboxChange={handleCheckboxChange}
415-
isPaidUser={isPaidUser}
416-
/>
417-
))}
418-
</TableBody>
419-
</Table>
410+
<TableBody>
411+
{sheetModules.map((module, index) => (
412+
<SheetTableRow
413+
key={module.id}
414+
module={module}
415+
index={index}
416+
isCompleted={completedSteps.includes(module.id)}
417+
onCheckboxChange={handleCheckboxChange}
418+
isPaidUser={isPaidUser}
419+
/>
420+
))}
421+
</TableBody>
422+
</Table>
423+
</div>
420424
</div>
421425
</div>
422426
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default function ModuleDocPage() {
175175

176176
<div className="bg-ox-content rounded-lg p-8 border border-ox-header text-center">
177177
<Badge className="bg-ox-purple/20 text-ox-purple border-ox-purple/30 mb-4">
178-
Coming Soon
178+
Soon
179179
</Badge>
180180
<p className="text-gray-300 text-lg">
181181
This module is coming very soon. Stay tuned!

apps/web/src/data/sheet/module-8.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { SheetModule } from "./types";
22

33
export const module8: SheetModule = {
44
id: "module-8",
5-
name: "Adhoc: How to learn anything fast while contributing?",
5+
name: "Adhoc: How to learn anything fast?",
66
docContent: `
77
<h1>Adhoc: How to learn anything fast while contributing?</h1>
88
<p>Strategies and techniques for learning quickly while actively contributing to OPEN SOURCE projects.</p>

0 commit comments

Comments
 (0)