You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.5 KiB
60 lines
2.5 KiB
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
|
|
br
|
|
div#betstats
|
|
span.uk-text-bold Betting is currently:
|
|
#{bet_status}
|
|
if bet_status === true
|
|
span.uk-text-bold.uk-text-success Active
|
|
else
|
|
span.uk-text-bold.uk-text-danger Inactive
|
|
if bet_board
|
|
table.uk-table
|
|
caption Current Betting Pool
|
|
thead
|
|
tr
|
|
th Option
|
|
th Total
|
|
tbody
|
|
each option in bet_board
|
|
tr
|
|
td !#{option.name}
|
|
td #{option.total}
|
|
br
|
|
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("<span>Game:</span> <span class='uk-text-bold uk-text-success'>"+data.stream.game+"</span><br/>");
|
|
$("#streambox").append("<span>Viewers:</span> <span class='uk-text-bold uk-text-warning'>"+data.stream.viewers+"</span><br/>");
|
|
$("#streambox").append("<br/><br/><img src='"+data.stream.preview.medium+"' />");;
|
|
} else {
|
|
$("#streambox").append("<h3 class='uk-text-danger'>Offline</h3>");
|
|
$("#betstats").hide();
|
|
}
|
|
});
|
|
});
|