cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              #wrapper

  #maincontentcontainer
  
    #primary.site-content

      h1.tk-tandelle 
        a(href="http://www.crossfitregeneration.com")
          span.alt CrossFit
          | Regeneration  
      h1.tk-tandelle.small
        | Burpee Equivalent Calculator


      .wod

        h3.tk-tandelle How many burpees does that junk food cost you?
        
        .form-inline
          
          .form-group
              label.control-label Force 
              input#force.form-control.longer(placeholder="Your weight in pounds")
              label.control-label   x  
          .form-group
              label.control-label Distance 
              input#distance.form-control.longer(placeholder="Max head height during the jump in inches")
              label.control-label   =  
          .form-group
              label.control-label Work 
              input#work.form-control.smaller(readonly)
          .form-group
              button#calc.btn.btn-primary Calculate
              
        p.small-text(style='margin-top: 1%;') (Average Vertical jump during 5 minute Burpee test was 5 inches, so assume that plus your height for Distance.)
              
              
        table.table.table-bordered.table-hover
          thead
            tr
              th
                | Food
              th
                | Calories (kcals)
              th
                | # of Burpees
          tbody
          
            tr
              td
                input#foodCustomName.form-control.longer(placeholder="Add your own custom food")
              td
                input#foodCustomCals.range(type="range", min="10", max="2000", step="1")
                input#foodCustomCalsView.form-control.smaller(readonly)
              td
                #foodCustom
                
            tr
              td
                | 1 Slice of Apple Pie (with a scoop of vanilla ice-cream)
              td
                | 420
              td
                #foodApplePie

            tr
              td
                | 1/2 cup of Cranberry sauce 
              td
                | 209
              td
                #foodCranberrySauce

            tr
              td
                | 1 large French Fries
              td
                | 500
              td
                #foodFrenchFries
            tr
              td
                |  1 IPA beer
              td
                |  195
              td
                #foodIpaBeer

            tr
              td
                | 1 Slice of Dominos Peperoni Pizza
              td
                | 260
              td
                #foodSliceDominosPizza

            tr
              td
                | 1 – 8 ounce Ted’s Bison Cheesburger
              td
                | 730
              td
                #foodTedBisonBurger

            tr
              td
                |  1 scoop of Ben Jerry’s Cookie Dough ice cream
              td
                | 270
              td
                #foodScoopBenJerryCookieDough

            tr
              td
                | 1 – 12” Roast beef sub from Subway
              td
                | 970
              td
                #food12RoastBeefSubway

            tr
              td
                | 1 Cola soft drink
              td
                | 200
              td
                #foodColaSoftDrink

            
            tr
              td
                | 1 Plain Bagel
              td
                | 320
              td
                #foodPlainBagel

            
            tr
              td
                | 1 Egg McMuffin Sandwich
              td
                | 300
              td
                #foodEggMcMuffin

            tr
              td
                | 1 Cadbury Creme Egg
              td
                | 59
              td
                #foodCadburyCremeEgg
      
          
      .clear  
      p <a href='http://crossfitregeneration.com'>CrossFitRegeneration.com</a>
      
      p.small-text "Given: 1kcal = 426.4 kg/m. 	External mechanical work or the work that is being performed does not equal the amount of work that is being produce internally, humans aren’t 100% efficient.  Efficiency during running and cycling is about 25%, thus for the body to perform 25 kcals of external work, it must produces 100 kcals of energy internally. That means that the body has to produce 1.47 kcals of internal energy to produce 0.368 kcals of external mechanical work per Burpee repetition." - Dr. Jeff Godin, Ph.D., CSCS.
      p.small-text Idea borrowed from <a href="http://news.spartan.com/burpee-equivalents-understanding-junk-food/">Burpee Equivalents: Understanding Junk Food in terms of your Favorite Exercise</a> by Dr. Jeff Godin, Ph.D., CSCS.


script(src="//use.typekit.net/dlg3oty.js")
script
  | try{Typekit.load();}catch(e){}
  

            
          
!
            
              @import "compass/css3";

#wrapper {
  margin: 1% 5% 5% 5%;
}

.site-content {
  
  .table {
    
    margin-top: 5%;
    
    th, td {
      border-color: #bbb;
    }
    
    th {
      background: #ccc;
    }
    
  }
  
  .small-text {
    font-size: 1em;
    margin-top: 5%;
  }
  
  input.longer {
    width: 300px;
  }
  
  input.smaller {
    width: 80px;
  }
  
  input.range {
    
    float: left;
    margin-right: 5%;
    width: 60%;
    
  }
  
}

.form-group.warning .form-control {
  background: lighten($clr2, 40);
}
            
          
!
            
              var calc = $('#calc'),
    force = $('#force'),
    distance = $('#distance'),
    work = $('#work')
		calculateBurpees = function (cals, work) {
      var burpees = cals / work;
      return Math.ceil(burpees);
    };

$('#foodCustomCalsView').val($('#foodCustomCals').val());

calc.click(function(event) {
  
  event.preventDefault();
  
  if (!force.val()) {
    
    force.parent().addClass('warning');
    
  } else if (!distance.val()) {
    
    distance.parent().addClass('warning');
    
  }  else {
    
    force.parent().removeClass('warning');
    distance.parent().removeClass('warning');
    

    var calcForce = force.val() * 0.453592, // to Kg
        calcdistance = distance.val() * 0.0254, // to meters
        calcWork = ((calcForce * calcdistance) / 426.4) / 0.25;

    work.val(calcWork);
    
    if ($('#foodCustomCals').val()) {
      $('#foodCustom').html(calculateBurpees($('#foodCustomCals').val(), calcWork));
    }
    
    $('#foodApplePie').html(calculateBurpees(420, calcWork));
    $('#foodCranberrySauce').html(calculateBurpees(209, calcWork));
    $('#foodFrenchFries').html(calculateBurpees(500, calcWork));
    $('#foodIpaBeer').html(calculateBurpees(195, calcWork));
    $('#foodSliceDominosPizza').html(calculateBurpees(260, calcWork));
    $('#foodTedBisonBurger').html(calculateBurpees(730, calcWork));
    $('#foodScoopBenJerryCookieDough').html(calculateBurpees(270, calcWork));
    $('#food12RoastBeefSubway').html(calculateBurpees(970, calcWork));
    $('#foodColaSoftDrink').html(calculateBurpees(200, calcWork));
    $('#foodPlainBagel').html(calculateBurpees(320, calcWork));
    $('#foodEggMcMuffin').html(calculateBurpees(300, calcWork));
    $('#foodCadburyCremeEgg').html(calculateBurpees(59, calcWork));
    
  }
  
});

$('#foodCustomCals').on('change', function() {
  $('#foodCustomCalsView').val($('#foodCustomCals').val());
  
  if ($('#work').val()) {
    		$('#foodCustom').html(calculateBurpees($('#foodCustomCals').val(), $('#work').val()));
    }
  
  
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console