fix(curriculum): update fcc author wording (#60050)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
Anna
2025-05-02 10:03:54 -04:00
committed by GitHub
parent 2815ede749
commit 31369067da
6 changed files with 7 additions and 7 deletions
@@ -9,7 +9,7 @@ dashedName: step-8
Now, it is time to create the function that will be responsible for displaying the authors on the page.
Start by creating a function called `displayAuthors` that takes an `authors` parameter. Your function should then loop through the `authors` array and add a card for each author to the `authorContainer` `div`.
Start by creating a function called `displayAuthors` that takes an `authors` parameter. Your function should then loop through the `authors` array and add a card for each author to the `#authorContainer` element.
The card should have the following structure:
@@ -45,7 +45,7 @@ const parameters = __helpers.getFunctionParams(displayAuthors.toString());
assert.deepEqual(parameters[0].name,"authors");
```
When the `displayAuthors` function is called with an author's array, it should add a card for each author to the `authorContainer` `div`.
When the `displayAuthors` function is called with an author's array, it should add a card for each author to the `#authorContainer` element.
```js
const exampleAuthors = [
@@ -7,7 +7,7 @@ dashedName: step-12
# --description--
Now create an image tag and give it the `class` `"user-img"`. Use string interpolation to set the `src` attribute to `image` you destructured earlier. Set the `alt` attribute to `author` followed by the text `"avatar"`. Make sure there is a space between the `author` variable and the word `"avatar"`, for example, `"Quincy Larson avatar"`.
Now create an image tag and give it a `class` attribute of `"user-img"`. Use string interpolation to set the `src` attribute to `image` you destructured earlier. Set the `alt` attribute to `author` followed by the text `"avatar"`. Make sure there is a space between the `author` variable and the word `"avatar"`, for example, `"Quincy Larson avatar"`.
# --before-all--
@@ -9,7 +9,7 @@ dashedName: step-13
The next thing you'll show are biographical details about the author. You can do this with `bio` that you destructured earlier.
Add a paragraph element with the `class` `"bio"`, then interpolate `bio` inside the paragraph element.
Add a paragraph element with a `class` attribute of `"bio"`, then interpolate `bio` inside the paragraph element.
# --before-all--
@@ -9,7 +9,7 @@ dashedName: step-14
Next, add a link to the author's page on freeCodeCamp News.
Add an anchor element with the `class` `"author-link"`, interpolate `url` as the value for the `href` attribute, and set `target` to `"_blank"`. For the text of the anchor element, interpolate `author` followed by the text `"'s author page"`. For example, `"Quincy Larson's author page"`.
Add an anchor element with a `class` attribute of `"author-link"`, interpolate `url` as the value for the `href` attribute, and set `target` to `"_blank"`. For the text of the anchor element, interpolate `author` followed by the text `"'s author page"`. For example, `"Quincy Larson's author page"`.
# --before-all--
@@ -9,7 +9,7 @@ dashedName: step-21
Next, there's not a lot of separation between each author's name and image, and the rest of the details on the card. A divider will give the author cards a clear visual hierarchy.
Add a `div` element above the author's bio and give it the `class` `"purple-divider"`.
Add a `div` element above the author's bio and give it a `class` attribute of `"purple-divider"`.
# --before-all--
@@ -9,7 +9,7 @@ dashedName: step-23
Finally, what if there's an error and the author data fail to load? Then we need to show an error in the UI. That's exactly what the `.catch()` method is for handling errors.
Inside the `.catch()`, remove the `console.error()` and set the `innerHTML` of the `authorContainer` to a `p` element with the `class` `"error-msg"` and text `"There was an error loading the authors"`.
Inside the `.catch()`, remove the `console.error()` and set the `innerHTML` of the `authorContainer` to a `p` element with a `class` attribute of `"error-msg"` and text `"There was an error loading the authors"`.
# --before-all--