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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 v-if="showDesk" id="desk">
<div class="box">
  <div id="sticky-notes">
    <div @click="processSticky(1)" class="sticky-note-1">
      <div class="sticky-text">
        {{stickyTextRed}} 
      </div>
      <div class="bottom-strip-1">
      </div>
    </div>
    <div @click="processSticky(2)" class="sticky-note-2">
      <div class="sticky-text">
      {{stickyTextYellow}} 
      </div>
      <div class="bottom-strip-2">
      </div>
    </div>
  </div>
  <div id="grains">
    <div class="grain-1"></div>
    <div class="grain-2"></div>
    <div class="grain-3"></div>
    <div class="grain-4"></div>
    <div class="grain-5"></div>
    <div class="grain-6"></div>
  </div>
  <div @click="processComputer" class="computer-container">
    <div class="pen">
      <div class="cap"></div>
      <div class="end"></div>
    </div>
    <div class="screen">
      <div class="logo-container">
        <img :src="screenLogo" class="screen-logo" />
      </div>
    </div>
    <div class="bottom-computer">
      <div class="keyboard-container">
       <div id = "keyboard-row-1">
        <div class="top-bar-1">
        </div>
        <div class="top-bar-2">
        </div>
        <div class="top-bar-3">
        </div>
        <div class="top-bar-4">
        </div>
        <div class="top-bar-5">
        </div>
        <div class="top-bar-6">
        </div>
        <div class="top-bar-7">
        </div>
        <div class="top-bar-8">
        </div>
       </div>
        <div id = "keyboard-row-2">
        <div class="mid-bar-1">
        </div>
        <div class="mid-bar-2">
        </div>
        <div class="mid-bar-3">
        </div>
        <div class="mid-bar-4">
        </div>
        <div class="mid-bar-5">
        </div>
        <div class="mid-bar-6">
        </div>
        <div class="mid-bar-7">
        </div>
        <div class="mid-bar-8">
        </div>
       </div>
        
        <div id = "keyboard-row-3">
        <div class="bottom-bar-1">
        </div>
        <div class="bottom-bar-2">
        </div>
        <div class="bottom-bar-3">
        </div>
        <div class="bottom-bar-4">
        </div>
        <div class="bottom-bar-5">
        </div>
        <div class="bottom-bar-6">
        </div>
        <div class="bottom-bar-7">
        </div>
        <div class="bottom-bar-8">
        </div>
       </div>
      </div>
      <div class="trackpad"></div>
    </div>
    <div class="mouse">
      <div class="tracker"></div>
    </div>
  </div>
  <div @click="processGameboy" class="gameboy">
    <div class="gameboy-screen-back">
      <div class="gameboy-screen-front"></div>
    </div>
    <div class="dpad-container">
      <div class="horizontal-dpad"></div>
      <div class="vertical-dpad"></div>
    </div>
    <div @click="backToDesk" class="button-1"></div>
    <div @click="backToDesk" class="button-2"></div>
    <div class="start"></div>
    <div class="select"></div>
  </div>
</div>
</div>

<div v-if="showStickyYellow" id="stickyYellow">
<div class="box">
  <div id="grains">
    <div class="grain-1"></div>
    <div class="grain-2"></div>
    <div class="grain-3"></div>
    <div class="grain-4"></div>
    <div class="grain-5"></div>
    <div class="grain-6"></div>
  </div>
  <div class="sticky-note-large-yellow">
    <input @keyup.enter="processText" v-model="stickyText" type="text"/>
  </div>
</div>
</div>

<div v-if="showStickyRed" id="stickyRed">
<div class="box">
  <div id="grains">
    <div class="grain-1"></div>
    <div class="grain-2"></div>
    <div class="grain-3"></div>
    <div class="grain-4"></div>
    <div class="grain-5"></div>
    <div class="grain-6"></div>
  </div>
  <div class="sticky-note-large-red">
    <input @keyup.enter="processText" v-model="stickyText" type="text"/>
  </div>
</div>
</div>

<div v-if="showGameboy" id="gameboy">
<div class="box">
  <div id="grains">
    <div class="grain-1"></div>
    <div class="grain-2"></div>
    <div class="grain-3"></div>
    <div class="grain-4"></div>
    <div class="grain-5"></div>
    <div class="grain-6"></div>
  </div>
  <div class="gameboy-large">
    <div class="gameboy-screen-back">
      <div v-if="on" class="gameboy-dot"></div>
      <div class="gameboy-screen-front">
        <div v-if="on" class="game-container">
        <img class="screen-logo" :src="screenLogo" />
      </div>
      </div>
    </div>
    <div class="dpad-container">
      <div class="horizontal-dpad"></div>
      <div class="vertical-dpad"></div>
    </div>
    <div @click="backToDesk" class="button-1"></div>
    <div @click="backToDesk" class="button-2"></div>
    <div @click="startGameboy" class="start"></div>
    <div @click="startGameboy" class="select"></div>
  </div>
