Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

              
                <!-- <div id="directions">directions<div> -->
<div class="grid-container">

  <div class="top-left grid">
  </div>
  <div class="top-ctr grid">
  </div>

  <div class="top-right grid">
  </div>
  <div class="mid-left grid">
    <h2>Mid Left</h2>
  </div>
  <div class="mid-ctr grid">

  </div>
  <div class="mid-right grid">
    <h2>Mid right</h2>
  </div>
  <div class="bot-left grid">
    <h2>Mid left</h2>
  </div>
  <div class="bot-ctr grid">
    bot ctr grid
  </div>
  <div class="bot-right grid">
    <h2>bot right</h2>
  </div>
  </body>
  <!-- **************Instructions Btn************ -->
  <svg id="top-menu-btn" preserveAspectRatio="xMidYMid meet" viewBox="0 0 300 300">
    <path fill="coral" d="M150 2C68.3 2 2 68.3 2 150s66.3 148 148 148 148-66.3 148-148S231.7 2 150 2z" />
    <linearGradient id="menu-grad" x1="90.9268" x2="298" y1="173.9316" y2="173.9316" gradientUnits="userSpaceOnUse">
      <stop offset="0" />
      <stop offset="1" stop-opacity="0" />
    </linearGradient>
    <path fill="url(#menu-grad)" d="M90.9 235.4l91 59.1c66.4-15.8 116-69.7 116-146.2 0-6.3-.3-22.5-1-28.7l-91.5-66.3L90.9 235.4z"
    />
    <path fill="#999" stroke="#000" stroke-miterlimit="10" stroke-width="8" d="M202 57v174H95V57h31V46h10.9c.9-6 6.3-11.5 12.9-11.5 6.6 0 12.1 5.5 12.9 11.5h9.3v11h30z"
    />
    <path fill="none" stroke="#4D4D4D" stroke-linecap="round" stroke-miterlimit="10" stroke-width="7" d="M110 110.5h55m-55-28h55m-55 57h55m-55 30h55m-55 32h55"
    />
    <path fill="none" stroke="#4D4D4D" stroke-linecap="round" stroke-miterlimit="10" stroke-width="4.9777" d="M193 66.4l-12.4 20.1-6.6-8.4m19 21.8l-12.4 20-6.6-8.3"
    />
    <g id="close-overlay" class="close-menu" stroke="coral">
      <path fill="black" d="M-.5.5h300v299H-.5z" />
      <path fill="none" stroke-linecap="round" stroke-width="12" d="M293.2 5.8L7.8 294.2M11.5 7.7l279.9 282.7" />
    </g>
  </svg>


<!-- *************DIRECTIONS MENU***************** -->
<div class="steps-menu">
  <button class="step step-1" data-step="step1">1</button>
  <button class="step step-2" data-step="step2">2</button>
  <button class="step step-3" data-step="step3">3</button>
  <button class="step step-4" data-step="step4">4</button>
  <button class="step step-5" data-step="step5">5</button>
  <button class="step step-6" data-step="step6">6</button>
  <article class="step-display"></article>
</div>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
body {
  font-size: 24px;
  background: slategray;
  color: lemonchiffon;
  font-family: Roboto, sans-serif;
  position: relative;
}

#top-menu-btn { /*svg*/
   z-index: 12;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  /* min-width: 40px; */
  /* height: 100%; */

}
.border {
  border: 1px solid white;
}
#close-overlay path {
}

#svg-menu-icon {
width: 100%;
height: 100%;
}

.step-display {
  grid-row: 2;
  grid-column: 1/-1;
  text-align: center;
  font-size: 30px;
  font-weight: lighter;
}


.grid-container {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0 auto;
  height: 100vh;
  width: 100vw;
  display: grid;
  grid-template-columns: 1fr 30vw 30vw 30vw 1fr;
  grid-template-rows: 1fr 30vh 30vh 30vh;
}
button {
   
    border-width: 0;
    box-shadow: inset -4px 4px 12px 0px rgba(0, 0, 0, 0.5);
    text-align: center;
}
button.step {
   z-index: 10;
    color: white;
    font-size: 30px;
}
button:hover {
    border-width: 0;
    box-shadow: -4px 4px 12px 0px rgba(0, 0, 0, 0.5);
    color: navy;
}
div button {
  font-size: 1.5vw;
}
button.directions {
  height: 4vh;
  width: 8vw;
}
div.grid {
  background-color: rgba(133, 198, 173, 0.5);
  padding: 1% 5%;
}
.steps-menu {
width: 100vw;
  background: brown;
  font-size: 18px;
  display: grid;
  grid-template-columns: repeat(6, auto);
  grid-template-rows: repeat(2, 1fr);
  /* grid-gap: 4px; */
  border-width: 0;
  margin: 0;
}
.step-1 {
    background-color: #997e99;
}
.step-2 {
    background-color: #84a8a8;
}
.step-3 {
    background-color: #e6aeae;
}
.step-4 {
    background-color: #bebe9f;
}
.step-5 {
    background-color: #e7ac9e;
}
.step-6 {
    background-color: #93bdc0;
}
.top-ctr {
  grid-row: 2;
  grid-column: 3;
}

.top-right {
  grid-row: 2;
  grid-column: 4;
}

.mid-left {
  grid-row: 3;
  grid-column: 2;
}

.mid-ctr {
  grid-row: 3;
  grid-column: 3;
}

.mid-right {
  grid-row: 3;
  grid-column: 4;
}

.bot-left {
  grid-row: 4;
  grid-column: 2;
}

.bot-ctr {
  grid-row: 4;
  grid-column: 3;
}

.bot-right {
  grid-row: 4;
  grid-column: 4;
}

.top-left {
  grid-row: 2;
  grid-column: 2;
}

h2 {
  font-family: 'Roboto', sans-serif;
  font-weight: lighter;
}

.mid-ctr {
  background-color: #143e61;
  box-shadow: 3px 3px 12px 0px rgba(0, 0, 0, 0.66);
}

              
            
!

JS

              
                !(function() {
  const menuBtn = $('#top-menu-btn');
  const menu = $('.steps-menu');
  const closeBtn = $('#close-overlay path');
  const stepBtn = $('button.step-btn');
  const desc = $('.desc');
  const menuIcon = $('#menu-icon');
  const displayStep = $('.step-display');
  const stepText = displayStep.text();
  var tl = new TimelineMax();
  
/*******Toggles menu & closeBtn******/
  tl
  .from(menu, 1, {width: '0vw',  ease: Elastic.easeOut.config(2, 1) }, '0')
  .from('button', 1, {autoAlpha: 0, ease: Power4.easeInOut }, '-=1')
  .from(closeBtn, .5, { opacity: 0, ease: Power4.easeInOut}, '0')
  .from(displayStep, 1, {x: -250,  ease: Power2.easeInOut}, 0)
  .reverse();

closeBtn.click(function() {
  tl.reversed(!tl.reversed());
});
/***************************************/






/**********Step Functionality**********/
  var steps = {
    step1: "First Break an egg",
    step2: "Then, whisk it with milk",
    step3: "Now, fry it in a pan!",
    step4: "Get a plate!",
    step5: "serve!",
    step6: "eat!"
  };
  const stepGetter = (step)=> steps[step];
  /*grab btns within instructions-menu*/
  var stepBtns = $('.steps-menu button');

  stepBtns.on('click', function() {
    console.log("click")
    let step=$(this).data('step')
    displayStep.text(stepGetter(step))

})
/***************************************/


})();

              
            
!
999px

Console