Files
freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/css-grid-magazine/step-009.md
Nicholas Carrigan (he/him) cb5244be73 feat: css magazine (#43507)
* feat: initial infrastructure

* feat: html steps done

* feat: through step 50

* feat: complete steps

* feat: write tests

* chore: apply gikf's review suggestions

Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com>

* chore: use correct alt text

Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com>

* fix: image size

Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com>

* feat: add temporary width

* chore: apply sem's review suggestions

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>

* chore: missed one

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>

* chore: apply kris' review suggestions

Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>

* chore: no text walls

Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>

* chore: walls of text

* chore: remaining review suggestions

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* fix: linting index.md

* chore: lang tags

* feat: clarify noreferrer

* feat: clarify lazy loading

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* fix: note about justify

* fix: split step 7

* fix: hero title

* chore: parts are secretly steps

* chore: apply tom's review suggestions

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

* chore: missed one

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com>
Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-10-28 14:31:12 -05:00

4.0 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
614389f601bb4f611db98563 Step 9 0 step-9

--description--

Below your .author element, create a new div element with the class social-icons.

Add five a elements within that new div, and give them the following href attributes.

  • The first a element should have an href set to https://www.facebook.com/freecodecamp.
  • The second a element should have an href set to https://twitter.com/freecodecamp.
  • The third a element should have an href set to https://instagram.com/freecodecamp.
  • The fourth a element should have an href set to https://www.linkedin.com/school/free-code-camp.
  • The fifth a element should have an href set to https://www.youtube.com/freecodecamp.

--hints--

You should create a new div element.

assert(document.querySelectorAll('div')?.length === 2);

Your new div element should come after your .author element.

assert(document.querySelector('.author')?.nextElementSibling?.localName === 'div');

Your new div element should have the class social-icons.

assert(document.querySelector('.author')?.nextElementSibling?.classList?.contains('social-icons'));

Your .social-icons element should have five a elements.

assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.length === 5);

Your first a element should have an href set to https://www.facebook.com/freecodecamp.

assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[0]?.getAttribute('href')?.includes('https://www.facebook.com/freecodecamp'));

Your second a element should have an href set to https://twitter.com/freecodecamp.

assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[1]?.getAttribute('href') === 'https://twitter.com/freecodecamp');

Your third a element should have an href set to https://instagram.com/freecodecamp.

assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[2]?.getAttribute('href') === 'https://instagram.com/freecodecamp');

Your fourth a element should have an href set to https://www.linkedin.com/school/free-code-camp.

assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[3]?.getAttribute('href') === 'https://www.linkedin.com/school/free-code-camp');

Your fifth a element should have an href set to https://www.youtube.com/freecodecamp.

assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[4]?.getAttribute('href') === 'https://www.youtube.com/freecodecamp');

--seed--

--seed-contents--

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS Grid Magazine</title>
    <link
      href="https://fonts.googleapis.com/css?family=Anton|Baskervville|Raleway&display=swap"
      rel="stylesheet"
    />
    <link
      rel="stylesheet"
      href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
    />
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <main>
      <section class="heading">
        <header class="hero">
          <img
            src="https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png"
            alt="freecodecamp logo"
            loading="lazy"
            class="hero-img"
            width="400"
          />
          <h1 class="hero-title">OUR NEW CURRICULUM</h1>
          <p class="hero-subtitle">
            Our efforts to restructure our curriculum with a more project-based
            focus
          </p>
        </header>
        <div class="author">
          <p class="author-name">
            By
            <a href="https://freecodecamp.org" target="_blank" rel="noreferrer"
              >freeCodeCamp</a
            >
          </p>
          <p class="publish-date">March 7, 2019</p>
        </div>
--fcc-editable-region--

--fcc-editable-region--
      </section>
    </main>
  </body>
</html>