mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-13 21:02:08 +08:00
feat(curriculum): add empty lines in catPhotoApp project (#48446)
* feat(curriculum): add empty lines in catPhotoApp project * Remove the whitespaces
This commit is contained in:
parent
719e360ec2
commit
369db647f5
@ -77,6 +77,7 @@ assert(collection.indexOf('H1') < collection.indexOf('H2'));
|
||||
<body>
|
||||
--fcc-editable-region--
|
||||
<h1>CatPhotoApp</h1>
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -53,6 +53,7 @@ assert(collection.indexOf('H2') < collection.indexOf('P'));
|
||||
<h1>CatPhotoApp</h1>
|
||||
--fcc-editable-region--
|
||||
<h2>Cat Photos</h2>
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -63,6 +63,7 @@ assert(
|
||||
<h2>Cat Photos</h2>
|
||||
--fcc-editable-region--
|
||||
<p>Click here to view more cat photos.</p>
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -60,10 +60,12 @@ assert(
|
||||
<html>
|
||||
<body>
|
||||
--fcc-editable-region--
|
||||
|
||||
<h1>CatPhotoApp</h1>
|
||||
<h2>Cat Photos</h2>
|
||||
<!-- TODO: Add link to cat photos -->
|
||||
<p>Click here to view more cat photos.</p>
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -53,6 +53,7 @@ assert(collection.indexOf('P') < collection.indexOf('IMG'));
|
||||
<!-- TODO: Add link to cat photos -->
|
||||
--fcc-editable-region--
|
||||
<p>Click here to view more cat photos.</p>
|
||||
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@ -70,6 +70,7 @@ assert(
|
||||
<!-- TODO: Add link to cat photos -->
|
||||
--fcc-editable-region--
|
||||
<p>Click here to view more cat photos.</p>
|
||||
|
||||
--fcc-editable-region--
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
|
||||
</main>
|
||||
|
||||
@ -66,6 +66,7 @@ assert(
|
||||
</section>
|
||||
--fcc-editable-region--
|
||||
<section>
|
||||
|
||||
</section>
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
|
||||
@ -75,6 +75,7 @@ assert(
|
||||
--fcc-editable-region--
|
||||
<section>
|
||||
<h2>Cat Lists</h2>
|
||||
|
||||
</section>
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
|
||||
@ -49,6 +49,7 @@ assert(secondSectionLastElemNode.nodeName === 'UL');
|
||||
--fcc-editable-region--
|
||||
<h2>Cat Lists</h2>
|
||||
<h3>Things cats love:</h3>
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -71,6 +71,7 @@ assert(
|
||||
<h3>Things cats love:</h3>
|
||||
--fcc-editable-region--
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
|
||||
@ -85,6 +85,7 @@ assert(!/\<img\s+.+\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/ca
|
||||
<li>laser pointers</li>
|
||||
<li>lasagna</li>
|
||||
</ul>
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -65,7 +65,9 @@ assert(
|
||||
<li>lasagna</li>
|
||||
</ul>
|
||||
--fcc-editable-region--
|
||||
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -88,6 +88,7 @@ assert(
|
||||
--fcc-editable-region--
|
||||
<figure>
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
|
||||
|
||||
</figure>
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
|
||||
@ -72,6 +72,7 @@ assert(
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
|
||||
<figcaption>Cats <em>love</em> lasagna.</figcaption>
|
||||
</figure>
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -86,6 +86,7 @@ assert.deepStrictEqual(
|
||||
</figure>
|
||||
--fcc-editable-region--
|
||||
<h3>Top 3 things cats hate:</h3>
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -63,6 +63,7 @@ assert($('main > section')[1].lastElementChild.nodeName === 'FIGURE');
|
||||
<li>thunder</li>
|
||||
<li>other cats</li>
|
||||
</ol>
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -85,7 +85,9 @@ assert(
|
||||
<figure>
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
|
||||
--fcc-editable-region--
|
||||
|
||||
<figcaption>Cats hate other cats.</figcaption>
|
||||
|
||||
--fcc-editable-region--
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
@ -96,6 +96,7 @@ assert(
|
||||
</section>
|
||||
--fcc-editable-region--
|
||||
<section>
|
||||
|
||||
</section>
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
|
||||
@ -79,6 +79,7 @@ assert($('form')[0].innerHTML.trim().length === 0);
|
||||
<section>
|
||||
--fcc-editable-region--
|
||||
<h2>Cat Form</h2>
|
||||
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -99,6 +99,7 @@ assert(
|
||||
<h2>Cat Form</h2>
|
||||
--fcc-editable-region--
|
||||
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
||||
|
||||
</form>
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
|
||||
@ -83,6 +83,7 @@ assert(collection.indexOf('INPUT') < collection.indexOf('BUTTON'));
|
||||
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
||||
--fcc-editable-region--
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
|
||||
--fcc-editable-region--
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@ -135,7 +135,7 @@ assert(
|
||||
<h2>Cat Form</h2>
|
||||
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
||||
--fcc-editable-region--
|
||||
|
||||
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
--fcc-editable-region--
|
||||
<button type="submit">Submit</button>
|
||||
|
||||
@ -88,8 +88,10 @@ assert(
|
||||
<h2>Cat Form</h2>
|
||||
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
||||
--fcc-editable-region--
|
||||
|
||||
<label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
|
||||
<label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
|
||||
|
||||
--fcc-editable-region--
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
<button type="submit">Submit</button>
|
||||
|
||||
@ -117,6 +117,7 @@ assert(
|
||||
<fieldset>
|
||||
--fcc-editable-region--
|
||||
<legend>What's your cat's personality?</legend>
|
||||
|
||||
--fcc-editable-region--
|
||||
</fieldset>
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
|
||||
@ -95,8 +95,9 @@ assert(document.querySelector('main').nextElementSibling.nodeName === 'FOOTER');
|
||||
</section>
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
--fcc-editable-region--
|
||||
</html>
|
||||
```
|
||||
|
||||
|
||||
@ -96,6 +96,7 @@ assert(extraSpacesRemoved.match(/No Copyright - freeCodeCamp\.org$/i));
|
||||
</main>
|
||||
--fcc-editable-region--
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
|
||||
@ -9,7 +9,7 @@ dashedName: step-65
|
||||
|
||||
Notice that everything you've added to the page so far is inside the `body` element. All page content elements that should be rendered to the page go inside the `body` element. However, other important information goes inside the `head` element.
|
||||
|
||||
Add a `head` element just above the `body` element.
|
||||
Add a `head` element above the `body` element.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -43,9 +43,11 @@ assert(noSpaces.match(/\<\/head\>\<body\>/));
|
||||
## --seed-contents--
|
||||
|
||||
```html
|
||||
<html>
|
||||
--fcc-editable-region--
|
||||
<html>
|
||||
|
||||
<body>
|
||||
--fcc-editable-region--
|
||||
<main>
|
||||
<h1>CatPhotoApp</h1>
|
||||
<section>
|
||||
@ -102,7 +104,6 @@ assert(noSpaces.match(/\<\/head\>\<body\>/));
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
--fcc-editable-region--
|
||||
</html>
|
||||
```
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@ assert(document.title && document.title.toLowerCase() === 'catphotoapp');
|
||||
<html>
|
||||
--fcc-editable-region--
|
||||
<head>
|
||||
|
||||
</head>
|
||||
--fcc-editable-region--
|
||||
<body>
|
||||
|
||||
@ -32,11 +32,12 @@ assert(noSpaces.match(/^\<\!DOCTYPEhtml\>\<html/));
|
||||
|
||||
```html
|
||||
--fcc-editable-region--
|
||||
|
||||
<html lang="en">
|
||||
--fcc-editable-region--
|
||||
<head>
|
||||
<title>CatPhotoApp</title>
|
||||
</head>
|
||||
--fcc-editable-region--
|
||||
<body>
|
||||
<main>
|
||||
<h1>CatPhotoApp</h1>
|
||||
|
||||
@ -89,6 +89,7 @@ assert(!/\<img\s+.+\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/ca
|
||||
</ol>
|
||||
--fcc-editable-region--
|
||||
<figure>
|
||||
|
||||
</figure>
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
|
||||
@ -7,7 +7,7 @@ dashedName: step-30
|
||||
|
||||
# --description--
|
||||
|
||||
To improve accessibility of the image you just added, add an `alt` attribute with the text:
|
||||
To improve accessibility of the image you added, add an `alt` attribute with the text:
|
||||
|
||||
`Five cats looking around a field.`
|
||||
|
||||
|
||||
@ -110,11 +110,12 @@ assert(
|
||||
<li>thunder</li>
|
||||
<li>other cats</li>
|
||||
</ol>
|
||||
--fcc-editable-region--
|
||||
<figure>
|
||||
--fcc-editable-region--
|
||||
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
|
||||
--fcc-editable-region--
|
||||
|
||||
</figure>
|
||||
--fcc-editable-region--
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@ -124,6 +124,7 @@ assert(code.match(/<\/label>\s*<label\s*>\s*<input [^>]+>\s*Outdoor/i));
|
||||
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
||||
--fcc-editable-region--
|
||||
<label><input id="indoor" type="radio"> Indoor</label>
|
||||
|
||||
--fcc-editable-region--
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
<button type="submit">Submit</button>
|
||||
|
||||
@ -57,6 +57,7 @@ assert.isFalse(includesH1);
|
||||
<html>
|
||||
<body>
|
||||
--fcc-editable-region--
|
||||
|
||||
<main>
|
||||
<h1>CatPhotoApp</h1>
|
||||
<h2>Cat Photos</h2>
|
||||
@ -64,6 +65,7 @@ assert.isFalse(includesH1);
|
||||
<p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
|
||||
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
|
||||
</main>
|
||||
|
||||
--fcc-editable-region--
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -73,6 +73,7 @@ assert(foundElems.length === 2);
|
||||
<p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
|
||||
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
|
||||
</section>
|
||||
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@ -90,6 +90,7 @@ assert($('main > section')[2].children.length === 0);
|
||||
<figcaption>Cats <strong>hate</strong> other cats.</figcaption>
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
--fcc-editable-region--
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@ -90,6 +90,7 @@ assert(extraSpacesRemoved.match(/Is your cat an indoor or outdoor cat\??$/i));
|
||||
<form action="https://freecatphotoapp.com/submit-cat-photo">
|
||||
--fcc-editable-region--
|
||||
<fieldset>
|
||||
|
||||
<label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
|
||||
<label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
|
||||
</fieldset>
|
||||
|
||||
@ -116,9 +116,10 @@ assert(fieldsetChildren[0].length > fieldsetChildren[1].length);
|
||||
<label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
|
||||
<label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
|
||||
</fieldset>
|
||||
|
||||
--fcc-editable-region--
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
<button type="submit">Submit</button>
|
||||
--fcc-editable-region--
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
@ -101,6 +101,7 @@ assert(
|
||||
</fieldset>
|
||||
--fcc-editable-region--
|
||||
<fieldset>
|
||||
|
||||
</fieldset>
|
||||
--fcc-editable-region--
|
||||
<input type="text" name="catphotourl" placeholder="cat photo URL" required>
|
||||
|
||||
@ -45,6 +45,7 @@ assert.notMatch(code, /<\/meta\s*>?/i);
|
||||
<html lang="en">
|
||||
--fcc-editable-region--
|
||||
<head>
|
||||
|
||||
<title>CatPhotoApp</title>
|
||||
</head>
|
||||
--fcc-editable-region--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user