</div>
</div>

<div v-if="showComputer" id="computer">
  <div class="box">
    <div id="grains">
    <div class="grain-1"></div>
    <div class="grain-2"></div>
    <div class="grain-3"></div>
    <div class="grain-4"></div>
    <div class="grain-5"></div>
    <div class="grain-6"></div>
  </div>
    <div class="computer-container-large">
    <div class="pen">
      <div class="cap"></div>
      <div class="end"></div>
    </div>
    <div class="screen">
     <div class="logo-container">
     <img class="screen-logo" :src="screenLogo" />
      </div>
    </div>
    <div class="bottom-computer">
      <div class="keyboard-container">
       <div id = "keyboard-row-1">
        <div class="top-bar-1">
        </div>
        <div class="top-bar-2">
        </div>
        <div class="top-bar-3">
        </div>
        <div class="top-bar-4">
        </div>
        <div class="top-bar-5">
        </div>
        <div class="top-bar-6">
        </div>
        <div class="top-bar-7">
        </div>
        <div class="top-bar-8">
        </div>
       </div>
        <div id = "keyboard-row-2">
        <div class="mid-bar-1">
        </div>
        <div class="mid-bar-2">
        </div>
        <div class="mid-bar-3">
        </div>
        <div class="mid-bar-4">
        </div>
        <div class="mid-bar-5">
        </div>
        <div class="mid-bar-6">
        </div>
        <div class="mid-bar-7">
        </div>
        <div class="mid-bar-8">
        </div>
       </div>
        
        <div id = "keyboard-row-3">
        <div class="bottom-bar-1">
        </div>
        <div class="bottom-bar-2">
        </div>
        <div class="bottom-bar-3">
        </div>
        <div class="bottom-bar-4">
        </div>
        <div class="bottom-bar-5">
        </div>
        <div class="bottom-bar-6">
        </div>
        <div class="bottom-bar-7">
        </div>
        <div class="bottom-bar-8">
        </div>
       </div>
      </div>
      <div class="trackpad"></div>
    </div>
    <div @click="backToDesk" class="mouse-large">
      <div class="tracker"></div>
    </div>
  </div>
  </div>
</div>
              
            
!

CSS

              
                body{
  background: #EBF3FE;
}
.box{
  position: relative;
  display: block;
  margin: auto;
  margin-top: 6%;
  width: 600px;
  height: 450px;
  background: #CBA285;
}

.grain-1{
  position: absolute;
  top: 5%;
  height: 6%;
  width: 100%;
  background: #C59D82;
  z-index: 1;
}

.grain-2{
  position: absolute;
  top: 25%;
  height: 6%;
  width: 100%;
  background: #C59D82;
  z-index: 1;
}

.grain-3{
  position: absolute;
  top: 45%;
  height: 6%;
  width: 100%;
  background: #C59D82;
  z-index: 1;
}

.grain-4{
  position: absolute;
  top: 65%;
  height: 6%;
  width: 100%;
  background: #C59D82;
  z-index: 1;
}

.grain-5{
  position: absolute;
  top: 85%;
  height: 6%;
  width: 100%;
  background: #C59D82;
  z-index: 1;
}

.grain-6{
  position: absolute;
  bottom: 0%;
  height: 9%;
  width: 100%;
  background: #A48170;
  z-index: 1;
}

.computer-container{
  position: absolute;
  height: 60%;
  width: 42.5%;
  top: 20%;
  left: 28.75%;
  background: #525252;
  z-index: 1;
}

.computer-container-large{
  position: absolute;
  height: 70%;
  width: 50%;
  top: 15%;
  left: 25%;
  background: #525252;
  z-index: 1;
}

.screen{
  position: absolute;
  width: 90%;
  height: 40%;
  background: #111111;
  top: 6%;
  left: 5%;
}

.progress-bar{
  position: absolute;
  height: 5%;
  bottom: 12%;
  width: 70%;
  left: 15%;
  background: none;
  border-radius: 50px;
  border: solid 2px white;
}
.progress-fill{
  position: absolute;
  width: 100%;
  height: 100%;
  background: white;
}
.logo-container{
  position: absolute;
  height: 40%;
  width: 20%;
  top: 25%;
  left: 40%;
  background: none;
}
.game-container{
  position: absolute;
  height: 100%;
  width: 120%;
  left: -10%;
  background: none;
}
.screen-logo{
  position: absolute;
  width: 80%;
  left: 10%;
  height: 100%; 
  
}

