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

              
                <header>
  <a href="#menu" class="menu-link">Menu</a>
  <nav id="menu" role="navigation">
    <ul>
        <li><a href="#" class="active-link">Home</a></li>
        <li><a href="#">Pageants</a></li>
        <li><a href="#">Apply</a></li>
        <li><a href="#">Photos</a></li>
        <li><a href="#">About</a></li>      
        <li><a href="#">Contact</a></li>      
    </ul>
  </nav>
</header>

<section id="hero">
  <canvas id="sparkle"></canvas>
  <h1>The Glass Slipper</h1>

<svg width="75" height="75" xmlns="http://www.w3.org/2000/svg">
 <g>
  <title>Layer 1</title>
  <path fill="#fff" id="svg_1" d="m25.63269,31.6478c0,0 3.90381,4.35828 3.90381,26.16344l1.70355,0c0,0 -1.06476,-10.14996 0.86603,-17.532s3.6275,4.18692 3.97504,7.26823s1.78867,9.79529 8.83002,10.81741s12.3053,-0.24156 13.88242,-0.63167s4.77087,-0.87358 0.68243,-2.69055s-7.60931,-4.92761 -8.74487,-8.93703c0,0 -3.30756,2.36447 -5.35181,1.91031s-5.4939,-19.71832 -10.31387,-23.72432l1.15741,-1.4453l-3.20844,-10.84633l-0.90866,5.22401l-4.76987,-5.22401l0.45688,7.11868l-7.72516,-4.5065l2.52701,7.80826l-7.18311,-1.78903l5.13889,6.30341l-6.55038,-0.49402l9.9288,5.77496l1.70389,-0.56796l-0.00001,0.00001z"/>
 </g>
</svg>
    <h2>&mdash; Natural Beauty Pageant &mdash;</h2>
</section>
  
<section>
  <article>
    <h3>Brand New Lineup</h3>
    <p>Welcome! We have an exciting lineup of pageants for the 2012-2013 pageant year. The contestant ages are birth&mdash;16
        years old. The Glass Slipper accepts contestants from any state. We will continue to have the Grand Supreme and
        Mini Supreme at each regular season pageant. There's going to be more trophies, medals and crowns this year.
        Please join us for lots of fun and excitement as we watch your children grow and make new friends.</p>
    <h3>Fairs &amp; Festivals</h3>
    <p>The Glass Slipper is excited about the festivals and fairs that we will be hosting. For the festivals, the
        categories will be smaller and more simple. The Festival fees will be set up according to what categories each
        individual festival committee requests. We are greatly looking forward to this new adventure. All regular season
        (full) pageants and festival pageants information and applications can be found on this website.</p>
    <h3>Growth</h3>    
    <p>As The Glass Slipper grows, we are expanding to different cities and states. The tremendous response to this
        system has been outstanding. We attribute the success to the loyality and fairness of the people involved. This
        is a locally owned and operated family business. You, as the contestant, will not be lost in the crowd. Each
        contestant is recognized on stage and is treated equally. We all strive to make this the best natural pageant
        system contestants participate in.</p>
  </article>
<aside>  
    <h3>Rules</h3>
    <p>The rules are very simple.</p>
    <ul>
      <ol>
        <li>Be Natural</li>
        Limited Make-up will be allowed, but only age appropriate and is detailed
        in the applications.
        <li>Nothing Fake Allowed</li>
        Dresses can be anything from a nice party dress to a Glitzy dress.
        <li>No coaching required</li>
        No coaching for this pageant is required, but is allowed.
        <li>Judges are instructed to follow all the rules.</li>
        Deductions will be made if instructions are not followed.
        <li>All judging is based on age ability.</li>
        Score sheets are always handed out and available.
        <li>Not allowed in this pageant system</li>
        Pro am modeling, bathing suits, disrobing, bare bellys
      </ol>
    <h3>Glass Slippers</h3>
    <p>Win the Grand Supreme Queen or the Mini Supreme Queen Title and win one of 2 beautiful Crystal "GLASS SLIPPERS"
        awarded by The Glass Slipper Natural Beauty Pageant!</p>
    <h3>Mission</h3> 
    <p>The goal is to make every contestant feel special, make new friends, and especially have lots of fun.
        There will be many ways at each pageant to save money, from Charities to items donations for the less
        fortunate, and more. All in an attempt to save money, give back to the community, and make this pageant
        system affordable for everyone! Please join The Glass Slipper Natural Beauty Pageant to become a girl's
        favorite pageant!</p>
          <p>A very special Thank You to Jack Vrtar at Custom Glass Etching of Los Angeles. They custom etch all of
        the beautiful crystal Glass Slippers that are awarded at every The Glass Slipper pageant. Please visit
            <a href="http://www.glassetcher.com">www.glassetcher.com</a> for lots of custom awards and fantastic gift ideas. All of the work is fantastic!</p>
  </aside>
