Skip to content

Commit 6d25411

Browse files
huamanrajapsinghdev
authored andcommitted
feat: update styles and improve accessibility for OSS program components
1 parent 928b699 commit 6d25411

8 files changed

Lines changed: 36 additions & 23 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getProgramBySlug, getAllPrograms } from "@/data/oss-programs";
22
import { notFound } from "next/navigation";
33
import { marked } from "marked";
44
import DOMPurify from "dompurify";
5-
import { JSDOM } from "jsdom";
5+
import { JSDOM } from "jsdom";
66
import { ProgramHeader, ProgramMetadata, ProgramSection } from "@/components/oss-programs";
77
import "./program-styles.css";
88

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
:root {
2+
--color-primary: #9455f4;
3+
--color-success: #22c55e;
4+
--color-warning: #f59e0b;
5+
--color-text-primary: #333;
6+
--color-text-secondary: #444;
7+
--color-text-tertiary: #9ca3af;
8+
--color-bg-secondary: #252525;
9+
}
10+
111
/* Base list styling */
212
.program-content li {
313
position: relative;
@@ -9,7 +19,7 @@
919
content: "•";
1020
position: absolute;
1121
left: 0;
12-
color: #9455f4;
22+
color: var(--color-primary);
1323
font-weight: bold;
1424
}
1525

@@ -25,7 +35,7 @@
2535
content: counter(item) ".";
2636
position: absolute;
2737
left: 0;
28-
color: #9455f4;
38+
color: var(--color-primary);
2939
font-weight: 600;
3040
font-size: 0.875rem;
3141
}
@@ -38,21 +48,21 @@
3848
/* Eligibility section - checkmarks for "good match" list */
3949
.eligibility-section ul:first-of-type li::before {
4050
content: "✓";
41-
color: #22c55e;
51+
color: var(--color-success);
4252
}
4353

4454
/* Keep in mind - simple muted styling */
4555
.eligibility-section p:last-of-type {
46-
color: #9ca3af;
56+
color: var(--color-text-tertiary);
4757
font-style: italic;
4858
padding-left: 1rem;
49-
border-left: 2px solid #444;
59+
border-left: 2px solid var(--color-text-secondary);
5060
margin-top: 1rem;
5161
}
5262

5363
/* Preparation checklist - numbered steps with subtle background */
5464
.preparation-checklist ol li {
55-
background: #252525;
65+
background: var(--color-bg-secondary);
5666
padding: 0.75rem 1rem 0.75rem 2.25rem;
5767
margin: 0.5rem 0;
5868
border-radius: 0.375rem;
@@ -67,7 +77,7 @@
6777
.preparation-checklist ol li::before {
6878
left: 0.75rem;
6979
top: 0.75rem;
70-
color: #9455f4;
80+
color: var(--color-primary);
7181
font-weight: 700;
7282
}
7383

@@ -90,14 +100,14 @@
90100
top: 0.85rem;
91101
width: 8px;
92102
height: 8px;
93-
background: #9455f4;
103+
background: var(--color-primary);
94104
border-radius: 50%;
95105
}
96106

97107
.application-timeline ul li:first-child::before {
98-
background: #22c55e;
108+
background: var(--color-success);
99109
}
100110

