123

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              %div.wrapper
  %div.masthead
    %header
      %h1 HAML Responsive Wireframe
       
    %nav.topnav
      %a{:href=>"#"} home
      %a{:href=>"#"} shop
      %a{:href=>"#"} blog
      %a{:href=>"#"} about
      %a{:href=>"#"} contact
      %a{:href=>"#"} submenu
      <!-- %a#menuToggleBtn {:href=>"#" onclick="menuToggle()"} submenu -->

  %div.container

    %button#toggleTabletBtn.toggleTabletBtn

    %div#secondaryNav.sideBar.toggleDisplay
      %ul
        %li
          %a.active{:href=>"#"} category title
        %li
          %a{:href=>"#"} link one
        %li
          %a{:href=>"#"} link two
        %li
          %a{:href=>"#"} link three
        %li
          %a{:href=>"#"} link four
      
      %ul
        %li
          %a.active{:href=>"#"} category title
        %li
          %a{:href=>"#"} link one
        %li
          %a{:href=>"#"} link two
        %li
          %a{:href=>"#"} link three
        %li
          %a{:href=>"#"} link four
      
      %ul
        %li
          %a.active{:href=>"#"} category title
        %li
          %a{:href=>"#"} link one
        %li
          %a{:href=>"#"} link two
        %li
          %a{:href=>"#"} link three
        %li
          %a{:href=>"#"} link four

      %div#bottom
      %ul
        %li
          %a.active{:href=>"#"} category title
        %li
          %a{:href=>"#"} link one
        %li
          %a{:href=>"#"} link two
        %li
          %a{:href=>"#"} link three
        %li
          %a{:href=>"#"} link four
        %li
          %a{:href=>"#"} link five
        %li
          %a{:href=>"#"} link six
        %li
          %a{:href=>"#"} link seven
        %li
          %a{:href=>"#"} link eight
        %li
          %a{:href=>"#"} link nine
        %li
          %a{:href=>"#"} link ten
        %li
          %a{:href=>"#"} link eleven
        %li
          %a{:href=>"#"} link twelve
      
    %div.mainContent
      %div#showDate
      %p
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nunc ac sem pulvinar venenatis. Nullam eleifend, eros id pretium dignissim, massa erat lobortis urna, ac aliquet tellus nisl et urna. Phasellus odio risus, vestibulum non accumsan
        non, auctor in diam. Donec iaculis urna et tincidunt aliquet. Maecenas pellentesque tempus scelerisque. Aliquam in neque congue, rhoncus ante et, condimentum est. Sed ut dignissim velit. Quisque sit amet ante quis metus congue suscipit. Aenean
        metus velit, condimentum nec mollis ac, aliquam a dui. Phasellus sollicitudin turpis felis, at lacinia justo rutrum eget. Morbi ut facilisis quam, quis auctor nisl. Aenean elementum maximus risus ut vehicula. Sed aliquet vel quam at efficitur.
        Suspendisse imperdiet mollis ipsum quis feugiat. Cras sit amet imperdiet velit, et efficitur nunc.
        \
      %p
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nunc ac sem pulvinar venenatis. Nullam eleifend, eros id pretium dignissim, massa erat lobortis urna, ac aliquet tellus nisl et urna. Phasellus odio risus, vestibulum non accumsan
        non, auctor in diam. Donec iaculis urna et tincidunt aliquet. Maecenas pellentesque tempus scelerisque. Aliquam in neque congue, rhoncus ante et, condimentum est. Sed ut dignissim velit. Quisque sit amet ante quis metus congue suscipit. Aenean
        metus velit, condimentum nec mollis ac, aliquam a dui. Phasellus sollicitudin turpis felis, at lacinia justo rutrum eget. Morbi ut facilisis quam, quis auctor nisl. Aenean elementum maximus risus ut vehicula. Sed aliquet vel quam at efficitur.
        Suspendisse imperdiet mollis ipsum quis feugiat. Cras sit amet imperdiet velit, et efficitur nunc.
        \
      %h3 Lorem Ipsum
      %hr
      %p
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nunc ac sem pulvinar venenatis. Nullam eleifend, eros id pretium dignissim, massa erat lobortis urna, ac aliquet tellus nisl et urna. Phasellus odio risus, vestibulum non accumsan
        non, auctor in diam. Donec iaculis urna et tincidunt aliquet. Maecenas pellentesque tempus scelerisque. Aliquam in neque congue, rhoncus ante et, condimentum est. Sed ut dignissim velit. Quisque sit amet ante quis metus congue suscipit. Aenean
        metus velit, condimentum nec mollis ac, aliquam a dui. Phasellus sollicitudin turpis felis, at lacinia justo rutrum eget. Morbi ut facilisis quam, quis auctor nisl. Aenean elementum maximus risus ut vehicula. Sed aliquet vel quam at efficitur.
        Suspendisse imperdiet mollis ipsum quis feugiat. Cras sit amet imperdiet velit, et efficitur nunc.
        \
      %p
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nunc ac sem pulvinar venenatis. Nullam eleifend, eros id pretium dignissim, massa erat lobortis urna, ac aliquet tellus nisl et urna. Phasellus odio risus, vestibulum non accumsan
        non, auctor in diam. Donec iaculis urna et tincidunt aliquet. Maecenas pellentesque tempus scelerisque. Aliquam in neque congue, rhoncus ante et, condimentum est. Sed ut dignissim velit. Quisque sit amet ante quis metus congue suscipit. Aenean
        metus velit, condimentum nec mollis ac, aliquam a dui. Phasellus sollicitudin turpis felis, at lacinia justo rutrum eget. Morbi ut facilisis quam, quis auctor nisl. Aenean elementum maximus risus ut vehicula. Sed aliquet vel quam at efficitur.
        Suspendisse imperdiet mollis ipsum quis feugiat. Cras sit amet imperdiet velit, et efficitur nunc.
        \
      %p
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nunc ac sem pulvinar venenatis. Nullam eleifend, eros id pretium dignissim, massa erat lobortis urna, ac aliquet tellus nisl et urna. Phasellus odio risus, vestibulum non accumsan
        non, auctor in diam. Donec iaculis urna et tincidunt aliquet. Maecenas pellentesque tempus scelerisque. Aliquam in neque congue, rhoncus ante et, condimentum est. Sed ut dignissim velit. Quisque sit amet ante quis metus congue suscipit. Aenean
        metus velit, condimentum nec mollis ac, aliquam a dui. Phasellus sollicitudin turpis felis, at lacinia justo rutrum eget. Morbi ut facilisis quam, quis auctor nisl. Aenean elementum maximus risus ut vehicula. Sed aliquet vel quam at efficitur.
        Suspendisse imperdiet mollis ipsum quis feugiat. Cras sit amet imperdiet velit, et efficitur nunc.
        \
      %p
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla in nunc ac sem pulvinar venenatis. Nullam eleifend, eros id pretium dignissim, massa erat lobortis urna, ac aliquet tellus nisl et urna. Phasellus odio risus, vestibulum non accumsan
        non, auctor in diam. Donec iaculis urna et tincidunt aliquet. Maecenas pellentesque tempus scelerisque. Aliquam in neque congue, rhoncus ante et, condimentum est. Sed ut dignissim velit. Quisque sit amet ante quis metus congue suscipit. Aenean
        metus velit, condimentum nec mollis ac, aliquam a dui. Phasellus sollicitudin turpis felis, at lacinia justo rutrum eget. Morbi ut facilisis quam, quis auctor nisl. Aenean elementum maximus risus ut vehicula. Sed aliquet vel quam at efficitur.
        Suspendisse imperdiet mollis ipsum quis feugiat. Cras sit amet imperdiet velit, et efficitur nunc.

  %footer#thisFooter
    %div

  %div#superFooter
    %div.row
      %section.colOne
        %h3
        Headline
        %span
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. \
        %a{:href=>"#"} read more

      %section.colTwo
        %h3
        Headline
        %span
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. \
        %a{:href=>"#"} read more
      
      %section.colThree
        %h3
        Headline
        %span
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. \
        %a{:href=>"#"} read more
        <!-- END ROW -->
    
    %div.row
      %section.colOne
        %h3
        Headline
        %span
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. \
        %a{:href=>"#"} read more

      %section.colTwo
        %h3
        Headline
        %span
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. \
        %a{:href=>"#"} read more
      
      %section.colThree
        %h3
        Headline
        %span
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. \
        %a{:href=>"#"} read more
        <!-- END ROW -->

  %button#arrowToggle.exploreBtn
    %a{href: '#', onclick: 'footerToggle(); return false;'}
      Explore
      
            
          