</section>

<footer>
  <article>
    <p><a id="privacylink">Privacy Policy</a></p>
  </article>    
</footer>
  <section class="privacy">
    <div class="tooltip">
      <span class="toolpoint"></span>
      <p>The Glass Slipper Beauty Pageant will never forward, share, transfer, or sell any information obtained for the purpose of entering a pageant. All information is kept confidential.</p>    
    </div>

  </section>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Great+Vibes|Open+Sans:300,400,700);

body{
  font-size: .9em;
  font-family: 'Open Sans';  
  margin: 0;
  background: url('https://raw.github.com/subtlepatterns/SubtlePatterns/gh-pages/paper_fibers.png');
}
header{
  padding: 8px 0;
  background: #333 url('https://raw.github.com/subtlepatterns/SubtlePatterns/gh-pages/black_denim.png');
  overflow: hidden;
  font-weight: 300;
  font-size: .75em;
  text-transform: uppercase;
  a{
    color: #ffffff;
    text-decoration: none;
  }
}
a.menu-link {
  float: right;
	display: block;
	padding: 1em;
}
nav[role=navigation] { 
  clear: both;
	-webkit-transition: all 0.3s ease-out;  
	-moz-transition: all 0.3s ease-out;
	-ms-transition: all 0.3s ease-out;
	-o-transition: all 0.3s ease-out;
	transition: all 0.3s ease-out;
}
.js nav[role=navigation] {
	overflow: hidden;
	max-height: 0;
}
nav[role=navigation].active {
	max-height: 20em;
	}
nav[role=navigation] ul {
	margin: 0;
	padding: 0;
}
nav[role=navigation] li a {
	display: block;
  padding: 10px 20px;
  border-bottom: 1px dotted #333;
  -webkit-transition:background-color .2s ease-in;  
  -moz-transition:color .2s ease-in;  
  -o-transition:color .2s ease-in;  
  transition:color .2s ease-in;
}
nav[role=navigation] li a:hover{     
  background: #555;
}
nav[role=navigation] li .active-link{     
  background: #ddb23f;
  color: #000;
  font-weight: 400;
}
nav[role=navigation] li .active-link:hover{     
  background: #ddb23f;
}




#sparkle {
  position: absolute;
  top: 0;
  left: 0;
  height: 400px;
}
#hero{
  background: #00477d;
    background: url('http://farm3.staticflickr.com/2455/3589991695_d2d7caf5fc_o.jpg') center no-repeat;
    background-size: 160%;
  display: block;
  overflow: hidden;
  position: relative;
  height: 400px;
  width: 100%;
  margin: 0;
  border-bottom: 5px solid #111;
  h1{
    font-family: 'Great Vibes';
    font-size: 5em;
    text-align: center;
    color: #fff;
    margin-top: 100px;
    text-shadow:  0px 2px 2px rgba(255, 255, 255, 0.3);
  }
  h2{
    font-weight: 400;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 25px;
    text-align: center;
    color: #ddb23f;   
    text-shadow:  0px 1px 1px rgba(0, 0, 0, 0.3);
  }
  svg{
    display: block;
    margin: 0 auto;
    margin-top: 10px;    
    border-radius: 50%;
    border: 2px dotted #fff;
  }
}
section{
  margin: 0 auto;
  width: 100%;
  color: #444;
}
article, aside{
  width: 80%;
  max-width: 40em;  
  margin: 0 auto;
  font-size: 1.25em;
  font-weight: 300;
  line-height: 150%;
  a{
    color: #ddb23f;
    text-decoration: none;
  }
  a:hover{
    border-bottom: 1px dotted #ddb23f;
    cursor: pointer;
  }
}
h3{
  padding-bottom: .2em;   
  margin: 2em 0 1em;
  border-bottom: 4px double #ddb23f;
  font-weight: 400;
  font-size: 1.5em;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #ddb23f;
}
p{
  margin-bottom: 1em;
}
aside{
  ol{
    list-style-type: decimal;
  }
  li{
    margin-top: 1em;
    text-transform: uppercase;
    font-weight: 400;
  }
}

footer{
  padding: 1em 0;
  margin: 5em 0 0;
  background: #333 url('https://raw.github.com/subtlepatterns/SubtlePatterns/gh-pages/black_denim.png');
  p{
    font-size: .65em;
    color: #fff;
  }
}
.privacy{
  display: none;
  background: #ddb23f;
  padding: 2em 0;
  position: relative;
}
.tooltip{ 
  width: 80%;
  margin: 0 auto;  
  p{
    margin-bottom: 0;
    color: #222;
    line-height: 150%;
  }
}
  .toolpoint{
    display: block;
    width: 0;
    height: 0;
  	border-left: 15px solid transparent;
	  border-right: 15px solid transparent;	
	  border-bottom: 15px solid #ddb23f;  
    position: relative;
    top: -3em;
  }

