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

Auto Save

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

              
                <!-- Uses data from this google form https://docs.google.com/forms/d/e/1FAIpQLScAYYHXJQUUWTAqzOx2sWRg1Ie26MPL37UBVqVtB7JlL3Sz-g/viewform?usp=form_confirm -->

<body data-gsheet="https://docs.google.com/spreadsheets/d/1p3qu73cfmCboxa9OSWYMe0ZvH4XaUI6dWIUWIKMyvz0/pubhtml">
  <div id="leader">Winner: </div>
  <table id="names">
    <th>
      Name
    </th>
    <th>Best Picture</th>
    <th>Leading Actress</th>
    <th>Leading Actor</th>
    <th>Supporting Actress</th>
    <th>Supporting Actor</th>
    <th>Animated Feature</th>
    <th>Cinematography</th>
    <th>Costume Design</th>
    <th>Director</th>
    <th>Documentary Feature</th>
    <th>Documentary Short</th>
    <th>Film Editing</th>
    <th>Foreigh Language</th>
    <th>Make up / Hair</th>
    <th>Original Score</th>
    <th>Original Song</th>
    <th>Animated Short</th>
    <th>Live Action Short</th>
    <th>Sound Editing</th>
    <th>Sound Mixing</th>
    <th>Visual Effects</th>
    <th>Adapted Screenplay</th>
    <th>Origional Screenplay</th>
    <th>Production Design</th>
  </table>
  
</body>
              
            
!

CSS

              
                html{
  font-family:arial;
  font-weight:300;
  color: #444242;
}

body{
  padding:20px;
}

#leader{
  margin: 0 0 40px 0;
}

.correct{
  background-color: #f1f446;
}

.incorrect{
  background-color: #f2f2f2;
}

.count{
  display:block;
  clear:both;
}

table{
  width:auto;
  padding:20px;
  border-collapse: collapse; 
  tr{
    border-bottom: 1px solid #ccc;
  }
  td{
   
    position:relative;
    height:80px;
    min-width:200px;
    padding:5px;
    background-color: #fff;
  }
  
  tr:hover td{
    // color: #e05b18;
  }
  td:hover{
    // border: 1px solid #e05b18;
    cursor:pointer;
    &:before{
      display: block;
      position:absolute;
      content: attr(data-cat);
      font-size:.75em;
      top:0;
      left:0;
      width:100%;
      color:#fff;
      background-color:#444242;
      padding:2px;
    }
    &:after{
      display: block;
      position:absolute;
      content: attr(data-name);
      font-size:.75em;
      bottom:0;
      left:0;
      width:96%;
      color:#fff;
      background-color:#444242;
      padding:2px 5px;
      text-align:right;
    }
  }

}
              
            
!

JS

              
                $(document).ready(function() {
  var gsheet = $('body').data("gsheet");
  var gshort =gsheet.substring(gsheet.lastIndexOf("/d/")+3,gsheet.lastIndexOf("/"));
console.log('https://spreadsheets.google.com/feeds/list/'+gshort+'/1/public/values?alt=json');
  
  $.getJSON('https://spreadsheets.google.com/feeds/list/'+gshort+'/1/public/values?alt=json', function(data) {
    var entry = data.feed.entry;
    
    
    
    $(entry).each(function(){
      
      var subid = this.gsx$yourname.$t;
      subid = subid.replace(/\s+/g, '');

      var submission = ('<td>'+this.gsx$yourname.$t+'</td><td>'+this.gsx$oscarnomineeforbestpicture.$t+'</td><td>'+this.gsx$oscarnomineeforbestactressinaleadingrole.$t+'</td><td>'+this.gsx$oscarnomineeforbestactorinaleadingrole.$t+'</td><td>'+this.gsx$oscarnomineeforbestactressinasupportingrole.$t+'</td><td>'+this.gsx$oscarnomineeforbestactorinasupportingrole.$t+'</td><td>'+this.gsx$oscarnomineeforbestanimatedfeaturefilm.$t+'</td><td>'+this.gsx$oscarnomineeforbestcinematography.$t+'</td><td>'+this.gsx$oscarnomineeforbestcostumedesign.$t+'</td><td>'+this.gsx$oscarnomineeforbestdirector.$t+'</td><td>'+this.gsx$oscarnomineeforbestdocumentaryfeature.$t+'</td><td>'+this.gsx$oscarnomineeforbestdocumentaryshort.$t+'</td><td>'+this.gsx$oscarnomineeforbestfilmediting.$t+'</td><td>'+this.gsx$oscarnomineeforbestforeignlanguagefilm.$t+'</td><td>'+this.gsx$oscarnomineeforbestmakeupandhairstyling.$t+'</td><td>'+this.gsx$oscarnomineeforbestmusicoriginalscore.$t+'</td><td>'+this.gsx$oscarnomineeforbestmusicoriginalsong.$t+'</td><td>'+this.gsx$oscarnomineeforbestshortfilmanimated.$t+'</td><td>'+this.gsx$oscarnomineeforbestshortfilmliveaction.$t+'</td><td>'+this.gsx$oscarnomineeforbestsoundediting.$t+'</td><td>'+this.gsx$oscaroscarnomineeforbestsoundmixing.$t+'</td><td>'+this.gsx$oscarnomineeforbestvisualeffects.$t+'</td><td>'+this.gsx$oscarnomineeforbestwritingadaptedscreenplay.$t+'</td><td>'+this.gsx$oscarnomineeforbestoriginalscreenplay.$t+'</td><td>'+this.gsx$oscarnomineeforproductiondesign.$t+'</td>');

      
      var newlist = '<tr id="'+subid+'" class="submission" data-name="'+this.gsx$yourname.$t+'">'+submission+'</tr>';
      
      $("#names").append(newlist);

    });
    
    $("td").each(function(){

      var submitted = $(this).text();
      var check = $(this).index();
      var winner = $('#winners td:eq('+check+')').text();
      
      if (check == 0){
        
      }else{
         if (winner !== ""){
            if (submitted == winner){
              $(this).addClass("correct");
            }else{
              $(this).addClass("incorrect");
            }
         }
      }
      
      var category = $('th:eq('+check+')').text();
      var submitter = $(this).parent("tr").find("td:eq(0)").text();
      $(this).attr("data-cat", category);
      $(this).attr("data-name", submitter);

    });
    
    $("tr").each(function(){
      var id = $(this).attr("ID");
      var count = $(this).find(".correct").length;
      countBlock = '<span class="count">('+count+')</span>';
      $(this).find('td:eq(0)').append(countBlock);
      
      $(this).attr("data-num", count);
    });
    
    var highestNum = -1;

    $("tr").each(function(){
      var check = $(this).index();
      
     if (check == 0 || check == 12){   
     }else{
        var num = +this.getAttribute("data-num") ;
        if (num > highestNum) 
            highestNum = num;
     }
    }).each(function(){
      var check = $(this).index();
      
     if (check == 0 || check == 12){   
     }else{
      var leader = $(this).data("name");
      var number = $(this).data("num");
      var group = '<span>'+leader+' ('+number+') </span>';
        if (highestNum === +this.getAttribute("data-num") )
            $("#leader").append(group);
     }
    });
    
 }); // end get
  
  

  
});
              
            
!
999px

Console