-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
55 lines (51 loc) · 1.38 KB
/
app.js
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
const challenges = [
"JavaScript Drum Kit",
"JS and CSS Clock",
"CSS Variables",
"Array Cardio Day 1",
"Flex Panel Gallery",
"Type Ahead",
"Array Cardio Day 2",
"Fun with HTML5 Canvas",
"Dev Tools Domination",
"Hold Shift and Check Checkboxes",
"Custom Video Player",
"Key Sequence Detection",
"Slide in on Scroll",
"JavaScript References VS Copying",
"LocalStorage",
"Mouse Move Shadow",
"Sort Without Articles",
"Adding Up Times with Reduce",
"Webcam Fun",
"Speech Detection",
"Geolocation",
"Follow Along Link Highlighter",
"Speech Synthesis",
"Sticky Nav",
"Event Capture, Propagation, Bubbling and Once",
"Stripe Follow Along Nav",
"Click and Drag",
"Video Speed Controller",
"Countdown Timer",
"Whack A Mole",
];
const num = 15;
document.querySelector(".done").innerHTML = num + 1;
const list = document.querySelector("ul");
for (let i = 0; i < challenges.length; i++) {
const html = `
<!-- challenge ${i + 1} -->
<li class="${i <= num ? "" : "disabled"}">
<a
href="challenges/${ i + 1}">
<span>${challenges[i]} <br>(Day ${i + 1})</span>
<img
src="img/challenge-${i <= num ? i + 1 : 30}.jpg"
alt="challenge-${i + 1}"
>
</a>
</li>
`;
list.innerHTML += html;
}