-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.js
More file actions
82 lines (77 loc) · 2.6 KB
/
Copy pathscript.js
File metadata and controls
82 lines (77 loc) · 2.6 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
const roadmapSection = document.getElementById("roadmap");
const languageLinks = document.querySelectorAll(".language-link");
languageLinks.forEach((link) => {
link.addEventListener("click", () => {
const selectedLanguage = link.dataset.lang;
roadmapSection.innerHTML = `<h2>${selectedLanguage.toUpperCase()} Roadmap</h2>`;
});
});
const roadmapContent = document.getElementById("roadmapContent");
languageLinks.forEach((link) => {
link.addEventListener("click", () => {
const selectedLanguage = link.dataset.lang;
roadmapContent.innerHTML = roadmapData[selectedLanguage];
});
});
// Define roadmap content for each programming language
const roadmapData = {
html: `
<h3>HTML/CSS Roadmap</h3>
<p>Whether you're just starting or want to deepen your skills in web development, this roadmap will guide you through essential HTML and CSS concepts.</p>
<h4>Getting Started</h4>
<ul>
<li>Introduction to HTML</li>
<li>HTML Elements and Tags</li>
<li>Basic Text Formatting</li>
<!-- Add more getting started topics -->
</ul>
<h4>Intermediate Topics</h4>
<ul>
<li>Forms and Input Elements</li>
<li>CSS Basics</li>
<li>CSS Selectors and Properties</li>
<!-- Add more intermediate topics -->
</ul>
<h4>Advanced Concepts</h4>
<ul>
<li>Responsive Design</li>
<li>CSS Flexbox and Grid</li>
<li>CSS Preprocessors</li>
<!-- Add more advanced concepts -->
</ul>
<!-- Add more sections and topics -->
`,
javascript: `
<h3>JavaScript Roadmap</h3>
<p>From fundamental concepts to advanced techniques, this roadmap will take you on a journey to master JavaScript.</p>
<h4>Getting Started</h4>
<ul>
<li>Introduction to JavaScript</li>
<li>Variables and Data Types</li>
<li>Operators and Expressions</li>
<!-- Add more getting started topics -->
</ul>
<h4>Intermediate Topics</h4>
<ul>
<li>Control Structures</li>
<li>Functions and Scope</li>
<li>Arrays and Objects</li>
<!-- Add more intermediate topics -->
</ul>
<h4>Advanced Concepts</h4>
<ul>
<li>Prototypes and Inheritance</li>
<li>Asynchronous Programming</li>
<li>ES6+ Features</li>
<!-- Add more advanced concepts -->
</ul>
<!-- Add more sections and topics -->
`,
};
languageLinks.forEach((link) => {
link.addEventListener("click", () => {
const selectedLanguage = link.dataset.lang;
roadmapSection.innerHTML = `<h2>${selectedLanguage.toUpperCase()} Roadmap</h2>`;
roadmapContent.innerHTML = roadmapData[selectedLanguage];
});
});