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.

            
              <section id="intro">
    <div id="introText">
        <h1>Site Mapper</h1>
    </div>
</section>

<article id="preamble">

<section id="preview">
    <div id="about">A very simple website planning tool for small sites.</div>
    <div id="show">Make a Map!</div>
</section>

<a href="http://en.wikipedia.org/wiki/Site_map" target="blank"><div class="learn">What's a Site Map?</div></a>

</article>
  
<section id="app">

<div class="title" contenteditable="true">Type here to add a title.</div>

<section id="appArea">
  <div class="addCol">Add Page</div>  
<section class="template">
  
<div class="item page"><div contenteditable="true" class="box sub">Here!</div><div class="delete"><p>-</p></div></div>
  
<section class="col new">
  <div class="item">
    <div contenteditable="true" class="box head">Here!</div>
    <div class="deleteCol"><p>-</p></div>
    <div class="plus"><p>+</p></div>
  </div>
</section>  
  
</section>  
  
<section class="col">
  <div class="item">
    <div contenteditable="true" class="box head">Here!</div>
    <div class="plus"><p>+</p></div>
  </div>  
</section>  
  
</section>  

<section id="print">
  <h3>Print Sitemap / Print to PDF</h3>
   <h4>This will only print your sitemap, not the whole website.</h4>
 </section>
  
</section>  
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,700);

body{
  font-family: 'Open Sans', sans-serif;
  background-color: #BFBFBF;;
}

::selection {
  background: black; color: white; 
}
::-moz-selection {
  background: black;  color: white;
}

$lblue: rgb(53, 127, 201);
$dblue: rgba(53, 127, 201, 0.7);
$ice: rgb(240, 240, 240);

$break-one: 1200px;
$break-two: 800px;
$break-three: 650px;
$break-four: 585px;
$break-five: 420px;

.transition{
  -webkit-transition: all 0.4s linear;
	-moz-transition: all 0.4s linear;
	-ms-transition: all 0.4s linear;
	-o-transition: all 0.4s linear;
	transition: all 0.4s linear;
}

#app{
  display: none;
  background-color: $ice;
}

#preview{
  height: 400px;
  width: 100%;
  position: relative;
  background-color: $ice;
  background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/242749/preview.jpg');
  background-size: cover;
  background-attachment: fixed;
}

.learn{
  width: 100%;
  text-align: center;
  color: black;
  padding: 1em 0;
  text-decoration: none;
  background-color: #D1D1D1;
}

a{
  text-decoration: none;
}

#show{
  cursor: pointer; 
  width: 200px; 
  text-align: center; 
  padding: 1em 0 1em 0; 
  border-radius: 20px; 
  background-color: rgb(53, 127, 201); 
  color: white; 
  margin: 8.5em auto 0 auto;
  @extend .transition;}
    #show:hover{
      background-color: rgb(51, 94, 136); 
      border-radius: 0;}
 #about{
   background-color: rgb(51, 94, 136); 
   text-align: center; 
   color: white; 
   padding: 1em 0 1em 0; 
   box-shadow: 0 5px 7px rgba(0,0,0,.5);}

#intro{
  width: 100%; 
  background-color: rgb(53, 127, 201);  
}

#introText{
  text-align: center; 
  width: 100%; 
  background-color: rgba(53, 127, 201, 0.7);}

#intro h1{
  padding: 1em 0 .8em 0; 
  font-size: 4em; 
  color: white; 
  font-weight: 300;
}

.title{background-color: rgb(51, 94, 136); width: 100%; font-family: 'rokkitt', sans-serif; color: white; text-align: center; font-size: 1.7em; padding: .5em 0 .5em 0; box-shadow: 7px 7px 5px rgba(0, 0, 0, 0.2);}

#appArea{
  width: 100%;
  max-width: 1200px;
  margin: 1em auto;
  min-height: 400px;
  
  @media screen and (max-width: $break-one){
    width: 90%;
    margin-left: 5%;
  }
  
}

