css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <head>
  <link href='https://fonts.googleapis.com/css?family=Roboto|Electrolize' rel='stylesheet' type='text/css' />
</head>

<body>
  <div id="wrapper">
    <div id="life" class="menu-container" tabindex="1">
      <div class="label">life</div>
      <div class="tile"><i class="icon-user"></i></div>
      <div class="bar">
        <div class="buttons">
          <!-- Image links here -->
        </div>
      </div>
    </div>
    <div id="work" class="menu-container" tabindex="2">
      <div class="label">work</div>
      <div class="tile"><i class="icon-briefcase"></i></div>
      <div class="bar">
        <div class="buttons">
          <!-- Image links here -->
        </div>
      </div>
    </div>
    <div id="play" class="menu-container" tabindex="3">
      <div class="label">play</div>
      <div class="tile"><i class="icon-gamepad"></i></div>
      <div class="bar">
        <div class="buttons">
          <!-- Image links here -->
        </div>
      </div>
    </div>
    <div id="talk" class="menu-container" tabindex="4">
      <div class="label">talk</div>
      <div class="tile"><i class="icon-comments"></i></div>
      <div class="bar">
        <div class="buttons">
          <!-- Image links here -->
        </div>
      </div>
    </div>
    <div id="link" class="menu-container" tabindex="5">
      <div class="label">links</div>
      <div class="tile"><i class="icon-link"></i></div>
      <div class="bar">
        <div class="buttons">
          <p>COMING SOON</p>
        </div>
      </div>
    </div>
  </div>
  <audio id="secret-found" preload="auto">
    <source src="http://www.nickbrombal.com/audio/ZSS_Secret.mp3"></source>
    <source src="http://www.nickbrombal.com/audio/ZSS_Secret.ogg"></source>
  </audio>
</body>
            
          
!
            
              @import "compass/css3";

* { margin: 0; padding: 0; border: 0; outline: 0; }

body {
  background: #444444 url("http://nickbrombal.com/images/bg_pixel-grey.jpg") repeat fixed;
}

#wrapper {
  margin-top: 100px;
}

.menu-container {
  margin: 10px auto;
  width: 64px;
  height: 64px;
  white-space: nowrap;
  box-shadow: 3px 3px #2E2E2E;
  .label {
    display: none;
    position: absolute;
    font: 26px/64px electrolize;
    width: 64px;
    text-align: center;
    color: white;
  }
  .tile {
    float: left;
    height: 64px;
    width: 64px;
  }
  .bar {
    display: inline-block;
    height: 64px;
    vertical-align: top;
    width: 0px;
    overflow: hidden;
    background: #777;
    .buttons {
      width: 300px;
      height: 64px;
      text-align: center;
      img {
        height: 48px;
        padding: 8px 0;
      }
      p {
        font: 12px/64px roboto;
        color: #fff;
        letter-spacing: 3px;
      }
    }
  }
}

/* Tile colouring */
#life .label, #life .tile { background: #52CC5C; }
#work .label, #work .tile { background: #CC5252; }
#play .label, #play .tile { background: #52A3CC; }
#talk .label, #talk .tile { background: #CCCC52; }
#link .label, #link .tile { background: #7C22D6; }

/* Styling for font text icons */
[class^="icon-"] {
  display: inline-block;
  width: 100%;
  line-height: 64px;
  text-align: center;
  height: 64px;
  font-size: 37px;
  background: -webkit-linear-gradient(#fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  &:before { display: initial; }
}

/* Vertical adjustments to font text icons */
.icon-briefcase { line-height: 68px; }
.icon-gamepad { line-height: 60px; }
.icon-comments { line-height: 62px; }
.icon-link { line-height: 66px; }

/* Hide the secret (shh!) menu */
#link { display: none; }
            
          
!
            
              $(document).ready(function() { 
  // Perform animations on menu containers and items
  $('.menu-container').hover(function() { // Tile animations on hover, for desktop browsers
    category = '#' + this.id; 
    $(category + ' .label').stop().animate({width:'100px'}, {queue: false, duration: 300}).fadeIn();
    $(category + ' .tile').stop().animate({width:'100px'}, {queue: false, duration: 300});
    $(category + ' .bar').stop().animate({width:'300px'}, {queue: false, duration: 300});
    $(this).stop().animate({width:'400px'}, {queue: false, duration: 300}); 
  }, function() { // Tile reset on unhover, for desktop browsers
    $(category + ' .label').stop().animate({width:'64px'}).fadeOut({queue: false});
    $(category + ' .tile').stop().animate({width:'64px'});
    $(category + ' .bar').stop().animate({width:'0px'});
    $(this).stop().animate({width:'64px'});
  }).focus(function() { // Tile animation on focus (click), for mobile browsers
    category = '#' + this.id;
    $(category + ' .label').stop().animate({width:'100px'}, {queue: false, duration: 300}).fadeIn();
    $(category + ' .tile').stop().animate({width:'100px'}, {queue: false, duration: 300});
    $(category + ' .bar').stop().animate({width:'300px'}, {queue: false, duration: 300});
    $(this).stop().animate({width:'400px'}, {queue: false, duration: 300});
  }).blur(function() { // Tile reset on blur (unclick), for mobile browsers
    $('.label').stop().animate({width:'64px'}, {queue: false, duration: 300}).fadeOut({queue: false});
    $('.tile, .menu-container').stop().animate({width:'64px'}, {queue: false, duration: 300});
    $('.bar').stop().animate({width:'0px'}, {queue: false, duration: 300}); 
  });
        
  // If possible, use event listener for secret menu access
  if (window.addEventListener) {
    // Define holder for pressed keys, marker for secret status, and code sequence.
    var pressed = [];
    var status = 'hidden';
    var konamiCode = '38,38,40,40,37,39,37,39,66,65';
    // Listen for key presses and record their codes in "pressed" array
    window.addEventListener('keydown', function(k) {
      pressed.push(k.keyCode);
      // The first time the user enters the correct sequence...
      if (pressed.toString().indexOf(konamiCode) >= 0 && status == 'hidden') {
        // Reveal secret, then clear array and change status
        surprise();
        pressed = [];
        status = 'found';
      }
    }, true);
  }
  
  // Reveal secret menu and play sound
  var surprise = function() {
    $('#link').fadeIn();
    $('#secret-found')[0].play();
  };
}); 
            
          
!
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.
Loading ..................

Console