Skip to content

Commit 0b8cfbf

Browse files
Dario-DCSembauke
andauthored
chore(curriculum): add responsive piano workshop (freeCodeCamp#56734)
Co-authored-by: Sem Bauke <[email protected]>
1 parent c803b7b commit 0b8cfbf

35 files changed

+3677
-2
lines changed

client/i18n/locales/english/intro.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,13 @@
20042004
"Test what you've learned in this quiz of how positioning works in CSS."
20052005
]
20062006
},
2007-
"xebj": { "title": "103", "intro": [] },
2007+
"workshop-piano": {
2008+
"title": "Design a Piano",
2009+
"intro": [
2010+
"Responsive Design tells your webpage how it should look on different-sized screens.",
2011+
"In this workshop, you'll use CSS and Responsive Design to code a piano. You'll also practice media queries and pseudo selectors."
2012+
]
2013+
},
20082014
"jkdt": { "title": "104", "intro": [] },
20092015
"lab-technical-documentation-page": {
20102016
"title": "Build a Technical Documentation Page",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Introduction to the Design a Piano
3+
block: workshop-piano
4+
superBlock: front-end-development
5+
---
6+
7+
## Introduction to the Design a Piano
8+
9+
Responsive Design tells your webpage how it should look on different-sized screens.
10+
11+
In this workshop, you'll use CSS and Responsive Design to code a piano. You'll also practice media queries and pseudo selectors.
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{
2+
"name": "Design a Piano",
3+
"blockType": "workshop",
4+
"isUpcomingChange": true,
5+
"usesMultifileEditor": true,
6+
"hasEditableBoundaries": true,
7+
"dashedName": "workshop-piano",
8+
"order": 103,
9+
"superBlock": "front-end-development",
10+
"challengeOrder": [
11+
{
12+
"id": "612e78af05201622d4bab8aa",
13+
"title": "Step 1"
14+
},
15+
{
16+
"id": "612e7d1c29fb872d6384379c",
17+
"title": "Step 2"
18+
},
19+
{
20+
"id": "612e804c54d5e7308d7ebe56",
21+
"title": "Step 3"
22+
},
23+
{
24+
"id": "612e813b3ba67633222cbe54",
25+
"title": "Step 4"
26+
},
27+
{
28+
"id": "612e8279827a28352ce83a72",
29+
"title": "Step 5"
30+
},
31+
{
32+
"id": "612e83ec2eca1e370f830511",
33+
"title": "Step 6"
34+
},
35+
{
36+
"id": "612e89562043183c86df287c",
37+
"title": "Step 7"
38+
},
39+
{
40+
"id": "612e89d254fe5d3df7d6693d",
41+
"title": "Step 8"
42+
},
43+
{
44+
"id": "612e8eebe3a6dc3fcc33a66f",
45+
"title": "Step 9"
46+
},
47+
{
48+
"id": "612e95ef2e4bdf41f69067f9",
49+
"title": "Step 10"
50+
},
51+
{
52+
"id": "612e96fc87fe8e44f69f7ec5",
53+
"title": "Step 11"
54+
},
55+
{
56+
"id": "612e98f3245c98475e49cfc6",
57+
"title": "Step 12"
58+
},
59+
{
60+
"id": "612e9a21381a1949327512e6",
61+
"title": "Step 13"
62+
},
63+
{
64+
"id": "612e9d142affc44a453655db",
65+
"title": "Step 14"
66+
},
67+
{
68+
"id": "612e9f1e7e5ccd4fa9ada0be",
69+
"title": "Step 15"
70+
},
71+
{
72+
"id": "612ea4c4993aba52ab4aa32e",
73+
"title": "Step 16"
74+
},
75+
{
76+
"id": "612ea97df5742154772f312e",
77+
"title": "Step 17"
78+
},
79+
{
80+
"id": "612ead8788d28655ef8db056",
81+
"title": "Step 18"
82+
},
83+
{
84+
"id": "612eaf56b7ba3257fdbfb0db",
85+
"title": "Step 19"
86+
},
87+
{
88+
"id": "612eb4893b63c75bb9251ddf",
89+
"title": "Step 20"
90+
},
91+
{
92+
"id": "612eb75153591b5e3b1ab65e",
93+
"title": "Step 21"
94+
},
95+
{
96+
"id": "612eb7ca8c275d5f89c73333",
97+
"title": "Step 22"
98+
},
99+
{
100+
"id": "612eb8e984cd73677a92b7e9",
101+
"title": "Step 23"
102+
},
103+
{
104+
"id": "612eb934f64a4d6890a45518",
105+
"title": "Step 24"
106+
},
107+
{
108+
"id": "612ebcba99bfa46a15370b11",
109+
"title": "Step 25"
110+
},
111+
{
112+
"id": "612ebe7fe6d07e6b76d1cae2",
113+
"title": "Step 26"
114+
},
115+
{
116+
"id": "612ebedec97e096c8bf64999",
117+
"title": "Step 27"
118+
},
119+
{
120+
"id": "612ebf9a210f2b6d77001e68",
121+
"title": "Step 28"
122+
},
123+
{
124+
"id": "612ec0490ae8626e9adf82e4",
125+
"title": "Step 29"
126+
},
127+
{
128+
"id": "612ec19d5268da7074941f84",
129+
"title": "Step 30"
130+
},
131+
{
132+
"id": "612ec29c84b9a6718b1f5cec",
133+
"title": "Step 31"
134+
}
135+
],
136+
"helpCategory": "HTML-CSS"
137+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
id: 612e78af05201622d4bab8aa
3+
title: Step 1
4+
challengeType: 0
5+
dashedName: step-1
6+
demoType: onLoad
7+
---
8+
9+
# --description--
10+
11+
Create a `div` element within your `body` element with the `id` set to `piano`.
12+
13+
# --hints--
14+
15+
You should create a new `div` element.
16+
17+
```js
18+
const div = document.querySelector('div');
19+
assert.exists(div);
20+
```
21+
22+
Your `div` should be within your `body` element.
23+
24+
```js
25+
const div = document.querySelector('div');
26+
assert(div?.parentElement?.localName === 'body');
27+
```
28+
29+
Your `div` should have the `id` set to `piano`.
30+
31+
```js
32+
const div = document.querySelector('div');
33+
assert(div?.getAttribute('id') === 'piano');
34+
```
35+
36+
# --seed--
37+
38+
## --seed-contents--
39+
40+
```html
41+
<!DOCTYPE html>
42+
<html lang="en">
43+
<head>
44+
<meta charset="UTF-8" />
45+
<title>Piano</title>
46+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
47+
</head>
48+
<body>
49+
--fcc-editable-region--
50+
51+
--fcc-editable-region--
52+
</body>
53+
</html>
54+
```
55+
56+
```css
57+
58+
```
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
id: 612e7d1c29fb872d6384379c
3+
title: Step 2
4+
challengeType: 0
5+
dashedName: step-2
6+
---
7+
8+
# --description--
9+
10+
Nest a second `div` within your existing `div`, and set the `class` to be `keys`.
11+
12+
# --hints--
13+
14+
You should create a second `div` element.
15+
16+
```js
17+
const divDiv = document.querySelectorAll('div');
18+
assert(divDiv?.length === 2);
19+
```
20+
21+
Your new `div` element should be within your existing `div` element.
22+
23+
```js
24+
const div = document.querySelector('div');
25+
assert(div?.children?.length === 1);
26+
assert(div?.children?.[0]?.localName === 'div');
27+
```
28+
29+
Your new `div` element should have the `class` set to `keys`.
30+
31+
```js
32+
const div = document.querySelector('div');
33+
assert(div?.children?.[0]?.className === 'keys');
34+
```
35+
36+
# --seed--
37+
38+
## --seed-contents--
39+
40+
```html
41+
<!DOCTYPE html>
42+
<html lang="en">
43+
<head>
44+
<meta charset="UTF-8" />
45+
<title>Piano</title>
46+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
47+
</head>
48+
<body>
49+
<div id="piano">
50+
--fcc-editable-region--
51+
52+
--fcc-editable-region--
53+
</div>
54+
</body>
55+
</html>
56+
```
57+
58+
```css
59+
60+
```
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
id: 612e804c54d5e7308d7ebe56
3+
title: Step 3
4+
challengeType: 0
5+
dashedName: step-3
6+
---
7+
8+
# --description--
9+
10+
Within your `.keys` element, add seven `div` elements, each with the class `key`.
11+
12+
# --hints--
13+
14+
You should create seven new `div` elements.
15+
16+
```js
17+
const divDivDiv = document.querySelectorAll('div');
18+
assert(divDivDiv?.length === 9);
19+
```
20+
21+
Your seven new `div` elements should be within your `.keys` element.
22+
23+
```js
24+
const keys = document.querySelector('.keys');
25+
assert([...keys?.children].length === 7);
26+
assert([...keys?.children].every(child => child?.tagName === 'DIV'));
27+
```
28+
29+
Your seven new `div` elements should all have the `class` set to `key`.
30+
31+
```js
32+
const keys = document.querySelector('.keys');
33+
assert([...keys?.children].every(child => child?.classList?.contains('key')));
34+
```
35+
36+
# --seed--
37+
38+
## --seed-contents--
39+
40+
```html
41+
<!DOCTYPE html>
42+
<html lang="en">
43+
<head>
44+
<meta charset="UTF-8" />
45+
<title>Piano</title>
46+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
47+
</head>
48+
<body>
49+
--fcc-editable-region--
50+
<div id="piano">
51+
<div class="keys"></div>
52+
</div>
53+
--fcc-editable-region--
54+
</body>
55+
</html>
56+
```
57+
58+
```css
59+
60+
```

0 commit comments

Comments
 (0)