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

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

              
                <!--

Famo.us is a free, open source Javascript development platform that can build apps, games and interfaces using HTML5 and WebGL.

NOTE: This is a demo based on an old version of the framework.  For an updated version of the framwork, and more demos, visit http://famo.us.


-->
              
            
!

CSS

              
                /* begin styling */
html { 
    background-color: #111;
    color: white;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-size: 14px;
}

#main {
    -webkit-perspective: 500px;
    perspective: 500px; 
}


h1, h2, h3 {
    font-family: 'Avenir Next W10 Bold';
}

p { 
    font-family: 'Avenir Next W01 Thin';
}
a { 
    font-family: 'Avenir Next W10 Medium';
}

.backfaceVisible {
    backface-visibility: visible;
    -webkit-backface-visibility: visible; /* Chrome and Safari */
    -moz-backface-visibility: visible; /* Firefox */
}
.white              { color: white; }

.bor_clear  { border: 0; }
.bor_clear:focus { outline: 0 }

.left       { float: left; }
.right      { float: right; }
.inline     { display: inline; }
.block      { display: block; } 
.clear      { clear: both; }
.absolute   { position: absolute }

.description-panel {
    background-color: rgba(77, 77, 77, 0.5);
}
.description-closing-tab {
    border: 1px solid white;
}

/* INTERFACE.JS */
.textinput
{        
    height:40px; 
    width:100%; 
    padding-left: 6px;     
    padding-top: 0px;     
    color: rgba(255, 255, 255, .750);
    font-size: 24px; 
    font-family: 'Avenir Next W10 Thin';
    background-color:rgba(0, 0, 0, 1.0); 
    border: 1px solid rgba(255, 255, 255, .750);   
    outline-width: 0px;
}

.textinput:focus
{
    color: rgba(255, 255, 255, 1.0);
    border: 1px solid rgba(255, 255, 255, 1.0);   
    outline-width: 0px;    
}

.submit
{
    padding-top: 9px;
    padding-left: 4px;
    line-height: 24px;
    font-size: 24px; 
    font-family: 'Avenir Next W10 Thin';   
}


/* BACKTILE.JS */
.lightbox-title { 
    font-family: 'Avenir Next W10 Medium';
    padding-bottom: 20px;
    float: left;
}
.lightbox-spanish-title { 
    font-family: 'Avenir Next W10 Medium';
    font-style: italic;
    color: #ccc;
    float: left;
    clear: both;
}

.lightbox-tag-title { 
    font-family: 'Avenir Next W10 Medium';
    color: #93CFB5;
    font-size: 14px;
    line-height: 10px;
    padding-bottom: 15px;
}
.lightbox-tag-content { 
    font-size: 20px;
    padding-bottom: 20px;
    line-height: 28px;
}

.lightbox-thumb { 
    background: -moz-radial-gradient(center, ellipse cover,  rgba(0,0,0,0.47) 0%, rgba(0,0,0,0.73) 85%, rgba(0,0,0,0.77) 100%); /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(0,0,0,0.47)), color-stop(85%,rgba(0,0,0,0.73)), color-stop(100%,rgba(0,0,0,0.77))); /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover,  rgba(0,0,0,0.47) 0%,rgba(0,0,0,0.73) 85%,rgba(0,0,0,0.77) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover,  rgba(0,0,0,0.47) 0%,rgba(0,0,0,0.73) 85%,rgba(0,0,0,0.77) 100%); /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover,  rgba(0,0,0,0.47) 0%,rgba(0,0,0,0.73) 85%,rgba(0,0,0,0.77) 100%); /* IE10+ */
    background: radial-gradient(ellipse at center,  rgba(0,0,0,0.47) 0%,rgba(0,0,0,0.73) 85%,rgba(0,0,0,0.77) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#78000000', endColorstr='#c4000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
    border: 2px solid #93CFB5;
    cursor: pointer;
}
h1.lightbox-thumb-tile { 
    font-family: 'Avenir Next W10 Medium'; 
    //color: #93CFB5;
    //color: #65cfa1;
    color: #57FFB6;
    text-transform: uppercase;
}
h5.lightbox-thumb-year {
    padding-top: 20px;
    font-family: 'Avenir Next W10 Thin'; 
}


