forked from wesbos/JavaScript30
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
119 lines (103 loc) · 3.01 KB
/
index.html
File metadata and controls
119 lines (103 loc) · 3.01 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript 30 - Brian Schroer</title>
</head>
<body>
<style>
html {
box-sizing: border-box;
color: white;
background-color: #241e49;
background-image: url(https://javascript30.com/images/JS3-social-share.png);
background-repeat: no-repeat;
background-position: center;
font-family: sans-serif;
}
body {
margin: 0;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
h1 {
font-size: 30px;
background-color: #241e49;
opacity: 0.8;
}
a {
color: #ffc600;
text-decoration: none;
}
a:enabled:hover {
color: white;
font-weight: bold;
text-decoration: underline;
}
.challenges {
min-height: 100vh;
overflow: hidden;
background-color: #241e49;
opacity: 0.8;
width: 280px;
}
.challenge {
margin: 1em;
font-size: 16px;
padding-left: 2em;
text-indent: -2em;
}
.challenge span {
color: #584506;
}
</style>
<h1>Brian Schroer's solutions for <a href="https://javascript30.com" target="_blank">JavaScript 30</a></h1>
<div class="challenges">
</div>
<script>
const challenges = [
{ title: '01 - JavaScript Drum Kit' },
{ title: '02 - JS and CSS Clock' },
{ title: '03 - CSS Variables' },
{ title: '04 - Array Cardio Day 1' },
{ title: '05 - Flex Panel Gallery' },
{ title: '06 - Type Ahead' },
{ title: '07 - Array Cardio Day 2' },
{ title: '08 - Fun with HTML5 Canvas' },
{ title: '09 - Dev Tools Domination' },
{ title: '10 - Hold Shift and Check Checkboxes' },
{ title: '11 - Custom Video Player' },
{ title: '12 - Key Sequence Detection' },
{ title: '13 - Slide in on Scroll' },
{ title: '14 - JavaScript References vs Copying' },
{ title: '15 - LocalStorage' },
{ title: '16 - Mouse Move Shadow' },
{ title: '17 - Sort Without Articles' },
{ title: '18 - Adding Up Times with Reduce' },
{ title: '19 - Webcam Fun' },
{ title: '20 - Speech Detection' },
{ title: '21 - Geolocation' },
{ title: '22 - Follow Along Link Highlighter' },
{ title: '23 - Speech Synthesis' },
{ title: '24 - Sticky Nav' },
{ title: '25 - Event Capture, Propagation, Bubbling and Once' },
{ title: '26 - Stripe Follow Along Nav' },
{ title: '27 - Click and Drag' },
{ title: '28 - Video Speed Controller' },
{ title: '29 - Countdown Timer' },
{ title: '30 - Whack A Mole' }
];
const challengesDiv = document.querySelector('div.challenges');
const html = challenges.map((challenge) => {
const linkTag = (challenge.disabled === true) ? 'span' : 'a';
return `<div class="challenge">
<${linkTag} href="${challenge.title}/index.html">${challenge.title}</${linkTag}>
</div>`;
});
challengesDiv.innerHTML = html.join('');
</script>
</body>
</html>