Skip to content

Commit e62db50

Browse files
Merge pull request #710 from freeCodeCamp/main
Create a new pull request by comparing changes across two branches
2 parents ade8f03 + 6a24f8a commit e62db50

File tree

22 files changed

+1305
-56
lines changed

22 files changed

+1305
-56
lines changed

client/i18n/locales/english/intro.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,12 @@
17721772
"hqia": { "title": "35", "intro": [] },
17731773
"dxpc": { "title": "36", "intro": [] },
17741774
"liti": { "title": "37", "intro": [] },
1775-
"xjin": { "title": "38", "intro": [] },
1775+
"lab-business-card": {
1776+
"title": "Design a Business Card",
1777+
"intro": [
1778+
"In this lab, you'll create a business card and style it using CSS."
1779+
]
1780+
},
17761781
"gnuk": { "title": "39", "intro": [] },
17771782
"zlfj": { "title": "40", "intro": [] },
17781783
"ioqd": { "title": "41", "intro": [] },
@@ -1814,7 +1819,12 @@
18141819
"rfiq": { "title": "77", "intro": [] },
18151820
"tcwi": { "title": "78", "intro": [] },
18161821
"uptf": { "title": "79", "intro": [] },
1817-
"nbwu": { "title": "80", "intro": [] },
1822+
"lab-page-of-playing-cards": {
1823+
"title": "Build a Page of Playing Cards",
1824+
"intro": [
1825+
"For this lab, you will use flexbox to create a webpage of playing cards."
1826+
]
1827+
},
18181828
"kqao": { "title": "81", "intro": [] },
18191829
"habq": { "title": "82", "intro": [] },
18201830
"vqut": { "title": "83", "intro": [] },
@@ -1859,7 +1869,12 @@
18591869
"yqma": { "title": "119", "intro": [] },
18601870
"dorc": { "title": "120", "intro": [] },
18611871
"adzu": { "title": "121", "intro": [] },
1862-
"cdzo": { "title": "122", "intro": [] },
1872+
"lab-moon-orbit": {
1873+
"title": "Build a Moon Orbit",
1874+
"intro": [
1875+
"For this lab, you will create an animation of the moon orbiting the earth."
1876+
]
1877+
},
18631878
"lugl": { "title": "123", "intro": [] },
18641879
"mtcg": { "title": "124", "intro": [] },
18651880
"lvqc": { "title": "125", "intro": [] },
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Introduction to Designing a Business Card
3+
block: lab-business-card
4+
superBlock: front-end-development
5+
---
6+
7+
## Learn CSS by Designing a Business Card
8+
9+
In this lab, you'll create a business card and style it using CSS.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Introduction to the Learn CSS Animation by Creating a Moon Orbit
3+
block: lab-moon-orbit
4+
superBlock: front-end-development
5+
---
6+
7+
## Introduction to the Learn CSS Animation by Creating a Moon Orbit
8+
9+
This is a test for the new project-based curriculum.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Introduction to Build a Page of Playing Cards
3+
block: lab-page-of-playing-cards
4+
superBlock: front-end-development
5+
---
6+
7+
## Introduction to Build a Page of Playing Cards
8+
9+
For this lab, you will use flexbox to create a webpage of a playing cards.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Design a Business Card",
3+
"isUpcomingChange": true,
4+
"usesMultifileEditor": true,
5+
"dashedName": "lab-business-card",
6+
"order": 38,
7+
"superBlock": "front-end-development",
8+
"challengeOrder": [{ "id": "6690e10ebe2181212abc9652", "title": "Design a Business Card" }],
9+
"helpCategory": "HTML-CSS",
10+
"blockType": "lab"
11+
}
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Build a Moon Orbit",
3+
"isUpcomingChange": true,
4+
"usesMultifileEditor": true,
5+
"hasEditableBoundaries": false,
6+
"dashedName": "lab-moon-orbit",
7+
"order": 122,
8+
"superBlock": "front-end-development",
9+
"challengeOrder": [{ "id": "66a37f37ef5823a313de8c26", "title": "Build a Moon Orbit" }],
10+
"helpCategory": "HTML-CSS",
11+
"blockType": "lab"
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Build a Page of Playing Cards",
3+
"blockType": "lab",
4+
"isUpcomingChange": true,
5+
"usesMultifileEditor": true,
6+
"dashedName": "lab-page-of-playing-cards",
7+
"order": 80,
8+
"superBlock": "front-end-development",
9+
"challengeOrder": [
10+
{
11+
"id": "66be24cb4144f955b6bcc550",
12+
"title": "Build a Page of Playing Cards"
13+
}
14+
],
15+
"helpCategory": "HTML-CSS"
16+
}