101111
.application-timeline ul li:last-child::before {
102-
background: #f59e0b;
112+
background: var(--color-warning);
103113
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface SearchInputProps {
88
placeholder?: string;
99
}
1010

11-
export default function SearchInput({ value, onChange, placeholder = "Search programs..." }: SearchInputProps) {
11+
export default function SearchInput({ value, onChange, placeholder = "Search programs..." }: SearchInputProps): JSX.Element {
1212
return (
1313
<div className="relative flex-1">
1414
<Search className="absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 w-5 h-5 pointer-events-none z-10" />
@@ -17,7 +17,8 @@ export default function SearchInput({ value, onChange, placeholder = "Search pro
1717
placeholder={placeholder}
1818
value={value}
1919
onChange={(e) => onChange(e.target.value)}
20-
className="w-full bg-[#252525] border border-[#333] rounded-xl py-3 pl-12 pr-4 text-white placeholder-gray-500 focus:outline-none focus:border-[#9455f4] transition-colors truncate"
20+
className="w-full bg-dash-surface border border-dash-border rounded-xl py-3 pl-12 pr-4 text-text-primary placeholder-gray-500 focus:outline-none focus:border-brand-purple transition-colors truncate"
21+
aria-label="Search programs"
2122
/>
2223
</div>
2324
);

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function TagFilter({ tags, selectedTags, onTagsChange }: TagFilte
5454
return (
5555
<div className="relative flex-1" ref={dropdownRef}>
5656
<div
57-
className="flex items-center gap-2 bg-[#252525] border border-[#333] rounded-xl p-2 min-h-[50px] focus-within:border-[#9455f4] transition-colors cursor-text"
57+
className="flex items-center gap-2 bg-dash-surface border border-dash-border rounded-xl p-2 min-h-[50px] focus-within:border-brand-purple transition-colors cursor-text"
5858
onClick={() => {
5959
inputRef.current?.focus();
6060
setIsDropdownOpen(true);
@@ -64,14 +64,15 @@ export default function TagFilter({ tags, selectedTags, onTagsChange }: TagFilte
6464
{selectedTags.map((tag) => (
6565
<span
6666
key={tag}
67-
className="flex items-center gap-1 bg-[#9455f4]/20 text-[#dcb8ff] px-3 py-1 rounded-full text-sm flex-shrink-0"
67+
className="flex items-center gap-1 bg-brand-purple/20 text-brand-purple-light px-3 py-1 rounded-full text-sm flex-shrink-0"
6868
>
6969
{tag}
7070
<button
7171
onClick={(e) => {
7272
e.stopPropagation();
7373
removeTag(tag);
7474
}}
75+
aria-label={`Remove ${tag}`}
7576
className="hover:text-white"
7677
>
7778
<X className="w-3 h-3" />
@@ -101,7 +102,7 @@ export default function TagFilter({ tags, selectedTags, onTagsChange }: TagFilte
101102
initial={{ opacity: 0, y: -10 }}
102103
animate={{ opacity: 1, y: 0 }}
103104
exit={{ opacity: 0, y: -10 }}
104-
className="absolute z-20 top-full left-0 right-0 mt-2 bg-[#252525] border border-[#333] rounded-xl shadow-xl max-h-60 overflow-y-auto"
105+
className="absolute z-20 top-full left-0 right-0 mt-2 bg-dash-surface border border-dash-border rounded-xl shadow-xl max-h-60 overflow-y-auto"
105106
>
106107
{availableTags.length === 0 ? (
107108
<div className="p-4 text-gray-500 text-center">No matching tags found</div>
@@ -110,7 +111,8 @@ export default function TagFilter({ tags, selectedTags, onTagsChange }: TagFilte
110111
<button
111112
key={tag}
112113
onClick={() => addTag(tag)}
113-
className="w-full text-left px-4 py-3 hover:bg-[#333] text-gray-300 hover:text-white transition-colors flex items-center justify-between"
114+
aria-label={`Add tag ${tag}`}
115+
className="w-full text-left px-4 py-3 hover:bg-dash-hover text-gray-300 hover:text-white transition-colors flex items-center justify-between"
114116
>
115117
{tag}
116118
</button>

apps/web/src/data/oss-programs/programs/apertre.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Program } from "../types";
33
export const apertre: Program = {
44
slug: "apertre",
55
name: "Apertre 2.0",
6-
tagline: "30-day OSS event Resourcio Community.",
6+
tagline: "30-day OSS event by Resourcio Community.",
77
shortDescription: "30-day OSS event Resourcio Community.",
88
websiteUrl: "https://s2apertre.resourcio.in/",
99
tags: ["open source", "beginner", "india", "prizes", "environment"],

apps/web/src/data/oss-programs/programs/github-campus-experts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type { Program } from "../types";
33
export const githubCampusExperts: Program = {
44
slug: "github-campus-experts",
55
name: "GitHub Campus Experts",
6-
tagline: "Community leadership.",
7-
shortDescription: "Community leadership.",
6+
tagline: "Helps students build and grow technical communities on campus",
7+
shortDescription: "A leadership program for university students who want to establish and expand tech communities on their campuses. Participants gain public speaking skills, leadership training, and access to GitHub resources while fostering innovation and collaboration among their peers.",
88
websiteUrl:
99
"https://docs.github.com/en/education/about-github-education/use-github-at-your-educational-institution/applying-to-be-a-github-campus-expert",
1010
tags: ["community", "leadership", "student", "swag", "learning"],

apps/web/src/data/oss-programs/programs/hacktoberfest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type { Program } from "../types";
33
export const hacktoberfest: Program = {
44
slug: "hacktoberfest",
55
name: "Hacktoberfest",
6-
tagline: "Digital Ocean October event.",
7-
shortDescription: "Digital Ocean October event.",
6+
tagline: "Month-long celebration of open source with contribution rewards",
7+
shortDescription: "A global event run by DigitalOcean that encourages developers of all levels to contribute to open source projects during October. Participants earn digital badges, tree plantings, and swag by completing pull requests and making meaningful contributions to the community.",
88
websiteUrl: "https://hacktoberfest.com/",
99
tags: ["open source", "beginner", "swag", "remote", "global"],
1010
region: "global",

apps/web/src/data/oss-programs/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/data/programs/types.ts
1+
// apps/web/src/data/oss-programs/types.ts
22

33
export type ProgramSlug =
44
| "google-summer-of-code"

0 commit comments

Comments
 (0)