Sessão Hero - Madeira Pura Móveis Rústicos

by francisco_negrao

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<section class="sectionBanner">
  <img src="https://lh5.googleusercontent.com/p/AF1QipOPYVFIQJWHq-D4d6_jAcc-a6Z7A0LSdHRiBMH-=s765-k-no" class="bgImg" />
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="boxDsc">
          <div class="ovBox">
          <img src="https://www.ecowd.inf.br/cms/img/dropzone_upload/resized_115ea07d6f4a4f6_1587576175_250x.png" class="imgLogo img-fluid" />
          <h1>
            Produtos de Madeira
          </h1>
            <p>
              Compre <strong>on-line</strong> ou em nossa loja
              <span>

              <!-- Marker Icon -->

              <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="map-marker-alt" class="svg-inline--fa fa-map-marker-alt fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="#fff" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"></path></svg> 

              São José do Rio Preto - SP
              </span>
            </p>
          
            <div class="line">
            </div>
            
          </div> <!-- ovBox -->
          
        </div> <!-- BoxDsc -->
      </div> <!-- col-12-->
    </div> <!-- row -->
  </div> <!-- container -->
  
   <!-- Cards Categories -->
          
          <div class="cardsRow">
                <div class="categoriesGroup">
                  <img class="img-fluid" src="https://lh3.ggpht.com/p/AF1QipPMYUZVkBSgNIEWftxhGuc0mIPHrY_EDZDm6g9k=s512" alt="Ilustração Artesanatos">
                  <div class="categoriesText">
                   ...

CSS

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

body {
  margin: 0px;
  font-family: 'Lato', sans-serif;
  background-color: #000;
}

.sectionBanner {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100vh;
}

/* Hero overlay */

.sectionBanner:after {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgb(20,38,27);
  background: -moz-linear-gradient(145deg, rgba(20,38,27,1) 0%, rgba(20,38,27,0.6533963927367823) 50%, rgba(20,38,27,1) 100%);
  background: -webkit-linear-gradient(145deg, rgba(20,38,27,1) 0%, rgba(20,38,27,0.6533963927367823) 50%, rgba(20,38,27,1) 100%);
  background: linear-gradient(145deg, rgba(20,38,27,1) 0%, rgba(20,38,27,0.6533963927367823) 50%, rgba(20,38,27,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#14261b",endColorstr="#14261b",GradientType=1);
  }

/* Background Store Image */

.sectionBanner img.bgImg {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  transition: all 1.3s ease-in-out;
  transform: scale(0.8);
}

/* Banner description */

.sectionBanner .boxDsc {
    position: relative;
    text-align: center;
    z-index: 2;
    height: 70vh;
    max-width: 750px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    margin: auto;
}

.sectionBanner .boxDsc h1 {
    font-weight: 700;
    font-size: 45px;
    transition: all 1.3s ease 0.5s;
    transform: translateY(-100%);
    opacity: 0;
}

.sectionBanner .boxDsc p {
  font-size: 20px;
  font-weight: 300;
  margin-top: 25px;
  transition: all 1.3s ease 1s;
  transform: translateY(-150px);
  opacity: 0;
}

.sectionBanner .boxDsc p span {
  display: block;
}

.sectionBanner .boxDsc p span svg {
  max-width: 12px;
  margin-right: 5px;
}

.sectionBanner .boxDsc .line {
    position: absolute;
...

JavaScript

// ANIMATION SCRIPTS

            window.addEventListener("load", function() {

							// Background image animation

							 document.querySelector(".sectionBanner .bgImg").style.cssText += 'transform: scale(1)';

							// Box DSC animation

              document.querySelector(".sectionBanner h1").style.cssText += 'transform: translateY(0%); opacity: 1;';
              document.querySelector(".sectionBanner p").style.cssText += 'transform: translateY(0%); opacity: 1;';
              document.querySelector(".sectionBanner .imgLogo").style.cssText += 'opacity: 1;';
              document.querySelector(".sectionBanner .line").style.cssText += 'height: 100px;';
              
              // Categories slide animation
              
              document.querySelector(".sectionBanner .categoriesGroup:nth-child(1)").style.cssText += 'max-height: 200px;';
              document.querySelector(".sectionBanner .categoriesGroup:nth-child(2)").style.cssText += 'max-height: 200px;';
              document.querySelector(".sectionBanner .categoriesGroup:nth-child(3)").style.cssText += 'max-height: 200px;';
              
              
            });