!
            
              $maroonRed: #703030;
$darkBlue: #2F343B;
$creamTan: #E3CDA4;
$mildGrey: #7E827A;
$medSize: 10pt;
$upperCase: uppercase;
$sixHundred: 600;
$hundredPercent: 100%;

@mixin column( $float, $width ) {
  float: $float;
  width: $width;
}

@mixin position( $position, $left, $right, $margin) {
  position: $position;
  left: $left;
  right: $right;
  margin: $margin;
}

*, *:after, *:before { box-sizing: inherit; }

a { text-decoration: none; }

.container {
  position: relative;
  overflow: hidden;
  height: 71%;
  margin: 3%;
  border: 1px solid $darkBlue;
}
.container::after {
  content: "";
  clear: both;
}
.bottomNav {
  overflow: hidden;
  background-color: #333;
  text-align: left;
}
.bottomNav a {
  text-transform: lowercase;
  font-size: 11pt;
}
.colOne {
  background-color: $creamTan;
  font-size: 11pt;
  line-height: 26px;
  color: $darkBlue;
  font-weight: $sixHundred;
  height: $hundredPercent;
  text-align: left;
  border: 2px solid $darkBlue;
  padding: 0 2%;
}
.colOne {
  @include column(left, 33%);
}
.colTwo {
  @include column(none, 34%);
  @extend .colOne;
  display: inline-block;
}
.colThree {
  @include column(right, 33%);
  @extend .colOne;
}
.exploreBtn {
  @include position( absolute, 0, 0, 0 auto );
  width: 20%;
  text-transform: $upperCase;
  background-color: $mildGrey;
  border: none;
  display: block;
  padding: 4px 0;
  color: $creamTan;
  font-size: 80%;
  font-weight: $sixHundred;
  letter-spacing: 2px;
  bottom: 3%;
  border: 2px solid $darkBlue;
}

