extends layout
block content
div.uk-grid
br
br
div.uk-width-1-2
div.uk-panel.uk-panel-box
h2 #{title} is
span#status offline.
div#streambox
div.uk-width-1-2
div.uk-panel.uk-panel-box
table.uk-table.uk-table-hover.uk-table-striped
caption Top 10 Potato Farmers
thead
tr
th Viewer
th Potatoes
tbody
each row in rows
tr
td #{row.user}
td #{row.points}
block postscript
script.
$(document).ready(function(){
$.getJSON('https://api.twitch.tv/kraken/streams/#{title}?callback=?', function(data){
if(data.stream) {
$('#status').empty().append('online!');
$("#streambox").append("Game: "+data.stream.game+"
");
$("#streambox").append("Viewers: "+data.stream.viewers+"
");
$("#streambox").append("
");;
} else {
$("#streambox").append("