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. 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

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 class="container">
  <div id="profile" class="profile">
    <div class="user-info">
      <div class="user-info_avatar"> 
        <img src="http://placehold.it/250x250" alt="" />
      </div>
      <h2>{{name}}</h2>
      <div class="profile_nav">
        <ul>
          <li @click="view = 'profile-about'; active = 'about'" 
              v-bind:class="{active: active === 'about' }">ABOUT</li>
          <li @click="view = 'profile-posts'; active='posts'"
              v-bind:class="{active: active === 'posts' }"
              >POSTS</li>
          <li @click="view = 'profile-contact'; active='contact'"
              v-bind:class="{active: active === 'contact' }">CONTACT</li>
        </ul>
      </div> 
    </div>
    <div class="content">
      <span class="bg-float">
        {{active}}
      </span>
      <transition name="slide-fade" mode="out-in">
        <keep-alive>
          <component :is="view"></component>
        </keep-alive>
      </transition>
    </div>
  </div>
</div>
<script type="text/x-template" id="profile-about">
  <div>
    <h3>About</h3>
    <p>In lacinia venenatis mauris eget malesuada. Proin congue, erat vitae efficitur aliquam, felis felis convallis metus, ac ultrices libero ex eget tellus. Praesent tincidunt iaculis ultricies. Praesent porta, ipsum at iaculis congue, dui nisl rutrum urna, non vehicula ante massa quis elit.</p> <p> Proin tincidunt porta interdum. Praesent sollicitudin convallis libero. Maecenas ultricies, mauris eget interdum blandit, leo dui mattis est, vel convallis turpis nulla quis magna. Quisque vehicula neque at mi ornare, eu hendrerit nulla scelerisque. Aenean ullamcorper varius viverra. Etiam at diam eu massa tempus venenatis. Ut tempus nunc nulla, id semper nunc placerat in. </p>
  </div>
</script>
<script type="text/x-template" id="profile-posts">
  <div>
  	<h3>Posts</h3>
		<ul class="posts">
      <li v-for="n in 3"><img src="http://placehold.it/75X75" alt="" class="tn" /> <h4>Post Title</h4></li>
    </ul>
  </div>
</script>

<script type="text/x-template" id="profile-contact">
	<div class="">
  <h3>Contact</h3>
  </div>
</script>

              
            
!

CSS

              
                $gutter: 30px
$half-gutter: 15px
$primary: #009688 
*, *:before, *:after
  box-sizing: border-box
body
  background: #fff
  background-image: url(http://p-hold.com/dock/1000/700/gray)
  background-size: cover
  background-position: top left
  font-family: 'Rubik', sans-serif
  p
    color: #424242
    line-height: 1.4
  h1, h2, h3
    text-transform: uppercase
    letter-spacing: 2px
img
  max-width: 100%
.container
  background: linear-gradient(to right bottom, transparent 50%, $primary 50%)
  height: 100vh
  width: 100%
.profile
  background-color: #fff
  box-shadow: 0 20px 75px darken($primary, 20%)
  position: absolute
  top: 50%
  left: 50%
  transform: translate(-50%, -50%)
  padding: 3em 
  width: 90%
  max-width: 800px
  min-width: 600px
  margin: 0 auto
  height: 550px
  .user-info
    width: calc(40% - #{$half-gutter})
    margin-right: $gutter
    float: left
    h2
      font-size: 2em
      font-weight: 100
    .user-info_avatar
      border: 5px solid $primary
    img, h3
      position: relative
      top: -15px
      left: -25px
  .profile_nav
    margin-top: 1em
    ul
      list-style: none
      padding-left: 1em
      border-left: 3px solid #eaeaea
    li
      margin-top: .5em
      font-size: 1.2em
      font-weight: bold
      letter-spacing: 2px
      transition: 0.2s all
      &.active
        color: $primary
      &:hover
        cursor: pointer
        color: $primary
  .content
    width: calc(60% - #{$half-gutter})
    max-height: 100%
    float: left
    h3
      margin-top: 0
      font-size: 1.8em
    .bg-float
      text-transform: capitalize
      color: rgba(230, 230, 230, 0.2)
      font-weight: bold
      position: absolute
      right: 10px
      bottom: 0
      font-size: 12em
      z-index: -1
.posts
  list-style: none
  li
    border-bottom: 1px solid #eaeaea
    margin-bottom: 1em
    padding: .25em
    &:after
      display: table
      content: ''
      clear: both
  img, h4
    display: inline-block
    margin-right: 1em
    float: left
//VUE transition classes
.slide-fade-enter-active, .slide-fade-leave-active 
  transition: opacity .1s, transform .2s

.slide-fade-enter, .slide-fade-leave-active 
  opacity: 0
  transform: translateX(20px)

              
            
!

JS

              
                Vue.component('profile-about', {
  template: '#profile-about'
});
Vue.component('profile-posts', {
  template: '#profile-posts'
})
Vue.component('profile-contact', {
  template: '#profile-contact'
})
const profile = new Vue({
  el: '#profile', 
  data: {
    view: 'profile-about', 
    active: 'about', 
    name: 'Mark Rigby'
  }
});
              
            
!
999px

Console