Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                 <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Free code camp concept landing page</title>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans&family=Rubik&display=swap" rel="stylesheet">
  </head>
  
  
  <body>
    <header id="header" class="sticky">
        <div class="container row" >
           <button class="nav-toggle" aria-label="open navigation">
        <span class="hamburger"></span>
     </button>
    <a class="logo" href="#">
  <img id="header-img" src="https://i.postimg.cc/3RwW26TM/bonlogo-small.png" alt="bon-logo">
     </a>
          
        <nav id="nav-bar">  
          <ul class="nav-list">
            <li class="nav-item" ><a href="#link-to-home" class="nav-link">Home</a>
            <li class="nav-item"><a href="#link-to-about" class="nav-link">About</a>
            </li>
            <li class="nav-item"><a href="#link-to-features" class="nav-link">Features</a>
            <li class="nav-item"><a href="#link-to-pricing" class="nav-link">Pricing</a>
            </li>
          </ul>
        </nav> <!--closes "container"-->
      </div>
     </header>
    
    <main class="hero">
      <div class="container">
    <form id="form" action="https://www.freecodecamp.org/email-submit" method="post">
      <label for="email" class="email"><a id="link-to-home">Join Our Newsletter</a></label>
      <input type="email" id="email" name="email" placeholder="enter your email" required> 
      <input type="submit" id="submit" value="Join">
        </form>
      </div> <!--closes "container"-->
      
      <div class="container about">
        <p><a id="link-to-about">Bon is a brand new virtual shopping experience in Whistler, BC. Offering thoughtfully picked treats for creating the perfect gift, Bon remains mindful of the environment and supportive of small, local businesses and artists.</a></p>
      </div>
 
    
  <section class= "sirene"> <!--background/padding-->
    <div class="container"><!--container-->
      <div class="sirene-wrapper">
      <div class="sirene-video"> <!--div for video-->
        <iframe id="video" src="https://player.vimeo.com/video/284544767?color=ffffff&byline=0&portrait=0" width="640" height="337" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
    </div> <!--closes sirene-video-->

      <div class="sirene-product">
        <h2>Introducing One Of Our Products</h2>
    <p>Sirene Chocolate carefully sources cocoa beans from cocoa farms growing great tasting beans in an ethical way. Then each delicious direct trade bean is crafted to its full chocolate-y potential in a custom chocolate workshop based in Victoria, Canada.</p>
         </div> <!--closes sirene-product-->
        </div> <!--closes sirene-wrapper-->
    </div> <!--closes container-->
      </section><!--closes sirene-->
  
  
    <div class="container row">
      <div>
    <img class="product" src="https://i.postimg.cc/gJ9JHtpF/Pin-Clipart-com-college-campus-clipart-2852534.png" alt="locally sourced icon image">
      </div>
      
     <div class="product-features">
       <h2><a id="link-to-features">Locally Sourced</a></h2>
  <p>Ipsam optio voluptas in libero aspernatur nostrum! Phasellus et ullamcorper lorem. Phasellus nec risus iaculis, lobortis diam vel, facilisis purus.</p>
    </div>
     </div><!--closes container-->
  
    
  
   <div class="container row">
    <div>
      <img class="product" src="https://i.postimg.cc/sgV5pXc9/recycling-symbol-icon-solid-dark-green.png" alt="recycle-logo">
     </div>
       <div class="product-features">
  <h2>Ethically Packaged</h2>
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Duis suscipit posuere posuere. Ut ac diam at orci placerat egestas. Donec mauris dui, tristique ut mi at, lacinia finibus felis.</p>
      </div>
    </div> <!--closes container-->
     
   <div class="container row">
    <div>
        <img class="product" src="https://i.postimg.cc/4xNhY0fW/Pin-Clipart-com-loyalty-clipart-604220.png" alt="handshake">
    </div>
  <div class="product-features">
  <h2>Hand Delivered</h2>
  <p> Omnis doloribus molestias impedit optio accusamus sequi facilis rerum nulla earum eligendi magnam, doloremque laborum.</p>
  </div>
