Shopify Template Code - 3

Shopify Template Code - 3

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>Rapid Prototyping</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Example for rapid prototyping with CSS Grid Layout with focus on 'grid areas'.">

<style>
body, .topbar, header, nav, .hero, aside, main, .teaser, footer{
  background-color: #222;
}
body, .button, .section h3 {
  font-family: Georgia, serif;
}
body, .button {
  color: whitesmoke;
}
body {
  font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
  line-height: 1.6;
  width: 100%;
  margin: 0;
  padding: 0;
}
.topbar {
  grid-area: topbar;
}
header {
  grid-area: header;
}
nav {
  grid-area: nav;
}
.hero {
  grid-area: hero;
}
.featured {
  grid-area: featured;
}
main {
  grid-area: main;
}
aside {
  grid-area: aside;
}
.teaser {
  grid-area: teaser;
}
footer {
  grid-area: footer;
}

/* Styles for the grid container */
.grid-container {
  display: grid;
   /* Styles for the placement of the grid areas */
  grid-template-areas:
    "topbar"
    "header"
    "nav"
    "hero"
    "featured"
    "main"
    "aside"
    "teaser"
    "footer";
  grid-gap: .5rem;
  padding: .25rem;
}
@media only screen and (min-width: 550px) {
  .grid-container {
    grid-template-columns: repeat(2,1fr);
    grid-template-areas:
      "topbar topbar"
      "header header"
      "nav nav"
      "hero hero"
      "featured featured"
      "main main"
      "aside ."
      "teaser teaser"
      "footer footer";
  }
}
@media only screen and (min-width: 800px) {
  .grid-container {
    grid-template-columns: repeat(3,1fr);
    grid-template-areas:
      "topbar topbar topbar"
      "header header header"
      "nav nav nav"
      "hero hero hero"
      "featured featured featured"
      "aside main main"
      "teaser teaser teaser"
      "footer footer footer";
  }
}

/* Styles for the grid items */
.grid-box {
  padding: .5rem;
}
/* Styles for the HTML elements */


/* Defining the subgrid areas */
.topbar_box_1 {
  grid-area: topbar_box_1;
}
.topbar_box_2 {
  grid-area: topbar_box_2;
}
.topbar_box_3 {
  grid-area: topbar_box_3;
}
.topbar_box_4 {
  grid-area: topbar_box_4;
}
/* Styles for the nested grid container */
.sub_grid_topbar {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  grid-template-areas:
    "topbar_box_1 topbar_box_2"
    "topbar_box_3 topbar_box_4";
}
/* Media query for the nested grid container */
@media only screen and (min-width: 800px) {
  .sub_grid_topbar {
    grid-template-columns: repeat(4,1fr);
    grid-template-areas:
      "topbar_box_1 topbar_box_2 topbar_box_3 topbar_box_4";
  }
}

/* Styles for the sub-grid items */
.sub-grid-box {
  padding: .5rem;
  background-color: #7F7F7F;
  color: #fff;
}


.section h3, {
  color: #d00;
}
.button {
  background-color: #d00;
  color: whitesmoke;
}
.new {
  background-color: darkslategray;
}
.button:hover {
  background: #FAEBD7;
  color: #444;
}
.section h3, .new {
  color: burlywood;
}

.button {
  display: inline-block;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-align: center;
  padding: 0.75em 2em;
  cursor: pointer;
  box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.2);
  width: fit-content;
}

.block {
  display: block;
  width: 100%;
  border: none;
}

.new {
  padding: 0.5em 1em;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  font-size: 0.85em;
  width: fit-content;
}

.section {
  padding: 4em 0;
}
.section h3 {
  font-size: 2em;
  line-height: 1.5em;
  font-weight: 500;
}
.section .button {
  margin: 1em 0;
}

