-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
452 lines (434 loc) · 11.8 KB
/
Copy pathindex.js
File metadata and controls
452 lines (434 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
const PROJECTS = [
{
name: "Node.js",
description: "JavaScript runtime built on Chrome's V8 engine.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/nodejs/node",
},
{
name: "Git",
description: "Distributed version control system.",
language: "C",
difficulty: "beginner",
url: "https://github.com/git/git",
},
{
name: "HTML",
description: "Standard markup language for web pages.",
language: "HTML",
difficulty: "beginner",
url: "https://github.com/whatwg/html",
},
{
name: "CSS",
description: "Stylesheet language for designing web pages.",
language: "CSS",
difficulty: "beginner",
url: "https://github.com/w3c/csswg-drafts",
},
{
name: "ECMAScript",
description: "Specification that standardizes JavaScript.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/tc39/ecma262",
},
{
name: "Markdown",
description: "Lightweight markup language for formatting text.",
language: "Markdown",
difficulty: "beginner",
url: "https://github.com/markedjs/marked",
},
{
name: "JSON",
description: "Lightweight data-interchange format.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/douglascrockford/JSON-js",
},
{
name: "npm",
description: "Node.js package manager.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/npm/cli",
},
{
name: "Vite",
description: "Fast frontend build tool.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/vitejs/vite",
},
{
name: "Bootstrap",
description: "CSS framework for responsive web design.",
language: "CSS",
difficulty: "beginner",
url: "https://github.com/twbs/bootstrap",
},
{
name: "SQLite",
description: "Lightweight embedded SQL database engine.",
language: "C",
difficulty: "beginner",
url: "https://github.com/sqlite/sqlite",
},
{
name: "Python",
description: "High-level programming language focused on readability.",
language: "Python",
difficulty: "beginner",
url: "https://github.com/python/cpython",
},
{
name: "Flask",
description: "Lightweight Python web framework.",
language: "Python",
difficulty: "beginner",
url: "https://github.com/pallets/flask",
},
{
name: "Linux",
description: "Open source operating system kernel.",
language: "C",
difficulty: "beginner",
url: "https://github.com/torvalds/linux",
},
{
name: "Axios",
description: "Promise-based HTTP client for JavaScript.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/axios/axios",
},
{
name: "Material UI",
description: "React UI component library.",
language: "TypeScript",
difficulty: "beginner",
url: "https://github.com/mui/material-ui",
},
{
name: "Firebase JS SDK",
description: "Client SDK for Firebase services.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/firebase/firebase-js-sdk",
},
{
name: "Insomnia",
description: "API testing and development tool.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/Kong/insomnia",
},
{
name: "React Router",
description: "Routing library for React applications.",
language: "TypeScript",
difficulty: "beginner",
url: "https://github.com/remix-run/react-router",
},
{
name: "Express",
description: "Minimal Node.js web framework.",
language: "JavaScript",
difficulty: "beginner",
url: "https://github.com/expressjs/express",
},
{
name: "Node-RED",
description: "Flow-based programming tool for IoT and APIs.",
language: "JavaScript",
difficulty: "intermediate",
url: "https://github.com/node-red/node-red",
},
{
name: "NestJS",
description: "Progressive Node.js framework for scalable apps.",
language: "TypeScript",
difficulty: "intermediate",
url: "https://github.com/nestjs/nest",
},
{
name: "Redux",
description: "Predictable state container for JavaScript apps.",
language: "JavaScript",
difficulty: "intermediate",
url: "https://github.com/reduxjs/redux",
},
{
name: "GraphQL JS",
description: "Reference implementation of GraphQL in JavaScript.",
language: "JavaScript",
difficulty: "intermediate",
url: "https://github.com/graphql/graphql-js",
},
{
name: "WebRTC",
description: "Real-time communication framework for browsers.",
language: "C++",
difficulty: "intermediate",
url: "https://github.com/webrtc",
},
{
name: "Nginx",
description: "High-performance web server and reverse proxy.",
language: "C",
difficulty: "intermediate",
url: "https://github.com/nginx/nginx",
},
{
name: "Terraform",
description: "Infrastructure as code tool by HashiCorp.",
language: "Go",
difficulty: "intermediate",
url: "https://github.com/hashicorp/terraform",
},
{
name: "OpenTelemetry JS",
description: "Observability framework for cloud-native software.",
language: "TypeScript",
difficulty: "intermediate",
url: "https://github.com/open-telemetry/opentelemetry-js",
},
{
name: "Webpack",
description: "Module bundler for JavaScript applications.",
language: "JavaScript",
difficulty: "intermediate",
url: "https://github.com/webpack/webpack",
},
{
name: "Docker Compose",
description: "Tool for defining multi-container Docker apps.",
language: "Go",
difficulty: "intermediate",
url: "https://github.com/docker/compose",
},
{
name: "LLVM",
description: "Compiler infrastructure for programming languages.",
language: "C++",
difficulty: "advanced",
url: "https://github.com/llvm/llvm-project",
},
{
name: "Chromium",
description: "Open source browser project behind Chrome.",
language: "C++",
difficulty: "advanced",
url: "https://github.com/chromium/chromium",
},
{
name: "OpenCV",
description: "Computer vision and image processing library.",
language: "C++",
difficulty: "advanced",
url: "https://github.com/opencv/opencv",
},
{
name: "Apache Spark",
description: "Big data processing engine.",
language: "Scala",
difficulty: "advanced",
url: "https://github.com/apache/spark",
},
{
name: "Apache Kafka",
description: "Distributed event streaming platform.",
language: "Java",
difficulty: "advanced",
url: "https://github.com/apache/kafka",
},
{
name: "Elasticsearch",
description: "Distributed search and analytics engine.",
language: "Java",
difficulty: "advanced",
url: "https://github.com/elastic/elasticsearch",
},
{
name: ".NET Runtime",
description: "Cross-platform runtime for .NET applications.",
language: "C#",
difficulty: "advanced",
url: "https://github.com/dotnet/runtime",
},
{
name: "Unreal Engine",
description: "Advanced real-time 3D game engine.",
language: "C++",
difficulty: "advanced",
url: "https://github.com/EpicGames/UnrealEngine",
},
{
name: "Godot Engine",
description: "Open source game engine for 2D and 3D games.",
language: "C++",
difficulty: "advanced",
url: "https://github.com/godotengine/godot",
},
{
name: "Blender",
description: "3D creation suite for modeling, animation, and rendering.",
language: "C",
difficulty: "advanced",
url: "https://github.com/blender/blender",
},
{
name: "Apache Airflow",
description: "Workflow orchestration platform.",
language: "Python",
difficulty: "advanced",
url: "https://github.com/apache/airflow",
},
{
name: "ONNX",
description: "Open format for machine learning models.",
language: "Python",
difficulty: "advanced",
url: "https://github.com/onnx/onnx",
},
{
name: "JAX",
description: "High-performance numerical computing library.",
language: "Python",
difficulty: "advanced",
url: "https://github.com/google/jax",
},
{
name: "Rust Compiler",
description: "Compiler for the Rust programming language.",
language: "Rust",
difficulty: "advanced",
url: "https://github.com/rust-lang/rust",
},
{
name: "PostgreSQL",
description: "Advanced open-source relational database.",
language: "C",
difficulty: "advanced",
url: "https://github.com/postgres/postgres",
},
{
name: "PyTorch",
description: "Deep learning framework with dynamic graphs.",
language: "Python",
difficulty: "advanced",
url: "https://github.com/pytorch/pytorch",
},
{
name: "TensorFlow",
description: "End-to-end machine learning platform.",
language: "Python",
difficulty: "advanced",
url: "https://github.com/tensorflow/tensorflow",
},
{
name: "Kubernetes",
description: "Container orchestration system.",
language: "Go",
difficulty: "advanced",
url: "https://github.com/kubernetes/kubernetes",
},
{
name: "Linux Kernel",
description: "Core of the Linux operating system.",
language: "C",
difficulty: "advanced",
url: "https://github.com/torvalds/linux",
},
{
name: "JAX",
description: "High-performance machine learning research library.",
language: "Python",
difficulty: "advanced",
url: "https://github.com/google/jax",
},
];
const state = {
language: "All",
difficulty: "All",
};
const LANGS = ["All", "JavaScript", "TypeScript", "Python", "Go", "Rust"];
const DIFFS = ["All", "beginner", "intermediate", "advanced"];
const langClass = {
JavaScript: "lang-js",
TypeScript: "lang-ts",
Python: "lang-py",
Go: "lang-go",
Rust: "lang-rust",
};
function getFiltered() {
return PROJECTS.filter((p) => {
const langMatch = state.language === "All" || p.language === state.language;
const diffMatch =
state.difficulty === "All" || p.difficulty === state.difficulty;
return langMatch && diffMatch;
});
}
function renderFilters() {
const langWrap = document.getElementById("langFilters");
const diffWrap = document.getElementById("diffFilters");
langWrap.innerHTML = LANGS.map(
(l) => `
<button class="filter-btn ${state.language === l ? "active" : ""}" onclick="setLang('${l}')">${l}</button>
`,
).join("");
diffWrap.innerHTML = DIFFS.map(
(d) => `
<button class="filter-btn ${state.difficulty === d ? "active" : ""}" onclick="setDiff('${d}')">${d}</button>
`,
).join("");
}
function renderGrid() {
const data = getFiltered();
document.getElementById("count").textContent =
`${data.length} project${data.length !== 1 ? "s" : ""}`;
const grid = document.getElementById("grid");
if (data.length === 0) {
grid.innerHTML = `<div class="empty-state">No projects match your filters.</div>`;
return;
}
grid.innerHTML = data
.map(
(p) => `
<div class="card">
<div class="card-top">
</div>
<h3 class="name">${p.name}</h3>
<div class="desc">${p.description}</div>
<div class="tags">
<span class="pill ${langClass[p.language] || ""}">${p.language}</span>
<span class="difficulty ${p.difficulty}">${p.difficulty}</span>
</div>
<a class="link" href="${p.url}" target="_blank" rel="noopener">View Repo →</a>
</div>
`,
)
.join("");
}
function setLang(l) {
state.language = l;
render();
}
function setDiff(d) {
state.difficulty = d;
render();
}
function render() {
renderFilters();
renderGrid();
}
function toggleTheme() {
document.body.classList.toggle("theme-dark");
const btn = document.querySelector(".theme-toggle");
btn.textContent = document.body.classList.contains("theme-dark")
? "☀️ Theme"
: "🌙 Theme";
}
render();