footer {
  background-color: $darkBlue;
  width: $hundredPercent;
  text-align: center;
  position: relative;
  bottom: 0px;
  height: 10%;
  padding-top: 2%;

    footer a {
      text-transform: $upperCase;
      font-size: 87%;
      float: left;
      display: inline-block;
      color: $creamTan;
      text-align: center;
      padding: 6px 1%;
    }
}

html, body {
  height: $hundredPercent;
  margin: 0;
  padding: 0;
  font-family: 'Raleway', sans-serif;
  line-height: 25px;
  overflow: hidden;
  background-color: $creamTan;
}
html { box-sizing: border-box; }

h1 {
  margin: 0;
  text-transform: $upperCase;
  letter-spacing: 1px;
  font-size: 172%;
  display: table-cell;
  vertical-align: middle;
}
header {
  background-color: $darkBlue;
  color: $creamTan;
  text-align: center;
  display: table-row;
  height: 70%;
  display: table-row;
}

.hideFooter { height: 5% !important; }

li a {
  display: block;
  color: $creamTan;
  padding: 3px 16px;
  text-decoration: none;
  font-size: $medSize;
  text-transform: $upperCase;
}
li a.active {
  background-color: $darkBlue;
  color: $creamTan;
}
li a:hover:not(.active) {
  background-color: $darkBlue;
  color: white;
}
#menuToggleBtn { display: none; }

.masthead {
  height: 13%;
  display: table;
  width: $hundredPercent;
}
.mainContent {
  padding: 0px 2%;
  font-size: 11pt;
  overflow-x: scroll;
  height: $hundredPercent;
  background-color: $creamTan;
}
.row {
  height: 48%;
  width: 98%;
  margin: 0 auto;
}
.sideBar {
  @include column ( right, 30%);
  height: $hundredPercent;
  overflow-x: scroll;
  border-left: 1px solid #0E090F;
}
small {
  position: relative;
  display: table-cell;
  vertical-align: middle;
}

.superFooter {
  position: absolute;
  background: $maroonRed;
  top: 0;
  width: $hundredPercent;
  height: $hundredPercent;
  opacity: .9;
  padding: 1%;

    .superFooter a {
      color: $maroonRed;
      text-transform: $upperCase;
      font-size: 9pt;
      font-weight: $sixHundred;
    }
}

.topnav {
  overflow: hidden;
  background-color: $maroonRed;
  text-align: center;
  border-bottom: 1px solid black;
  height: 30%;
  display: table-row;
}
.topnav a, .bottomNav a {
  display: inline-block;
  color: $creamTan;
  text-align: center;
  padding: 1px 16px 0 16px;
  text-decoration: none;
  font-size: 11pt;
  text-transform: $upperCase;
  font-weight: $sixHundred;
  letter-spacing: .5px;
}
.topnav a:hover {
  background-color: #C77966;
  color: black;
}
.topnav a.active, .bottomNav a.active {
  background-color: #4CAF50;
  color: white;
}

.toggleDisplay { display: block; }