.item{
  width: 100%;
  margin-bottom: .75em;
  
  .box{
    padding: .75em;
    border-radius: 3px;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: .75em;
  }

  .head{
    background-color: $lblue;
    color: $ice;
    border: none;
  }  

  .sub{
    border: 4px solid rgb(124, 173, 222);
  }
  
  .plus{
    background-color: #D1D1D1;
    width: 20px;
    height: 20px;
    margin: 0 auto;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    @extend .transition;
    
    &:hover{
      background-color: #BDBCBC;
    }
    
    p{
      padding-top: 2px;
    }
    
  }
  
}

.col{
  width: 14%;
  margin: 1em .5em 1.25em .5em;
  display: inline-block;
  vertical-align: top;
  
  @media screen and (max-width: $break-two){
    width: 22%;
  }
  @media screen and (max-width: $break-three){
    width: 30%;
  }
  @media screen and (max-width: $break-four){
    width: 46%;
    margin-right: .3em;
  }
  @media screen and (max-width: $break-five){
    width: 93%;
    margin: 1em 0 1.25em 5%;
  }
}

.inline{
  display: inline-block !important;
}

.addCol{
  text-align: center;
  width: 100px;
  margin: 0 auto 1em auto;
  padding: .5em;
  border-radius: 2px;
  background-color: #D1D1D1;
  cursor: pointer;
  font-size: .8em;
   @extend .transition;
    
    &:hover{
      background-color: #BDBCBC;
    }
}

.page{
  display: none;
  position: relative;
  
  .delete{
    position: absolute;
    top: 10px;
    left: .7em;
    background-color: #D1D1D1;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    @extend .transition;
    
    &:hover{
      background-color: #BDBCBC;
    }
    
    p{
      margin-top: -2px;
    }
    
  }
  
}

.new{
  display: none;
}

#print{
  background-color: rgb(232, 232, 232); 
  width: 100%; 
  cursor: pointer;

  h3{
    text-align: center; 
    width: 210px; 
    background-color: rgb(53, 127, 201); 
    margin: 0 auto 0 auto; 
    padding: .5em 0 .5em 0; 
    color: white; 
    font-size: .9em;}
      h3:hover{
      background-color: rgb(51, 94, 136);}
   h4{
    width: 100%; 
    padding: .5em 0 .5em 0; 
    text-align: center; 
    background-color: rgb(214, 213, 213);}
}

.col{
  
  .item{
    position: relative;
  }
  
  .deleteCol{
    position: absolute;
    top: 7px;
    left: .5em;
    background-color: rgb(51, 94, 136);
    color: $ice;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    @extend .transition;
    
    &:hover{
      background-color: #BDBCBC;
    }
    
    p{
      margin-top: -2px;
    }
    
  }
}

//print styles

@media print {
  * { -webkit-print-color-adjust: exact; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } 
   @page { margin: 0.5cm; }
  body{background-image: none;}
  #intro{display: none;}
  #print{display: none; opacity: 0;}
  #footer{display: none;}
  .plus{display: none;}
  .delete{display: none;}
  .title{box-shadow: none; border-bottom: 1px solid black;}
  #app{background-color: none;}
  .addCol{display: none;}
}
            
          
!
            
              $(document).ready(function(){
  
  //hide intro, show app
  $('#show').on('click', function(){
    $('#preamble').hide();
    $('#app').fadeIn();
  });
  
  //clone item template, append to current column
  $(document).on('click', '.plus', function (){
   var col = $(this).parent().parent();
   var cloneMe = $('.template').find('.page');
    $(cloneMe).clone()
      .appendTo(col)
      .fadeIn();
  });
  
  //remove deleted item
  function removeItem () {
    $(this).parent().remove();
  };
  
  $(document).on('click', '.delete', function(){
    $(this).parent().fadeOut();
    setTiemout(removeItem, 500);
  });
  
  //remove deleted column
   function removeCol () {
    $(this).parent().parent().remove();
  };
  
  $(document).on('click', '.deleteCol', function(){
    $(this).parent().parent().fadeOut();
    $(this).parent().parent().removeClass('inline');
    setTiemout(removeCol, 500);
  });
  
  //clone col template, append to app
  $('.addCol').on('click', function(){
    var cloneCol = $('.template').find('.new');
    $(cloneCol).clone()
      .appendTo('#appArea')
      .fadeIn()
      .addClass('inline');
  });
  
  //print
  $('h3').on('click', function(){
       window.print();
       return false;   
    });
  
});
            
          
!
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.

Console