.section.teaser {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.section.teaser.top-teaser .sectionImg {
  background: url("converting_traffic/1.webp") no-repeat;
  background-size: cover;
  background-position: center center;
  width: 100%;
  height: 450px;
  grid-column: 1/7;
}
.section.teaser.top-teaser .sectionCopy {
  grid-column: 8/12;
}
.section.teaser.bottom-teaser .sectionImg {
  background: url("converting_traffic/2.webp") no-repeat;
  background-size: cover;
  background-position: center 10%;
  width: 100%;
  height: 450px;
  grid-column: 1/7;
}
.section.teaser.bottom-teaser .sectionCopy {
  grid-column: 8/12;
}
.section.teaser.middle-teaser .sectionImg {
  background: url("converting_traffic/4.webp") no-repeat;
  background-size: cover;
  width: 100%;
  height: 450px;
  grid-column: 7/13;
  grid-row: 1/2;
}
.section.teaser.middle-teaser .sectionCopy {
  grid-column: 2/6;
}

@media (max-width: 700px) {
  :root {
    padding: 10%
  }

  .section {
    padding: 2em 0;
  }

  .block {
    display: block;
    width: 70%;
    border: none;
  }

  .new {
    margin: auto;
  }

  .section.teaser.mobileCenter {
    grid-template-rows: 1fr 1fr;
    text-align: center;
  }
  .section.teaser.mobileCenter .sectionImg {
    grid-column: 1/13;
    grid-row: 1/2;
    height: 100%;
  }
  .section.teaser.mobileCenter .sectionCopy {
    grid-column: 2/12;
    grid-row: 2/3;
    margin-top: 2em;
    padding: 0;
  }
 
}


</style>

</head>
  <body>
      <div class="grid-container">
            <div class="grid-box topbar sub_grid_topbar">
                <div class="topbar_box_1">
                  Phone #
                </div>
                <div class="topbar_box_2">
                  Email
                </div>
                <div class="topbar_box_3">
                </div>
                <div class="topbar_box_4">
                  Login
                </div>
          </div>
            <header class="grid-box header">
                  Logo
            </header>
            <nav>
             Nav
            </nav>
            <div class="grid-box hero">
                 Hero image
           </div>
           <div class="featured">
                <section class="section teaser top-teaser mobileCenter">
                       <div class="sectionImg"></div>
                       <div class="sectionCopy" data-aos="fade-up">
                         <div class="new">
                           <span>Just In!</span>
                         </div>
                         <h3>Fall/Winter Yarns</h3>
                         <p>New fibers and colors to fit a moody Winter palette. Knit, crochet, and macrame with our range of earth-friendly yarns. </p>
                         <a href="#" class="button block">Shop Bundles</a>
                       </div>
                  </section>
                  <section class="section teaser middle-teaser mobileCenter">
                         <div class="sectionImg"></div>
                         <div class="sectionCopy" data-aos="fade-up">
                           <h3>Knit 1, Purl 2</h3>
                           <p>Dive into a new project with easy to follow patterns in a range of styles for beginning to advanced knitters. </p>
                           <a href="#" class="button block">Shop Patterns</a>
                         </div>
                  </section>
                  <section class="section teaser bottom-teaser mobileCenter">
                         <div class="sectionImg"></div>
                         <div class="sectionCopy" data-aos="fade-up">
                           <h3>Cozy Up</h3>
                           <p>One-of-a-kind hats, scarves, and sweaters to keep you looking fine and feeling cozy.</p>
                           <a href="#" class="button block">Shop Accessories</a>
                         </div>
                  </section>
           </div>
           <div class="grid-box teaser">
                  Main
           </div>
           <main class="grid-box">
                   
           </main>
           <aside class="grid-box">
              <p>nav</p>
           </aside>
           <div class="teaser">
              <p>
                Call to action
              </p>
           </div>    
           <footer class="grid-box">
              <p>Footer</p>
           </footer>
       </div>
  </body>
</html>

Free shipping when you spend $50 or more.

Shop Now