</div> <!--closes container-->
      </main>

    
  <aside class="aside-bg"> 
    <div class= "aside">
      <div class="container row">
      <div class= "aside-border">
        <h3><a id="link-to-pricing">Cafe</a></h3>
    <p>$75</p>
      <ul class="aside-list">
        <li>Lorem ipsum dolor sit amet</li>
        <li>Consectetur adipisicing elit</li>
        <li>Laboriosam quaerat sapiente</li>
        <li>Minima nam minus similique</li>
      </ul>
    </div>
    
    <div class="aside-border">
    <h3>Tiny House</h3>
    <p>$150</p>
      <ul class="aside-list">
        <li>Illum architecto et</li>
        <li>Incidunt vitae quae</li>
        <li>Facere ducimus nostrum aliquid</li>
        <li>Dolorum veritatis dicta</li>
      </ul>
    </div>
    
    <div class="aside-border">
    <h3>Pantry Essentials</h3>
    <p>$100</p>
      <ul class="aside-list">
        <li>Tenetur laborum quod</li>
        <li>Excepturi recusandae porro sint</li>
        <li>voluptatem corporis dolorum</li>
        <li>Modi velit odio nam nulla</li>
      </ul>
      </div> <!--closes aside-->
    </div> <!--closes container-->
    </div> <!--closes aside-bg-->
  </aside>
  
    <footer>
      <div class="footer"><!--for bg-->
        <div class="container">
        <div class="footer-nav">
         <ul class="footer-list">
            <li class="footer-item"><a href="#" class="footer-link">Privacy</a></li>
            <li class="footer-item"><a href="#" class="footer-link">Terms</a></li>
            <li class="footer-item"><a href="#" class="footer-link">Contact</a></li>
          </ul>
        </div>
        <span class="copyright">
          Copyright, 2021 Bon Whistler
          </span>
      </div><!--closes container-->
      </div> 
      </footer>
  </body>
</html>
              
            
!

CSS

              
                /*
pink:#e3c0b1
green:#40752e
dark brown (txt) #241606
light grey: #e5e6e1
cream:#f7f2d7

font-family: 'Noto Sans', sans-serif;
font-family: 'Rubik', sans-serif;
*/

*, 
*::before, 
*::after {
  box-sizing: border-box;
  margin: 0;  
}


/* Global elements
====================
====================*/

body {
  Font-Family: 'Noto Sans', sans-serif;
  Font-Size: 16px;
}

h2, h3{
  margin-bottom: 1em;
}


/* Global styles
====================
====================*/

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Backgrounds
====================
====================*/

#header {
 background-color:#e3c0b1;
}

.hero {
  background-color:#f7f2d7;
  color: #241606;
  padding: 2em 0; /*top and bottom*/
}

.aside-bg {
  background-color: #e5e6e1;
  color: #241606;
  text-align: center;
 
}

.about {
  padding: 0 2.5em; /*left and right*/
  text-align: center;
}


.footer {
  background-color:#f7f2d7;
  padding: .30em;
}

/* Typography
====================
====================*/

.aside-list {
  list-style: none; 
  line-height: 1.5em;
  margin: 0 auto;
  padding: 0;
}

.email {
  font-family: 'Rubik', sans-serif;
  text-transform: uppercase;
}
.product-features {
  line-height: 1.5em;
  text-align :center; 
  padding: 1.5em;
}


/* Components
====================
====================*/
#form {
  margin: 0 auto;
  padding: 1.5em;
  text-align: center;
}

#submit {
  font-family: 'Rubik', sans-serif;
  text-transform: uppercase;
  border-radius: 20px;
  background-color: #e3c0b1;
  border: 0px;
  font-size: 18px;
}

/* images + Video
====================
====================*/
#header-img {
  display: block;
  width: 7em;
  margin: 0 auto;
  padding:.75em 0; /*top and bottom*/
}

.sirene-video {
 margin-top: 1em;
}

#video {
  border: 0;
  width: 100%;
  height: 100%;
}

.aside-border {
  outline: 2px solid #241606;
  width: 100%; /* takes up 100% of container div*/
  margin: 3% 0 4% 0;
  padding: 2em 0;
}

/* Navigation
====================
====================*/
 #nav-bar {
  width: 100%;
  max-width: 300px;
  visibility: hidden;
  height: 0;
  position: absolute;
  padding: .25em;
}

