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

              
                #loader
  #please please wait...
  #recipe
#bar
              
            
!

CSS

              
                @import compass

$teal: #10fead
$light-teal: scale-lightness($teal, 30%)
$white: scale-lightness(#00e7b4, 80%)
  
html
  overflow: hidden
  height: 100%
  width: 100%
  color: $white//#333
  background: $teal

#bar
  position: absolute
  bottom: 0
  left: -100%
  height: 10%
  width: 100%
  background-color: $light-teal
  +transition(left .1s)
  
#loader
  $height: 240px
  $width: 840px
  position: absolute
  top: 50%
  left: 50%
  height: $height
  width: $width
  margin: -$height/2 0 0 #{-$width/2}
  
#please
  opacity: 0
  font: bold 24px/60px 'Droid Serif', serif
  
#recipe
  height: 100px
  margin: auto
  font: bold 60px/120px 'Droid Serif', serif
  text-align: center
              
            
!

JS

              
                percentage = 0
$please = $('#please')
$recipe = $('#recipe')
$bar = $('#bar')

foodie = [
  ['baking', 'cooking', 'chopping', 'peeling', 'mixing', 'stirring', 'tasting', 'sautéing', 'scrambling', 'squishing', 'dicing', 'boiling', 'loading', 'drizzling', 'pouring', 'browning', 'carving', 'searing', 'roasting', 'zesting', 'preparing', 'choosing', 'cleaning', 'peeling', 'breaking', 'shaping', 'whipping', 'kneading', 'steaming', 'breading', 'frying', 'grilling', 'stewing', 'buttering', 'reticulating'],
  ['cranberries', 'rosemary', 'strawberries', 'onions', 'spinach', 'sugar', 'pizza', 'popcorn', 'ice cream', 'icing', 'beets', 'celery', 'pomegranites', 'bacon', 'beer', 'lentils', 'turnips', 'peppers', 'flour', 'avocado', 'pumpkin seeds', 'lollipops', 'chocolate', 'donuts', 'lemons', 'ice', 'chillies', 'asparagus', 'dough', 'walnuts', 'chestnuts', 'tubers', 'splines']
]

actions = foodie[0].length
ingredients = foodie[1].length

(fakeLoad = ->
  if percentage >= 100
    clearInterval fakeLoader
    clearInterval rotater
    $please.fadeTo(500, 0)
    $bar.fadeOut(500)
    $recipe.fadeOut(500, ->
      $(this).css
        'font-size': '24px'
        'color': '#333'
      $(this).text("by rileyjshaw").fadeIn(500))
  
  else
    percentage += Math.random() / 2
    $bar.css 'left', "#{-100 + percentage}%"
)

(rotate = ->
  $recipe.fadeOut(500, ->
    $(this).text("#{foodie[0].splice(Math.floor(Math.random() * actions--), 1)} #{foodie[1].splice(Math.floor(Math.random() * ingredients--), 1)}").fadeIn(500))
)()

$please.fadeTo(700, 1)
rotater = setInterval rotate, 4000
fakeLoader = setInterval fakeLoad, 60

incLoad = () ->
  gray.attr 'data-loader', Math.floor percentage
  orange.css
    'width': percentage + '%'
  
              
            
!
999px

Console