Skip to content

Commit 38ec048

Browse files
huamanrajapsinghdev
authored andcommitted
fix: ui repsnsiveness and design
1 parent 7043ece commit 38ec048

File tree

8 files changed

+125
-33
lines changed

8 files changed

+125
-33
lines changed

apps/web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"framer-motion": "^11.15.0",
2929
"geist": "^1.5.1",
3030
"gray-matter": "^4.0.3",
31-
"sanitize-html": "^2.11.0",
3231
"lucide-react": "^0.456.0",
3332
"marked": "^17.0.0",
3433
"next": "15.5.3",
@@ -39,6 +38,7 @@
3938
"react-dom": "^18.2.0",
4039
"react-qr-code": "^2.0.18",
4140
"react-tweet": "^3.2.1",
41+
"sanitize-html": "^2.11.0",
4242
"superjson": "^2.2.5",
4343
"tailwind-merge": "^2.5.4",
4444
"tailwindcss-animate": "^1.0.7",
@@ -50,6 +50,7 @@
5050
"@types/node": "^20",
5151
"@types/react": "^18",
5252
"@types/react-dom": "^18",
53+
"@types/sanitize-html": "^2.16.0",
5354
"depcheck": "^1.4.7",
5455
"eslint": "^8",
5556
"eslint-config-next": "15.0.2",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function DashboardLayout({
1616
const { showFilters } = useFilterStore();
1717
const { showSidebar, setShowSidebar } = useShowSidebar();
1818
return (
19-
<div className="flex w-screen h-screen bg-dash-base overflow-hidden">
19+
<div className="flex w-full h-screen bg-dash-base overflow-hidden">
2020
{showFilters && <FiltersContainer />}
2121
<aside className="hidden xl:block h-full">
2222
<Sidebar />

apps/web/src/app/(main)/dashboard/oss-programs/ProgramsList.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ export default function ProgramsList({ programs, tags }: ProgramsListProps) {
3030
}, [programs, searchQuery, selectedTags]);
3131

3232
return (
33-
<div className="min-h-screen w-full bg-[#1e1e1e] text-white p-4 md:p-8 lg:p-12">
34-
<div className="max-w-6xl mx-auto">
33+
<div className="min-h-full w-full max-w-[100vw] bg-[#1e1e1e] text-white p-4 md:p-8 lg:p-12 overflow-x-hidden">
34+
<div className="max-w-6xl mx-auto w-full">
3535
{/* Header Section */}
3636
<div className="flex flex-col gap-8 mb-12">
37-
<h1 className="text-4xl font-bold text-white">OSS Programs</h1>
37+
<h1 className="text-3xl md:text-4xl font-bold text-white break-words">
38+
OSS Programs
39+
</h1>
3840

3941
<div className="flex flex-col md:flex-row gap-4 w-full">
4042
<SearchInput

apps/web/src/app/(main)/dashboard/oss-programs/[slug]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import { getProgramBySlug, getAllPrograms } from "@/data/oss-programs";
22
import { notFound } from "next/navigation";
33
import { marked } from "marked";
44
import sanitizeHtml from "sanitize-html";
5-
import { ProgramHeader, ProgramMetadata, ProgramSection } from "@/components/oss-programs";
5+
import {
6+
ProgramHeader,
7+
ProgramMetadata,
8+
ProgramSection,
9+
} from "@/components/oss-programs";
610
import "./program-styles.css";
711

812
export const revalidate = 3600;
@@ -76,7 +80,7 @@ export default async function ProgramPage({
7680
};
7781

7882
return (
79-
<main className="min-h-screen w-full bg-[#1e1e1e] text-white overflow-x-hidden">
83+
<main className="min-h-screen w-full bg-dash-base text-white overflow-x-hidden">
8084
<div className="max-w-6xl mx-auto px-4 md:px-8 py-8 md:py-12 w-full">
8185
<ProgramHeader program={program} />
8286
<ProgramMetadata program={program} />

apps/web/src/app/(main)/dashboard/oss-programs/[slug]/program-styles.css

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,63 @@
104104
border-radius: 50%;
105105
}
106106

107-
.application-timeline ul li:first-child::before {
108-
background: var(--color-success);
107+
.application-timeline ul li:first-child::before,
108+
.application-timeline ul li:last-child::before {
109+
background: var(--color-primary);
109110
}
110111

111-
.application-timeline ul li:last-child::before {
112-
background: var(--color-warning);
112+
/* Mask the line above the first dot */
113+
.application-timeline ul li:first-child::after {
114+
content: "";
115+
position: absolute;
116+
left: -2rem;
117+
/* Cover the border area to the left */
118+
top: 0;
119+
width: 2rem;
120+
height: 0.85rem;
121+
/* Height up to the dot */
122+
background: theme('colors.dash.base');
123+
/* Match page background */
124+
z-index: 1;
125+
}
126+
127+
/* Mask the line below the last dot */
128+
.application-timeline ul li:last-child::after {
129+
content: "";
130+
position: absolute;
131+
left: -2rem;
132+
top: calc(0.85rem + 8px);
133+
/* Start after the dot */
134+
bottom: 0;
135+
width: 2rem;
136+
background: theme('colors.dash.base');
137+
z-index: 1;
138+
}
139+
140+
/* What this program is about section styling */
141+
.what-section p {
142+
line-height: 2 !important;
143+
/* Increased line spacing */
144+
margin-bottom: 1.5rem !important;
145+
/* More space between paragraphs */
146+
color: #e5e5e5;
147+
/* Slightly brighter text for clarity */
148+
}
149+
150+
.what-section h3 {
151+
margin-top: 3rem !important;
152+
/* significantly more space before subsections like Duration/Stipend */
153+
margin-bottom: 1rem !important;
154+
color: var(--color-primary);
155+
/* Highlight these headers */
113156
}
157+
158+
.what-section h4 {
159+
margin-top: 2.5rem !important;
160+
margin-bottom: 0.75rem !important;
161+
}
162+
163+
/* If Duration/Stipend are emphasized text at start of lines */
164+
.what-section p strong {
165+
color: white;
166+
}

apps/web/src/components/oss-programs/ProgramCard.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export default function ProgramCard({ program }: ProgramCardProps) {
1010
return (
1111
<Link
1212
href={`/dashboard/oss-programs/${program.slug}`}
13-
className="group block"
13+
className="group block w-full"
1414
>
15-
<div className="bg-[#252525] border border-[#333] rounded-xl px-4 py-3 md:px-5 md:py-4 hover:border-[#9455f4]/50 hover:bg-[#2a2a2a] transition-all duration-200 flex items-center justify-between gap-3 md:gap-4">
15+
<div className="w-full bg-[#252525] border border-[#333] rounded-xl px-4 py-3 md:px-5 md:py-4 hover:border-[#9455f4]/50 hover:bg-[#2a2a2a] transition-all duration-200 flex items-center justify-between gap-3 md:gap-4 overflow-hidden">
1616
<div className="flex-1 min-w-0">
1717
<h2 className="text-sm md:text-base font-semibold text-white group-hover:text-[#dcb8ff] transition-colors truncate">
1818
{program.name}
@@ -24,7 +24,9 @@ export default function ProgramCard({ program }: ProgramCardProps) {
2424

2525
<div className="hidden md:flex items-center gap-6 flex-shrink-0">
2626
<div className="text-right">
27-
<p className="text-xs text-gray-500 uppercase tracking-wide">Region</p>
27+
<p className="text-xs text-gray-500 uppercase tracking-wide">
28+
Region
29+
</p>
2830
<p className="text-sm text-gray-300 capitalize">{program.region}</p>
2931
</div>
3032
</div>

apps/web/src/components/oss-programs/ProgramSection.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ interface ProgramSectionProps {
88

99
const getSectionIcon = (sectionId: string) => {
1010
const icons: Record<string, React.ReactNode> = {
11-
'what': <Info className="w-4 h-4" />,
12-
'is-it-for-you': <User className="w-4 h-4" />,
13-
'when': <Calendar className="w-4 h-4" />,
14-
'how-to-prepare': <Rocket className="w-4 h-4" />,
15-
'application-process': <FileText className="w-4 h-4" />,
11+
what: <Info className="w-4 h-4" />,
12+
"is-it-for-you": <User className="w-4 h-4" />,
13+
when: <Calendar className="w-4 h-4" />,
14+
"how-to-prepare": <Rocket className="w-4 h-4" />,
15+
"application-process": <FileText className="w-4 h-4" />,
1616
};
1717
return icons[sectionId] || <Info className="w-4 h-4" />;
1818
};
1919

20-
export default function ProgramSection({ id, title, contentHtml }: ProgramSectionProps) {
20+
export default function ProgramSection({
21+
id,
22+
title,
23+
contentHtml,
24+
}: ProgramSectionProps) {
2125
return (
2226
<section id={id} className="scroll-mt-20">
2327
<h2 className="text-base md:text-lg lg:text-xl font-semibold mb-4 text-white flex items-center gap-2.5 tracking-tight">
@@ -40,9 +44,10 @@ export default function ProgramSection({ id, title, contentHtml }: ProgramSectio
4044
prose-code:text-[#dcb8ff] prose-code:bg-[#252525] prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-xs prose-code:md:text-sm prose-code:font-mono prose-code:before:content-[''] prose-code:after:content-[''] prose-code:break-all
4145
prose-pre:bg-[#252525] prose-pre:border prose-pre:border-[#333] prose-pre:rounded-lg prose-pre:p-4 prose-pre:overflow-x-auto prose-pre:my-5
4246
prose-blockquote:border-l-4 prose-blockquote:border-[#9455f4] prose-blockquote:pl-4 prose-blockquote:italic prose-blockquote:text-gray-400 prose-blockquote:my-5
43-
${id === 'application-process' ? 'application-timeline' : ''}
44-
${id === 'how-to-prepare' ? 'preparation-checklist' : ''}
45-
${id === 'is-it-for-you' ? 'eligibility-section' : ''}`}
47+
${id === "application-process" ? "application-timeline" : ""}
48+
${id === "how-to-prepare" ? "preparation-checklist" : ""}
49+
${id === "is-it-for-you" ? "eligibility-section" : ""}
50+
${id === "what" ? "what-section" : ""}`}
4651
dangerouslySetInnerHTML={{ __html: contentHtml }}
4752
/>
4853
</section>

pnpm-lock.yaml

Lines changed: 35 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)