.keyboard-container{
  position: absolute;
  width: 90%;
  height: 50%;
  top: 7%;
  left: 5%;
  background: #C2CBDD;
  z-index: 3;
}

.top-bar-1{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 3%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-2{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 15%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-3{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 27%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-4{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 39%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-5{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 51%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-6{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 63%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-7{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 75%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.top-bar-8{
  cursor: pointer;
  position: absolute;
  width: 8%;
  height: 15%;
  left: 87%;
  top: 8%;
  background: #666666;
  z-index: 4;
}

.mid-bar-1{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 3%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-2{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 15%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-3{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 27%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-4{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 39%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-5{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 51%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-6{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 63%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-7{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 75%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.mid-bar-8{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 87%;
  top: 45%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-1{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 3%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-2{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 15%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-3{
  position: absolute;
  width: 40%;
  height: 15%;
  left: 27%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-4{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 39%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-5{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 51%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-6{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 63%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-7{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 75%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.bottom-bar-8{
  position: absolute;
  width: 8%;
  height: 15%;
  left: 87%;
  bottom: 8%;
  background: #666666;
  z-index: 4;
}

.trackpad{
  position: absolute;
  width: 30%;
  left: 35%;
  bottom: 5%;
  height: 30%;
  background: #C2CBDD;
  z-index: 3;
}

.bottom-computer{
  position: absolute;
  height: 47.5%;
  width: 100%;
  bottom: 0%;
  background: #E8E8EB;
  z-index: 2;
}

.sticky-note-1{
  position: absolute;
  background: #F1536A;
  height: 15%;
  width: 12%;
  z-index: 4;
  top: 10%;
  left: 5%;
}

.sticky-note-2{
  position: absolute;
  background: #FEE789;
  height: 15%;
  width: 12%;
  z-index: 4;
  top: 33%;
  left: 9%;
}

.bottom-strip-1{
  position: absolute;
  bottom: 0%;
  height: 15%;
  width: 100%;
  background: #C7485C;
}

.bottom-strip-2{
  position: absolute;
  bottom: 0%;
  height: 15%;
  width: 100%;
  background: #E7D181;
}

.clock{
  position: absolute;
  height: 20%;
  width: 15%;
  right: 5%;
  top: 5%;
  border-radius: 50%;
  background: #CACDD2;
  z-index: 4;
}

.clock-white{
  position: absolute;
  height: 80%;
  width: 80%;
  left: 10%;
  top: 10%;
  border-radius: 50%;
  background: white;
  z-index: 5;
}

.tick{
  position: absolute;
  background: #11141E;
  height: 30%;
  width: 8%;
  top: 25%;
  left: 45%;
}
.tock{
  position: absolute;
  background: #11141E;
  width: 30%;
  height: 8%;
  top: 47%;
  left: 20%;
}

.mouse{
  position: absolute;
  background: white;
  height: 30%;
  width: 20%;
  z-index: 4;
  bottom: -25%;
  right: -30%;
  border-radius: 15px;
}


.mouse-large{
  position: absolute;
  background: white;
  height: 30%;
  width: 20%;
  z-index: 4;
  bottom: -15%;
  right: -30%;
  border-radius: 15px;
}

.tracker{
  position: absolute;
  background: #666666;
  height: 25%;
  width: 10%;
  top: 0%;
  left: 45%;
}

.pen{
  position: absolute;
  width: 5%;
  height: 35%;
  background: white;
  top: 60%;
  left: -20%;
}

.cap{
  position: absolute;
  width: 100%;
  height: 10%;
  background: #536796;
  top: -10%;
}

.end{
  position: absolute;
  width: 100%;
  height: 10%;
  background: #536796;
  bottom: -10%;
  -webkit-clip-path: polygon(100% 0, 0 0, 50% 100%);
clip-path: polygon(100% 0, 0 0, 50% 100%);
}

.gameboy{
  position: absolute;
  top: 30%;
  right: 5%;
  height: 30%;
  width: 15%;
  z-index: 4;
  border-radius: 10px;
  border-bottom-left-radius: 25px;
  background: #8849bc;
}

.gameboy-screen-back{
  position: absolute;
  height: 40%;
  width: 75%;
  left: 12.5%;
  top: 8%;
  background: #402750;
}

.gameboy-screen-front{
  position: absolute;
  height: 75%;
  width: 75%;
  left: 12.5%;
  top: 12.5%;
  background: #f4fff8;
}

.gameboy-dot{
  position: absolute;
  height: 5%;
  width: 5%;
  background: #DC0646;
  top: 25%;
  left: 3%;
  border-radius: 50%;
}

.dpad-container{
  position: absolute;
  background: none;
  bottom: 20%;
  width: 27%;
  height: 20%;
  left: 12.5%;
}

.horizontal-dpad{
  position: absolute;
  background: #402750;
  width: 100%;
  height: 30%;
  top: 35%;
}
.vertical-dpad{
  position: absolute;
  background: #402750;
  height: 100%;
  width: 30%;
  left: 35%;
  top: 0%;
}

.button-1{
  cursor: pointer;
  position: absolute;
  width: 15%;
  height: 10%;
  bottom: 16%;
  right: 18%;
  background: #402750;
  border-radius: 50%;
}


.button-2{
  cursor: pointer;
  position: absolute;
  width: 15%;
  height: 10%;
  bottom: 29%;
  right: 10%;
  background: #402750;
  border-radius: 50%;
}

.start{
  cursor: pointer;
  position: absolute;
  border-radius: 40px;
  background: #402750;
  bottom: 5%;
  height: 3%;
  left: 31%;
  width: 18%;
}

.select{
  cursor: pointer;
  position: absolute;
  border-radius: 40px;
  background: #402750;
  bottom: 5%;
  height: 3%;
  right: 29%;
  width: 18%;
}

.gameboy-large{
  position: absolute;
  top: 15%;
  right: 35%;
  height: 60%;
  width: 30%;
  z-index: 4;
  border-radius: 10px;
  border-bottom-left-radius: 25px;
  background: #8849bc;
}

.sticky-text{
  position: relative;
  text-align: center;
  margin-top: 25%;
  font-family: "Lato";
  font-size: 15px;
  color: #111111;
}

.sticky-note-large-yellow{
  position: absolute;
  width: 50%;
  height: 50%;
  background: #FEE789;
  z-index: 2;
  top: 20%;
  left: 25%;
  border-bottom: solid 30px #E7D181;
}

.sticky-note-large-red{
  position: absolute;
  width: 50%;
  height: 50%;
  background: #F1536A;
  z-index: 2;
  top: 20%;
  left: 25%;
  border-bottom: solid 30px #C7485C;
}


input{
  position: absolute;
  background: none;
  border: none;
  width: 80%;
  left: 10%;
  height: 40%;
  top: 30%;
  font-family: "Lato";
  font-size: 30px;
  color: #111111;
}
input:focus{
  outline: none;
}

@media all and (max-width: 600px) {
  .box{
    margin-top: 20%;
    width: 400px;
    height: 280px;
  }
}
              
            
!

JS

              
                var desk = new Vue({
  el: "#desk",
  data: {
    showDesk: true,
    stickyTextRed: "",
    stickyTextYellow: "",
    screenLogo: "http://apple-wholesale-store.com/wp-content/uploads/2017/01/Apple_Logo_Solid_White-1.png"
  },
  methods: {
    processSticky: function(selection) {
     if(selection === 1) {
        this.showDesk = false
        stickyRed.showStickyRed = true      
      } else if(selection === 2){
        this.showDesk = false
        stickyYellow.showStickyYellow = true
      }
    },
    processGameboy: function(){
      this.showDesk = false
      gameboy.showGameboy = true
    },
    processComputer: function(){
      this.showDesk = false
      computer.showComputer = true
    }
  }
})

var stickyYellow = new Vue({
  el: "#stickyYellow",
  data: {
    showStickyYellow: false,
    stickyText: ""
  },
  methods: {
    processText: function(){
      desk.stickyTextYellow = this.stickyText
      this.showStickyYellow = false
      desk.showDesk = true
    }
  }
})

var stickyRed = new Vue({
  el: "#stickyRed",
  data: {
    showStickyRed: false,
    stickyText: ""
  },
  methods: {
    processText: function(){
      desk.stickyTextRed = this.stickyText
      this.showStickyRed = false
      desk.showDesk = true
    }
  }
})

var gameboy = new Vue({
  el: "#gameboy",
  data: {
    showGameboy: false,
     on: false,
    screenLogo: "http://lparchive.org/Pokemon-Blue/Update%2001/1-capture_02042010_120644.png"
  },
  methods: {
    startGameboy: function(){
      this.on = true
    },
     backToDesk: function(){
      this.showGameboy = false
      desk.showDesk = true
    }
  }
})

var computer = new Vue({
  el: "#computer",
  data: {
    showComputer: false,
    screenLogo: "http://apple-wholesale-store.com/wp-content/uploads/2017/01/Apple_Logo_Solid_White-1.png"
  },
  methods: {
    backToDesk: function(){
      this.showComputer = false
      desk.showDesk = true
    }
  }
})

              
            
!
999px

Console