Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- *************INSTRUNCTIONS*******************

  You have three(3) pages of notes you can take.

- type into textarea block to take note
- BOTTOM RIGHT BUTTON stores text in hidden div then sets second page
- BOTTOM MIDDLE BUTTON will alert you on the page number you are on
- BOTTOM LEFT BUTTON will display the text stored up to that page
  - once output div is shown you can click the page to go back to note entry

*************INSTRUNCTIONS******************* -->
<div class="notebook">
  <header></header>
  <span class="extraPages">
  <textarea id="page" cols="30" rows="10" placeholder="well...start note taking"></textarea>
  </span>
  <footer>
    <button class="seeOutput" title="see note">&#59255;</button>
    <button class="range" title="progress">&#59241;</button>
    <button class="newPage" title="new page">&#128229;</button>
  </footer>
</div>
<div class="output">
  <h1>Your Notes...</h1>
  <h2>click page to go back to note entry</h2>
</div>
<footer class="page">
  <p>some guy just testing himself</p>
</footer>
              
            
!

CSS

              
                $light:#fffdef;
$dark:#3b0101;
$base:#f00606;
//change colors globally by changeing the variables above!
//******************************************************
@import url(http://weloveiconfonts.com/api/?family=entypo);
[class*="entypo-"]:before {font-family: 'entypo', sans-serif;}
*{box-sizing:border-box;}
html, body{height:100%;}
body{
  background:radial-gradient(darken($base,20%)0%, darken($base,50%)100%);
  display:flex;
  flex-flow:column nowrap;
  align-items:center;
  justify-content:center;
}//body
.notebook{
  width:50%;
  height:40%;
  textarea{
    width:100%;
    height:100%;
    padding:2em 1em;
    font:400 1em/2em 'Cuprum', sans-serif;
    color:$dark;
    text-shadow:0 1px rgba($dark,.2);
    resize:none;
    background:linear-gradient(to bottom, darken(white,15%) 0%, lighten($light,0%) 5%, lighten($light,0%) 95%, darken(white,15%) 100%);
    background-size:100% 2em;
    background-repeat:repeat-y;
    border-radius:3px;
    box-shadow:inset 0 0 30px rgba($dark,.2), 0 2px 2px rgba($dark,.6);
    overflow:hidden;
    &:focus{
      outline:none;
    }
  }//textarea
  header{
  
  }//header
  footer{
  background:rgba($light,.1);
  padding: .1em 0;
  font-family: 'entypo', sans-serif;
  display:flex;
  flex-flow:row nowrap;
  justify-content:center;
  button{
    margin-right:30%;
    background:transparent;
    color:rgba($light,.2);
    text-shadow:0 1px 1px rgba($dark,.3);
    font-size:2em;
    border:none;
    transition:color 250ms;
    cursor:pointer;
    &:last-of-type{
      margin-right:0;
    }
    &:hover{
      color:rgba($light,.6);
      text-shadow:none;
    }
    &:active{
      color:rgba($light,1);
    }
    &:focus{
      outline:none;
      color:rgba($light,1); 
    }
    @media screen and (max-width:750px){
    margin-right:20%;
    }
  }//button
  }//footer
}//.notebook
//******************extra pages*******************
.output{
 width:50%;
  border-radius:4px;
  background:darken($light,5%);
  padding: .5em 1em;
  box-shadow:inset 0 0 2px 1px white,
    inset 0 0 20px 2px darken($light,20%),
    1px 3px 2px rgba($dark,.7); 
  h1{
    font:normal 2em/1 'Della Respira', serif;
    color:lighten($dark,5%);
    text-shadow:0 1px 0 lighten($light,10%);
    margin:3px 0 3px .5em;
}
h2{
font:normal .875em 'Cuprum', sans-serif;
  color:rgba($dark,.5);
    text-shadow:0 1px 0 lighten($light,10%);
  margin:0 0 0 1em;
}
p{
  font:normal .875em/1.5em 'Cuprum', sans-serif;
  color: darken(white,70%);  
  text-shadow:0 1px 0 white;
  margin:0 .875em 1.5em .875em;
&:first-of-type{
   border-top:1px solid $dark;
    padding-top:2.3em;
    margin-top:-20px
  }
}
}//output
.extraPages{
  position:relative;
  width:100%;
  height:100%;
  display:inline-block;
}
.page1{
 // position:absolute;
   &:before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:90%;
    border-radius:3px;
    background:$light;
    box-shadow:inset 0 0 30px rgba($dark,.2), 0 2px 2px rgba($dark,.6);
  transform:rotate(-1deg);
z-index:-1;
}
}
.page2{
   &:after{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:95%;
    border-radius:3px;
    background:$light;
    box-shadow:inset 0 0 30px rgba($dark,.2), 0 2px 2px rgba($dark,.6);
  transform:rotate(2deg);
z-index:-1;
}
}
//******************extra pages*******************
footer.page{
  position:fixed;
  bottom:0;
  width:100%;
  padding: 20px;
  color:rgba($light,.3);
  text-shadow:0 1px darken($base,70%);
  font:normal .875em 'Della Respira', cursive;
  letter-spacing:.5em;
  text-align:center;
}//footer.page
              
            
!

JS

              
                $('.output').hide();
var counter = 1;
$('.newPage').on('click',function(){
  var input = $('textarea').val();
  counter ++;
  if(counter == 2){
    $('.extraPages').addClass('page1');
    $('.output').append('<p>'+input+'</p>');
    $('textarea').val("");
    $('.range').html('&#59242;');
    $('textarea').focus();
  }
  if(counter == 3){
    $('.extraPages').addClass('page2');
    $('.output').append('<p>'+input+'</p>');
    $('textarea').val("");
    $('.range').html('&#59243;');
    $('textarea').focus();
  }
  if(counter >= 4){
    $('.output').append('<p>'+input+'</p>');
    $('textarea').val("");
    $('.notebook').fadeOut(250);
    function showOutput(){$('.output').fadeIn(200);}
    setTimeout(showOutput,300);
    
  }
});//newPage.on

$('.range').on('click',function(){
alert('you are currently on page '+counter + '.');
});//range.on

$('.seeOutput').on('click',function(){
    $('.notebook').fadeOut(250);
    function showOutput(){$('.output').fadeIn(200);}
    setTimeout(showOutput,300);
});//seeOutput.on

$('.output').on('click',function(){
  $('.output').fadeOut(250);
    function showInput(){$('.notebook').fadeIn(200);}
    setTimeout(showInput,300);
});//output.on
              
            
!
999px

Console