.gradient-bg { 
    background: -webkit-linear-gradient(left, 
        rgba(105,94,127,0.54) 0%,
        rgba(255,92,92,0.57) 15%,
        rgba(255,160,17,0.59) 27%,
        rgba(252,236,93,0.61) 37%,
        rgba(255,229,145,0.63) 46%,
        rgba(111,196,173,0.65) 58%,
        rgba(106,132,186,0.67) 69%,
        rgba(209,119,195,0.69) 79%,
        rgba(216,213,125,0.7) 89%,
        rgba(216,213,125,0.72) 100%), 
        -webkit-repeating-linear-gradient(-45deg, rgba(255,255,255,0.5), 
        transparent 20px, 
        rgba(255,255,255,0.3) 40px)
}

.core-nextDescription a {
    color: #ffffff;
    line-height: 18px;
}
.core-next-demo { 
    font-size: 12px;
    color: #ccc;
    font-family: 'Avenir Next W10 Medium';   
}
.core-next-name { 
    color: #ffffff;
    font-family: 'Avenir Next W10 Medium';   
}

.textinput
{        
    height:40px; 
    width:100%; 
    padding-left: 6px;     
    padding-top: 0px;     
    color: rgba(255, 255, 255, .750);
    font-size: 24px; 
    font-family: 'Avenir Next W10 Thin';
    background-color:rgba(0, 0, 0, 0.0); 
    border: 1px solid rgba(255, 255, 255, .750);   
    outline-width: 0px;
    background-color: #222;
}

.textinput:focus
{
    color: rgba(255, 255, 255, 1.0);
    border: 1px solid rgba(255, 255, 255, 1.0);   
    outline-width: 0px;    
}

.submit
{
    padding-top: 9px;
    padding-left: 4px;
    line-height: 24px;
    font-size: 24px; 
    font-family: 'Avenir Next W10 Thin';   
}
.core-error { 
    font-family: 'Avenir Next W10 Medium';   
}
              
            
!

JS

              
                //  CodePen Evaluation License
//  
//  Copyright (c) 2013 Famous Industries, Inc.
//  
//  Non-sublicensable permission is hereby granted, free of charge, to any person obtaining a 
//  copy of this software and associated documentation files directly from codepen.io (the 
//  "Software"), solely to internally make and internally use copies of the Software to test, 
//  explore, and evaluate the Software solely in such person’s non-commercial, non-
//  production environments, provided that the above copyright notice and this permission 
//  notice shall be included in all copies or substantial portions of the Software. 
//  
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
//  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
//  MERCHANTABILITY, FITNESS FOR A ARTICULAR PURPOSE AND 
//  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
//  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
//  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
//  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
//  SOFTWARE.
//


Famous(function(require,exports,module)
{    
    require('famous-sync/FastClick');
    // ANIMATIONS!
    var RegisterEasing  = require('famous-animation/RegisterEasing');

    // Physics!!
    var Transitionable  = require('famous/Transitionable');
    var PhysicsTrans    = require('famous-physics/utils/PhysicsTransition');
    Transitionable.registerMethod('physics', PhysicsTrans);
    
    var Surface         = require('famous/Surface'); 
    var Engine          = require('famous/Engine');        
    var Utility         = require('famous/Utility');
    var Time            = require('famous-utils/Time');
    var KeyCodes        = require('famous-utils/KeyCodes');
    var SceneController = require('app/SceneController');

    var LightboxScene   = require('app/scenes/LightboxScene');
    var BlankLightbox   = require('app/scenes/BlankLightbox');

    var mainCtx = Engine.createContext();
    mainCtx.setPerspective( 1000 );

    mainCtx.add( SceneController );
    
    SceneController.addScenes({
        'lightbox' : LightboxScene,
        'blank'    : BlankLightbox
    });

    SceneController.setScene('lightbox');

    Engine.on('keydown', function ( e ) {

        if( e.keyCode == KeyCodes.LEFT_ARROW ) { 
            SceneController.prev();

        } else if ( e.keyCode == KeyCodes.RIGHT_ARROW ) {
            SceneController.next();

        }
    }); 
});

              
            
!
999px

Console