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.

            
              .heading
  h1 Logo Slider Animation
  .me
  a(href="https://github.com/cmdeveloped" target="_blank")
    i(class='fab fa-github')
  a(href="https://twitter.com/collinscode_" target="_blank")
    i(class='fab fa-twitter')
  a(href="https://codepen.io/collinscode" target="_blank")
    i(class='fab fa-codepen')
  a(href="https://linkedin.com/in/cmdeveloped" target="_blank")
    i(class='fab fa-linkedin')

.container
  .left
    .logo
      h1.brand collins.
      ul.pages
        li#code.page.active code
        li#life.page life
        li#blog.page blog
        li#contact.page contact    
  .right
    .nav
      a(data-logo='#code')
        i(class='fal fa-code-branch')
      a(data-logo='#life')
        i(class='fal fa-male')
      a(data-logo='#blog')
        i(class='fal fa-browser')
      a(data-logo='#contact')
        i(class='fal fa-at')
            
          
!
            
              =bg($a, $b)
  background-size: $a
  background-position: $b
  background-repeat: no-repeat
  
=gradient($a, $b, $c)
  background: $b
  background: linear-gradient($a, $b, $c)
  
=flex($a, $b)
  display: flex
  align-items: $a
  justify-content: $b
  
$color1: #485563
$color2: #29323c

*
  ::-webkit-scrollbar
    display: none

html
  min-height: 100vh
  +gradient(to right, $color1, $color2)
  +flex(center, center)
  body
    font-family: 'Roboto', sans-serif
    +flex(center, center)
    flex-direction: column
    height: 100%
    width: 100%
    .heading
      text-align: center
      color: white
      margin-bottom: 2rem
      p
        margin: 0
      a
        color: #fff
        display: inline-block
        .fab
          margin-right: 0.5rem
          font-size: 1rem
          padding: 0.5rem
          margin-top: 1rem
    
.container
  display: flex
  flex-direction: column
  min-width: 75%
  box-shadow: 0 12px 1rem rgba(0,0,0,0.1)
  transition: 1s
  .left
    padding: 6rem 0
    +flex(center, center)
    width: 100%
    .logo
      +flex(flex-start, center)
      color: white
      &:before
        content: '{{'
        font-size: 4.5rem
        line-height: 3rem
        position: relative
        top: 1rem
        right: 0.75rem
      &:after
        content: '}}'
        font-size: 4.5rem
        line-height: 3rem
        position: relative
        top: 1rem
        left: 0.75rem
        transition: 2s
      .brand
        padding: 1rem 0
        font-size: 2.5rem
        line-height: 3rem
        margin: 0
      .pages
        list-style: none
        padding: 0
        margin: 0
        height: 4rem
        width: auto
        position: relative
        overflow-y: scroll
        pointer-events: none
        .page
          font-size: 2.5rem
          line-height: 3rem
          padding: 1rem 0
          font-weight: 100
          max-width: 0
          transition: all 1s
        .page.active
          max-width: 10rem
  .right
    background-color: white
    flex-shrink: 0
    .nav
      +flex(center, center)
      padding: 1rem
      a
        display: inline-block
        margin: auto
        width: 100%
        text-align: center
        font-size: 1.5rem
        color: $color1
        opacity: 0.5
        cursor: pointer
        transition: 0.25s
        &:hover
          opacity: 1
            
          
!
            
              $('.nav a').click(function() {
  $page = $(this).attr('data-logo');
  $first = $('.page:first-child').position().top;
  $position = $($page).position().top;
  $scroll = $position - $first;
  
  $('.pages').stop().animate({scrollTop: $scroll}, 1000);
  $($page).siblings('.page').removeClass('active');
  $($page).addClass('active');
});

$('.pages').on('mousewheel', function(e) {
  e.preventDefault();
});
            
          
!
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