curriculum/challenges/english/14-responsive-web-design-22/learn-css-grid-by-building-a-magazine/614385513d91ae5c251c2052.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ assert.strictEqual(document.querySelectorAll('link')?.length, 3);
2222
Your `link` elements should be inside your `head` element.
2323
2424
```js
25-
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
25+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
2626
const headElementContent = code.match(headContentRegex);
2727

2828
const headElement = document.createElement("head");
@@ -76,7 +76,7 @@ assert.strictEqual(title?.length, 1);
7676
Your `title` element should be inside your `head` element.
7777

7878
```js
79-
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
79+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
8080
const headElementContent = code.match(headContentRegex);
8181
8282
const headElement = document.createElement("head");

curriculum/challenges/english/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98cc.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ Within the `head`, nest a `meta` element with a `charset` of `UTF-8`, a `title`
1414
You should create a `meta` element within the `head` element.
1515

1616
```js
17-
assert.exists(document.querySelector('head > meta'));
17+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
18+
const headElementContent = code.match(headContentRegex);
19+
20+
const headElement = document.createElement("head");
21+
headElement.innerHTML = headElementContent;
22+
assert.isNotNull(headElement.querySelector('meta'));
1823
```
1924

2025
You should give the `meta` tag a `charset` of `UTF-8`.
2126

2227
```js
23-
assert.equal(document.querySelector('head > meta')?.getAttribute('charset')?.toLowerCase(), 'utf-8');
28+
const linkElement = document.querySelector('meta');
29+
const charset = linkElement?.getAttribute("charset").toLowerCase();
30+
assert.strictEqual(charset, 'utf-8');
2431
```
2532
2633
Your code should have a `title` element.
@@ -33,7 +40,12 @@ assert.exists(title);
3340
The `title` element should be within the `head` element.
3441
3542
```js
36-
assert.exists(document.querySelector('head > title'));
43+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
44+
const headElementContent = code.match(headContentRegex);
45+
46+
const headElement = document.createElement("head");
47+
headElement.innerHTML = headElementContent;
48+
assert.isNotNull(headElement.querySelector('title'));
3749
```
3850
3951
Your project should have a title of `City Skyline`.
@@ -53,41 +65,46 @@ assert.equal(title.text, 'City Skyline');
5365
Your code should have a `link` element.
5466
5567
```js
56-
assert.match(code, /<link/)
68+
assert.isNotNull(document.querySelector('link'));
5769
```
5870
5971
You should not change your existing `head` tags. Make sure you did not delete the closing tag.
6072
6173
```js
62-
const heads = document.querySelectorAll('head');
63-
assert.equal(heads?.length, 1);
74+
const headElements = document.querySelectorAll('head');
75+
assert.strictEqual(headElements?.length, 1);
6476
```
6577
6678
You should have one void `link` element.
6779
6880
```js
69-
assert(document.querySelectorAll('link').length === 1);
81+
assert.strictEqual(document.querySelectorAll('link')?.length, 1);
7082
```
7183
7284
Your `link` element should be within your `head` element.
7385
7486
```js
75-
assert.exists(document.querySelector('head > link'));
87+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
88+
const headElementContent = code.match(headContentRegex);
89+
90+
const headElement = document.createElement("head");
91+
headElement.innerHTML = headElementContent;
92+
assert.isNotNull(headElement.querySelector('link'));
7693
```
7794
7895
Your `link` element should have a `rel` attribute with the value `stylesheet`.
7996
8097
```js
81-
const link_element = document.querySelector('link');
82-
const rel = link_element.getAttribute("rel");
83-
assert.equal(rel, "stylesheet");
98+
const linkElement = document.querySelector('link');
99+
const rel = linkElement?.getAttribute("rel");
100+
assert.strictEqual(rel, "stylesheet");
84101
```
85102
86103
Your `link` element should have an `href` attribute with the value `styles.css`.
87104
88105
```js
89-
const link = document.querySelector('link');
90-
assert.equal(link.dataset.href, "styles.css");
106+
const linkElement = document.querySelector('link');
107+
assert.strictEqual(linkElement?.dataset.href, "styles.css");
91108
```
92109
93110
# --seed--

curriculum/challenges/english/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/62cc5b1779e4d313466f73c5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ assert.notMatch(code, /<\/link>/);
3939
Your `link` element should be inside your `head` element.
4040
4141
```js
42-
const headContentRegex = /(?<=<head\s*>)(?:.|\s*)*?(?=<\/head\s*>)/;
42+
const headContentRegex = /(?<=<head\s*>)[\S|\s]*(?=<\/head\s*>)/;
4343
const headElementContent = code.match(headContentRegex);
4444

4545
const headElement = document.createElement("head");

0 commit comments

Comments
 (0)