@media (min-width: 768px) {
	a.menu-link {
    display: none;
  }
  .js nav[role=navigation] {
	  max-height: none;
  }
  nav[role=navigation] ul {
    text-align: center;
    margin-left: 20px;
  }
			
  nav[role=navigation]  li {
	  display: inline-block;
    text-align: left;
  }
  nav[role=navigation] li a {
    margin-left: 8px;
    border-radius: 3px;
    border: 0;
  }
  #hero{
    background-size: 100%;
  }  
  .tooltip{
    max-width: 50em;      
    }
}
              
            
!

JS

              
                //https://bradfrost.github.com/this-is-responsive/patterns.html

$(document).ready(function() {
  $('body').addClass('js');
  var $menu = $('#menu'),
    $menulink = $('.menu-link');
  
  $menulink.click(function() {
    $menulink.toggleClass('active');
    $menu.toggleClass('active');
    return false;
  });

  $('#privacylink').click(function(){
    $('.privacy').slideToggle({
      duration: 200,
      step: function() { $('body').scrollTop($('.privacy').position().top + $('.privacy').height());
      }
    });
  });
});


// http://timothypoon.com/blog/2011/01/19/html5-canvas-particle-animation/
var WIDTH;
var HEIGHT;
var canvas;
var con;
var g;
var pxs = new Array();
var rint = 60;

if (window.innerWidth > 500) {
$(document).ready(function(){
    WIDTH = window.innerWidth;
    HEIGHT = 500;
    canvas = document.getElementById('sparkle');
    $('#sparkle').attr('width', WIDTH);
    con = canvas.getContext('2d');
    for(var i = 0; i < 600; i++) {
        pxs[i] = new Circle();
        pxs[i].reset();
    }
    setInterval(draw,rint);
});
}
function draw() {
    con.clearRect(0,0,WIDTH,HEIGHT);
    for(var i = 0; i < pxs.length; i++) {
        pxs[i].fade();
        pxs[i].move();
        pxs[i].draw();
    }
}

function Circle() {
	this.s = {ttl:8000, xmax:5, ymax:2, rmax:4, rt:1, xdef:960, ydef:540, xdrift:3, ydrift: 3, random:true, blink:true};

	this.reset = function() {
		this.x = (this.s.random ? WIDTH*Math.random() : this.s.xdef);
		this.y = (this.s.random ? HEIGHT*Math.random() : this.s.ydef);
		this.r = ((this.s.rmax-1)*Math.random()) + 1;
		this.dx = (Math.random()*this.s.xmax) * (Math.random() < .5 ? -1 : 1);
		this.dy = (Math.random()*this.s.ymax) * (Math.random() < .5 ? -1 : 1);
		this.hl = (this.s.ttl/rint)*(this.r/this.s.rmax);
		this.rt = Math.random()*this.hl;
		this.s.rt = Math.random()+1;
		this.stop = Math.random()*.2+.4;
		this.s.xdrift *= Math.random() * (Math.random() < .5 ? -1 : 1);
		this.s.ydrift *= Math.random() * (Math.random() < .5 ? -1 : 1);
	}

	this.fade = function() {
		this.rt += this.s.rt;
	}

	this.draw = function() {
		if(this.s.blink && (this.rt <= 0 || this.rt >= this.hl)) this.s.rt = this.s.rt*-1;
		else if(this.rt >= this.hl) this.reset();
		var newo = 1-(this.rt/this.hl);
		con.beginPath();
		con.arc(this.x,this.y,this.r,0,Math.PI*2,true);
		con.closePath();
		var cr = this.r*newo;
		g = con.createRadialGradient(this.x,this.y,0,this.x,this.y,(cr <= 0 ? 1 : cr));
		g.addColorStop(0.0, 'rgba(255,255,255,'+newo+')');
		g.addColorStop(this.stop, 'rgba(0,100,150,'+(newo*.6)+')');
		g.addColorStop(1.0, 'rgba(0,100,150,0)');
		con.fillStyle = g;
		con.fill();
	}

	this.move = function() {
		this.x += (this.rt/this.hl)*this.dx;
		this.y += (this.rt/this.hl)*this.dy;
		if(this.x > WIDTH || this.x < 0) this.dx *= -1;
		if(this.y > HEIGHT || this.y < 0) this.dy *= -1;
	}

	this.getX = function() { return this.x; }
	this.getY = function() { return this.y; }
}
              
            
!
999px

Console