.nav-toggle {
  cursor: pointer;
  border: 0;
  width: 3rem;/*adjusting this doesnt help overflow*/
  height: 3rem;
  padding: 0em;
  border-radius: 50%;
  background: transparent;
  color: white;
  transition: opacity 250ms ease;
  position: absolute;
}

.nav-toggle:focus,
.nav-toggle:hover {
  opacity: 0.75;
}

.hamburger {
  width: 50%;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  margin: 0 auto;
  height: 3px;
  background: #241606;
}

.hamburger::before,
.hamburger::after {
  content: "";
  width: 100%;
}

.hamburger::before {
  transform: translateY(-6px);
}

.hamburger::after {
  transform: translateY(3px);
}

.nav--visible {
  visibility: visible;
  height: auto;
  position: relative;
}

#nav-bar.nav--visible {
  visibility: visible;
  height: auto;
  position: relative;
}

.nav-list {
 margin-top:-15px;
 list-style: none;
}

.nav-item {
  margin-bottom:.30em;
}

.nav-link {
  text-decoration: none;
  color: #241606;
  text-transform: uppercase;
  Font-Family: 'Rubik', Sans-Serif;
  font-size: 18px;
}

.nav-link:hover,
.nav-link:focus {
  opacity: 0.75;
}

/*-------------------------*/

.footer-nav {
  display: flex;
  justify-content: flex-end;
}

.footer-list {
  list-style: none;
  line-height: 1.5em;
  display: flex;
}

.footer-item {
  padding: .50em;
}

.footer-link {
  text-decoration: none;
  color: #241606;
  
}

.footer-link:hover,
.footer-link:focus {
  opacity: .60; 
}

/*===================*/
 
.sirene-product { 
   padding: 1em;
  }

.product {
  max-width: 100%;
  width: 95px; /*image width*/
  display: block;
  margin: 0 auto;
  margin-top: 1.5em; 
}

.aside {
  margin: 0 auto;
  padding: 2em 0; /*top and bottom*/
}

.copyright {
  font-size: .75rem;
  display: flex;
  padding:.50em .75em ;
  align-items: center;
  justify-content: flex-end;  
}


@media (min-width:700px) { /*desktop version, changing p does not help mobile overflow*/
  
  .row {
    display: flex;
    justify-content: space-between; /*this places nav-list to right*/
  }
  
  .sticky {
    position:sticky; 
    top: 0;
    width: 100%;
}
  
  #header-img {
    width: 5em;
    margin: 1.5em;
  }  
  
 .nav-toggle {
    display: none;
  }
  
  #nav-bar {
    visibility: visible;
    display: flex;
    align-items: center; /*y axis alignment*/
    height: auto;
    position: relative;
    justify-content: flex-end;
  }
   
  .nav-list { 
    display:flex;   
  }
  
  
  .nav-item { 
     margin: 0 0 0 1.5em;
  }
  
    /*------------------------------*/
   
  .sirene {
   padding:4em;
  }
  
  .sirene-wrapper {
   display: flex;
   justify-content: space-around;
  }
  
 .sirene-video {
   margin: 0;
   padding: 0;
   width: 60%;
  }
  
  #video {
    height: 100%;
    border: 0;
  }
  
  .sirene-product { /*flex item to right of vid*/ 
    margin: 0;
    align-self: center;
    width: 35%;
  }
  
  /*------------------------------*/
  
  .product {
    width: 20%;
    max-width: 400px;
    margin-top: 2em;
    margin-bottom: 2em;
}
  
  .product-features {
    width: 60%;  
}
 
  .aside-border {
  outline: 3px solid #241606;
  width: 30%;
  margin: 0 2% 0 2%;
  padding: 2em;
}
  
  .footer-list {
    display: flex;
    margin: 0;
    align-items: center;
    justify-content: flex-end;
    width: 95%;
  }
  
  .footer-item {
    margin:0 0 0 .75em;
}
  
  .footer-link {
    display: flex;
    justify-content: flex-end;
  }
  
  .copyright {
    display: flex;
    margin: 0;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.8125rem;
  }
}

              
            
!

JS

              
                

const navToggle = document.querySelector(".nav-toggle");
const navBar = document.querySelector("#nav-bar");

navToggle.addEventListener("click", () => {
  navBar.classList.toggle("nav--visible");
});
              
            
!
999px

Console