Untitled

mail@pastecode.io avatar
unknown
html
2 years ago
8.9 kB
1
Indexable
Never
<!DOCTYPE html>
<head>
  <meta charset="utf-8" />
  <title>Full Page Header</title>
  <link
    href="https://fonts.googleapis.com/css?family=Quicksand"
    rel="stylesheet"
  />
  <link rel="stylesheet" href="main.css" />
</head>

<body>
  <header class="header">
    <div class="u-contered">
      <div class="call-to-action">
        <h1 class="call-to-action__title">
          <p class="call-to-action__description">
            Lorem ipsum dolor, sit amet consectetur adipisicing elit. Earum
            tempore recusandae voluptatem perferendis nesciunt quibusdam animi?
            Fugit possimus quis tempora iure id unde illo asperiores excepturi,
            sequi tenetur culpa recusandae!
          </p>

          <button class="call-to-action__button" type="button">
            Sing me up!
          </button>
        </h1>
      </div>
    </div>
  </header>

  <div class="bar bar--bg">
    <div class="bar__content u-contered">
      <img
        class="bar__logo"
        src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUWFRgVFRUYGBUYGhgYGBgaGhgYGBgYGBgZGhgYGBgcIS4lHB4rIRgYJjgmKy8xNTU1GiQ7QDs0Py40NTEBDAwMEA8QGhISGjQhGiExMTExMTE0NDQ0MTQxMTE0NDQ0NDQ0NDQ0NDQ0ND80Pz80NDQ/PzQ/PzE/MTQ/PzE0Mf/AABEIAMcA/gMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAADAAECBAUGB//EADgQAAIBAwIDBgQGAQMFAQAAAAECAAMRIQQxEkFRBSJhcYGRBhOhsTJCUmLB0fAjM+EVJHKC8RT/xAAZAQADAQEBAAAAAAAAAAAAAAAAAQIDBAX/xAAdEQEBAQEBAAMBAQAAAAAAAAAAARECIQMSMUFR/9oADAMBAAIRAxEAPwA3FGYc47pYxFbzkb2JpiTIvsYNdrHeRdyNhALPFxecEI9Gt4DzkmF9toCEhl7SP3h6/aURLWiy48cfSAaNR+W4kLLyuD9Izg8oygw0sJgYlbMkptzx0k1AOYAvGQvJNcWiCEm42hQiDCK4kCh6Qb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WHiAbQxX2i49KxsLHzE0KGm7t2DHHI2AmITUH5Wb0M2tFVqstmBUWsb9IXi39h/eSfp6tAkWQhfHn9Y2nosm5uTvLKLmEZJXPxyMb1U6R/D5j6TTH4cTOTDL5/wAGXRUuJoSCNJuvSDuBHV7wSvK2PSTR+cAG5GSWBnd8wbESLVATYixjHGTmSZ3fEwtW/CwblN1wCpImRq0Ui0oG7Orf6mNmU39JfZ7mYXY7FaiodxxKfEWJH8TdQXMQXNMMi25xeWde9zaPpUA7w5YHn1gq2+d4UgUEjXW4N+YkiYqo7t/GKzwnIOLEjobRQmvW1Rul7j1zAAznpgsZQ7Tfu26mNFHz+mo04VRFFNFRNzi0ZmiiiM+LQDtFFHCq32eRxEHciaFOoyG4OOcUUuIbej1YYeMvimLRRS4QZoyTLFFAJUkuw8AT9h/MsVBbEaKJX8VWJMlQ3iiglcVo4NoooBB2EE9S3lFFJEBqMbYJEza5J5xRQUzOyahGrtvcMPZTOtpAswUc/tziilHGwm1hsIBxdoooIMtPmY2o/CR4faKKKk5btpLOD1UfQmUQIophf1T/2Q=="
        alt="gameIcon"
      />
      <input type="checkbox" id="inpNavToggle" />
      <label class="bar__nav-toggle" for="inpNavToggle">
        <i class="material_icons"> menu </i>
      </label>
      <nav class="nav">
        <a class="nav__link" href="#">Tutorial</a>
        <a class="nav__link" href="#">Tutorial</a>
        <a class="nav__link" href="#">Tutorial</a>
        <a class="nav__link" href="#">Tutorial</a>
      </nav>
    </div>
  </div>
  <main class="u-contered" style="padding: 30px; font-weight: 500;">
    <p>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem saepe,
      voluptatum, doloremque eveniet inventore ipsa nihil fugiat minus quaerat
      debitis quam animi libero? Adipisci numquam velit, delectus animi
      accusantium doloremque.
    </p>
  </main>
  <script>
    document.addEventListener("DOMContentLoaded", () => {
      const observer = new IntersectionObserver((entries) => {
        console.log(entries[0].intersectionRatio)
        document.querySelector(".bar").classList.toggle('bar--bg', entries[0].intersectionRatio < 0.9)
      }, {
        threshold: 0.9,
      });

      console.log(document.querySelector(".header"))

      observer.observe(document.querySelector(".header"));
    });
  </script>
</body>