Skip to content

Commit 898b657

Browse files
authored
Merge pull request codeharborhub#2713 from CodeHarborHub/dev-3
Technology Roadmap is added
2 parents df7cb6f + 1514a8a commit 898b657

File tree

5 files changed

+136
-39
lines changed

5 files changed

+136
-39
lines changed

authors.json

Whitespace-only changes.

docusaurus.config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,19 +213,26 @@ const config = {
213213
position: "left",
214214
items: [
215215
{
216-
html: '<span class="nav-emoji">🌍</span> Web Dev',
216+
label: "🌍 Web Dev",
217217
to: "/web-dev/",
218218
},
219+
220+
{
221+
label: "🛣️ Roadmap",
222+
to: "/roadmap/",
223+
},
224+
219225
{
220-
html: '<span class="nav-emoji"> 📊</span> Quiz',
226+
label: "📊 Quiz",
221227
to: "https://quiz-app-ajay-dhangar.vercel.app/",
222-
},
228+
},
229+
223230
{
224231
label: "🧑‍💻 Live Editor",
225232
to: "/LiveEditor/",
226233
},
227234
{
228-
html: '<span class="nav-emoji"> 📺</span> Broadcast',
235+
label: "📺 Broadcast",
229236
to: "https://codeharborhub-broadcast-web.vercel.app/",
230237
},
231238
{

src/components/Roadmap/Roadmap.css

Lines changed: 77 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,117 @@
1+
12
.roadmap-container {
23
padding: 20px;
34
}
45

5-
.roadmap-title {
6+
.roadmap-container .roadmap-title {
67
text-align: center;
7-
font-size: 2rem;
8+
font-size: 2.5rem;
9+
margin-bottom: 30px;
10+
background: linear-gradient(
11+
90deg,
12+
rgb(106, 0, 255) 0%,
13+
rgb(152 0 255) 30%,
14+
rgb(246 41 41) 65%,
15+
rgb(255 169 8) 100%
16+
);
17+
background-clip: text;
18+
-webkit-text-fill-color: transparent;
19+
}
20+
21+
.roadmap-container .roadmap-controls {
22+
display: flex;
23+
justify-content: center;
824
margin-bottom: 20px;
925
}
1026

11-
.roadmap-category {
12-
margin-bottom: 40px;
27+
.roadmap-container .roadmap-search {
28+
padding: 10px;
29+
font-size: 1.2rem;
30+
border: 1px solid var(--ifm-color-primary);
31+
border-radius: 5px;
32+
width: 100%;
33+
max-width: 400px;
34+
}
35+
36+
.roadmap-container .roadmap-category {
37+
margin-bottom: 30px;
1338
}
1439

15-
.roadmap-category-title {
40+
.roadmap-container .roadmap-category .roadmap-category-title {
1641
text-align: center;
1742
font-size: 1.5rem;
18-
margin-bottom: 20px;
43+
cursor: pointer;
44+
color: var(--ifm-color-primary);
45+
margin:40px 0;
46+
}
47+
48+
49+
.roadmap-container .roadmap-category .roadmap-category-title::after {
50+
content: "";
51+
display: block;
52+
width: 40%;
53+
height: 1px;
54+
background: linear-gradient(to left, var(--ifm-color-primary), transparent);
55+
margin-top: -14px;
56+
margin-left: auto;
1957
}
2058

21-
.roadmap-cards {
59+
.roadmap-container .roadmap-category .roadmap-category-title::before {
60+
content: "";
61+
display: block;
62+
width: 40%;
63+
height: 1px;
64+
background: linear-gradient(to right, var(--ifm-color-primary), transparent);
65+
margin-bottom: -20px;
66+
67+
}
68+
69+
.roadmap-container .roadmap-category .roadmap-cards {
2270
display: grid;
23-
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
71+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
2472
gap: 20px;
2573
list-style: none;
2674
padding: 0;
2775
}
2876

29-
.roadmap-card {
77+
.roadmap-container .roadmap-category .roadmap-cards .roadmap-card {
3078
border: 1px solid var(--ifm-color-primary);
3179
border-radius: 8px;
32-
padding: 20px;
80+
padding: 15px;
3381
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
34-
transition: transform 0.3s ease;
82+
transition: transform 0.3s ease, box-shadow 0.3s ease;
3583
text-align: center;
3684
}
3785

38-
.roadmap-card:hover {
39-
transform: translateY(-8px);
86+
.roadmap-container .roadmap-category .roadmap-cards .roadmap-card:hover {
87+
transform: translateY(-2px);
88+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
4089
}
4190

42-
.roadmap-link {
91+
.roadmap-container .roadmap-category .roadmap-cards .roadmap-card .roadmap-link {
4392
text-decoration: none;
44-
color: inherit;
45-
font-size: 1rem;
93+
color: var(--ifm-color-primary);
94+
font-size: 1.1rem;
95+
}
96+
97+
.roadmap-container .roadmap-category .roadmap-cards .roadmap-card .roadmap-link:hover {
98+
color: var(--ifm-color-primary-darkest);
4699
}
47100

48101
@media (min-width: 600px) {
49-
.roadmap-cards {
102+
.roadmap-container .roadmap-category .roadmap-cards {
50103
grid-template-columns: repeat(2, 1fr);
51104
}
52105
}
53106

54107
@media (min-width: 900px) {
55-
.roadmap-cards {
108+
.roadmap-container .roadmap-category .roadmap-cards {
56109
grid-template-columns: repeat(3, 1fr);
57110
}
58111
}
112+
113+
@media (min-width: 380px) {
114+
.roadmap-container .roadmap-category .roadmap-cards {
115+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
116+
}
117+
}

src/components/Roadmap/index.tsx

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import React, { useState } from "react";
22
import "./Roadmap.css";
33

44
interface TechCategory {
@@ -269,23 +269,56 @@ const techCategories: TechCategory[] = [
269269
],
270270
},
271271
];
272-
273272
const Roadmap: React.FC = () => {
273+
const [searchTerm, setSearchTerm] = useState("");
274+
const [collapsedCategories, setCollapsedCategories] = useState<number[]>([]);
275+
276+
const toggleCollapse = (id: number) => {
277+
setCollapsedCategories((prev) =>
278+
prev.includes(id) ? prev.filter((cid) => cid !== id) : [...prev, id]
279+
);
280+
};
281+
282+
const filteredCategories = techCategories
283+
.map((category) => ({
284+
...category,
285+
technologies: category.technologies.filter((tech) =>
286+
tech.name.toLowerCase().includes(searchTerm.toLowerCase())
287+
),
288+
}))
289+
.filter((category) => category.technologies.length > 0);
290+
274291
return (
275292
<div className="roadmap-container">
276293
<h1 className="roadmap-title">Technology Roadmap</h1>
277-
{techCategories.map((category) => (
294+
<div className="roadmap-controls">
295+
<input
296+
type="text"
297+
placeholder="Search technologies..."
298+
value={searchTerm}
299+
onChange={(e) => setSearchTerm(e.target.value)}
300+
className="roadmap-search"
301+
/>
302+
</div>
303+
{filteredCategories.map((category) => (
278304
<div key={category.id} className="roadmap-category">
279-
<h2 className="roadmap-category-title">{category.title}</h2>
280-
<ul className="roadmap-cards">
281-
{category.technologies.map((tech) => (
282-
<li key={tech.id} className="roadmap-card">
283-
<a href={tech.link} className="roadmap-link">
284-
{tech.name}
285-
</a>
286-
</li>
287-
))}
288-
</ul>
305+
<h2
306+
className="roadmap-category-title"
307+
onClick={() => toggleCollapse(category.id)}
308+
>
309+
{category.title}
310+
</h2>
311+
{!collapsedCategories.includes(category.id) && (
312+
<ul className="roadmap-cards">
313+
{category.technologies.map((tech) => (
314+
<li key={tech.id} className="roadmap-card">
315+
<a href={tech.link} className="roadmap-link">
316+
{tech.name}
317+
</a>
318+
</li>
319+
))}
320+
</ul>
321+
)}
289322
</div>
290323
))}
291324
</div>

src/pages/Roadmap.tsx renamed to src/pages/roadmap/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import Layout from "@theme/Layout";
3-
import Roadmap from "../components/Roadmap";
3+
import Roadmaps from "../../components/Roadmap";
44

55

66
export default function RoadMap() {
@@ -11,9 +11,7 @@ export default function RoadMap() {
1111
description="RoadMap for Learning"
1212
>
1313
<main>
14-
<div>
15-
<Roadmap />
16-
</div>
14+
<Roadmaps />
1715
</main>
1816
</Layout>
1917
);

0 commit comments

Comments
 (0)