.toggleTabletBtn {
  @include position( absolute, auto, 0, auto );
  width: 8%;
  background-color: $mildGrey;
  height: 27px;
  text-align: center;
  padding: 3px 16px;
  font-size: $medSize;
  text-transform: $upperCase;
  display: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  cursor: pointer;
  color: $creamTan;
}
.toggleTabletBtn::after {
  content: '\000BB';
  font-size: 27pt;
  top: -14px;
  position: relative;
  right: 0px;
}
.toggleTabletBtnEnhance {
  display: none;
  border: 1px solid black;
  -webkit-box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.7);
  -moz-box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.7);
  box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.7);
}
.toggleTabletBtnEnhance::after {
  content: '\000AB';
  font-size: 27pt;
  top: -14px;
  position: relative;
  right: 0px;
}
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  background-color: $maroonRed;
}
.wrapper {
  height: $hundredPercent;
  background-color: $mildGrey;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.xBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 92pt;
  color: #703030;
}

/*
********************************
        MEDIA QUERIES
******************************** */
@media screen and (min-width: 641px) and (max-width: 900px) {
  .colOne, .colTwo, .colThree {
    width: $hundredPercent !important;
    display: block !important;
    float: none !important;
    margin: 20px 0;
  }
  .container {
    margin: 1%;
    height: 75%;
  }

  li a { padding: 1px 7px; }

  li a:hover:not(.active) {
    background-color: $darkBlue;
    color: $creamTan;
  }

  .row { height: auto; }

  .sideBar { display: none; }

  .superFooter { overflow-x: scroll; }

  .toggleDisplay { display: block; }

  .toggleTabletBtn {
    display: block;
    border: none;
    top: 0px;
    right: 0px;
  }
  .toggleTabletBtnEnhance {
    right: 15px;
    top: 10px;
  }
}

@media screen and (max-width: 640px) {
  .active {
    display: block !important;
    width: $hundredPercent !important;
  }
  .container {
    height: 69%;
    margin: 0%;
  }
  .colOne, .colTwo, .colThree {
    font-size: $medSize;
    line-height: 17px;
    font-weight: 300;
  }
  
  .exploreBtn { width: 60%; }
  
  footer { height: 10%; }
  
  #superFooter { height: 90%; }
  
  h1 { font-size: 135%; }
  
  li a { color: $darkBlue; }
  
  li a:hover:not(.active) {
    background-color: $darkBlue;
    color: $creamTan;
  }
  .mainContent {
    width: $hundredPercent;
    margin: 0;
    border: none;
    height: $hundredPercent;
  }
  #menuToggleBtn {
    display: inline-block;
    background-color: $mildGrey;
  }
  .sideBar {
    width: $hundredPercent;
    @include position( absolute, 0, 0, 0 );
    height: $hundredPercent;
    display: block;
    float: none;
  }
  .row {
    width: $hundredPercent;
    height: 50%;
    margin: 0;
  }
  
  .toggleTabletBtn, .toggleDisplay { display: none; }
  
  .topnav a, .bottomNav a {
    text-align: left;
    width: 33.3%;
    font-size: $medSize;
  }
  .masthead { height: 21%; }
  
  ul { background-color: $creamTan; }
}

            
          
!
            
              // NOTES: COMBINE TOGGLE FUNCS BY PASSING ARG OF CLICKED ELEM

// EXPLORER SECTION TOGGLE
function footerToggle() {
  var item = document.getElementById("arrowToggle").childNodes[0];

  if (item.nodeValue == "Explore") {
    item.nodeValue = "Close Explorer";
  } else if (item.nodeValue == "Close Explorer") {
    item.nodeValue = "Explore";
  }

  var myFooter = document.getElementById("superFooter");
  myFooter.classList.toggle("superFooter");
}

function menuToggle() {
  var menuToggle = document.getElementById("secondaryNav");
  menuToggle.classList.toggle("toggleDisplay");
  console.log('menu toggle');
}

// > 640PX && < 900PX TOGGLE SIDEBAR
var tabletBtn = document.getElementById("toggleTabletBtn");
tabletBtn.addEventListener("click", function() {
  tabletBtn.classList.toggle("toggleTabletBtnEnhance");

  var x = document.getElementById("secondaryNav");
  x.classList.toggle("toggleDisplay");
});

//DATE & TIME
var dateTime = document.getElementById('showDate'),
    myDate = new Date(),
    month = myDate.getMonth(),
    year = myDate.getFullYear(),
    weekDay = myDate.getDay,
    monthDay = myDate.getDate(),
    months = ["Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"],
    seconds = myDate.getSeconds(1, 1000);

setInterval(function(){
  console.log(seconds) 
}, 1000)

// dateTime.innerHTML = total;






            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console