Template updates, ready to branch web
This commit is contained in:
1 parent
7f84716b59
commit
a9eda304f3
50 files changed
+3718
-75
No files matched your search
@@ -0,0 +1,31 @@
|
||||
TwitchBot Commands List
|
||||
=======================
|
||||
|
||||
Public Commands:
|
||||
!<currency> Displays how many <currency> you have
|
||||
!bid <amount> Bid <amount> <currency> on the current auction
|
||||
!ticket <amount> Buy <amount> tickets for the current raffle
|
||||
!<option> <amount> Used for voting and betting
|
||||
!<bot_name> List of available custom commands
|
||||
!<currency> bet pool Display current betting pool
|
||||
!<currency> vote pool Display current vote standings
|
||||
|
||||
Mod only commands:
|
||||
!<currency> (on/off) Enables or disables currency requests
|
||||
!<currency> auction open Opens a new auction
|
||||
!<currency> auction close Closes the auction and announces winner
|
||||
!<currency> auction cancel Cancels auction, returns <currency> to users
|
||||
!<currency> raffle open <price> <max> Opens a raffle, tickets cost <price>, users can buy a max of <max> tickets
|
||||
!<currency> raffle close/cancel Same as auction functions
|
||||
!<currency> raffle draw Draws a second ticket (second place or need a new winner)
|
||||
|
||||
!<currency> bet open (opt1 opt2 etc) Opens a bet with options !opt1 !opt2 (can have up to 10)
|
||||
!<currency> bet close Stop accepting new bets
|
||||
!<currency> bet cancel Cancel bet, give <currency> back to users
|
||||
!<currency> bet winner (opt1) Makes (!opt1) the winner, pays out to users
|
||||
|
||||
!<currency> vote open (opt1 opt2 etc) Opens a vote with options !opt1 !opt2 (can have up to 10)
|
||||
!<currency> vote close Stop accepting new votes
|
||||
!<currency> vote cancel Cancel vote, give <currency> back to users
|
||||
!<currency> vote winner (opt1) Makes (!opt1) the winner (will make this calculate the winner soon)
|
||||
|
||||
@@ -4,25 +4,13 @@ block content
|
||||
br
|
||||
br
|
||||
div.uk-width-1-1.uk-text-center
|
||||
h1 Potato Fan Art
|
||||
h1 #{ucfirst(title)} Fan Art
|
||||
div.uk-width-1-1
|
||||
div#fan-art.uk-panel.uk-panel-box
|
||||
|
||||
block postscript
|
||||
script.
|
||||
var art = [
|
||||
{
|
||||
url: "https://pbs.twimg.com/media/BjxJdEFCcAAO15X.png:large",
|
||||
user: "Hraugur",
|
||||
user_link: "https://twitter.com/Hraugur"
|
||||
},
|
||||
{
|
||||
url: "https://pbs.twimg.com/media/BjxJdEFCcAAO15X.png:large",
|
||||
user: "Hraugur",
|
||||
user_link: "https://twitter.com/Hraugur"
|
||||
},
|
||||
];
|
||||
|
||||
var art = !{JSON.stringify(fanart)};
|
||||
var $holder = $(".uk-panel-box");
|
||||
art.forEach(function(elem) {
|
||||
var $thumb = $("<a href='"+elem.url+"' class='uk-thumbnail uk-thumbnail-small'></a>");
|
||||
|
||||
@@ -32,11 +32,11 @@ block content
|
||||
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
|
||||
caption Top 10 #{ucfirst(currency)} Farmers
|
||||
thead
|
||||
tr
|
||||
th Viewer
|
||||
th Potatoes
|
||||
th #{ucfirst(currency)}
|
||||
tbody
|
||||
each row in rows
|
||||
tr
|
||||
|
||||
@@ -10,22 +10,47 @@ block content
|
||||
input(class='uk-search-field', type='search', placeholder='Search...')
|
||||
button(class='uk-close', type='reset')
|
||||
table.uk-table.uk-table-hover.uk-table-striped
|
||||
caption Potato Farmer Ladder Rankings
|
||||
caption #{ucfirst(currency)} Farmer Ladder Rankings (<span id="total_farmers"></span> farmers total)
|
||||
thead
|
||||
tr
|
||||
th Rank
|
||||
th Viewer
|
||||
th Potatoes
|
||||
th #{ucfirst(currency)}
|
||||
tbody
|
||||
ul.uk-pagination
|
||||
|
||||
block postscript
|
||||
script.
|
||||
var perPage = 20,
|
||||
data = !{JSON.stringify(rows)};
|
||||
data = !{JSON.stringify(rows)},
|
||||
lastPage = Math.ceil(data.length/perPage);
|
||||
|
||||
function minifyPagination() {
|
||||
var current = parseInt($('li.uk-active').attr('page')),
|
||||
min = Math.max(current-3, 1),
|
||||
max = current+3;
|
||||
|
||||
$('#page_first, #page_last').remove();
|
||||
|
||||
$('ul.uk-pagination > li').addClass('uk-hidden');
|
||||
for(var x = min; x <= max; x++) {
|
||||
$('li#'+x).removeClass('uk-hidden');
|
||||
}
|
||||
|
||||
if (min > 1)
|
||||
$('li#'+min).before("<button id='page_first' class='uk-button'><<</button>");
|
||||
if (max < lastPage)
|
||||
$('li#'+max).after("<button id='page_last' class='uk-button'>>></button>");
|
||||
|
||||
$('#page_first').click(function(){
|
||||
$('li#'+1).click();
|
||||
});
|
||||
$('#page_last').click(function(){
|
||||
$('li#'+lastPage).click();
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// Live search of the ladder listings
|
||||
$('.uk-search-field').keyup(function() {
|
||||
var query = $(this).val();
|
||||
@@ -44,8 +69,8 @@ block postscript
|
||||
});
|
||||
|
||||
// Create pagination buttons
|
||||
for(var i = 1; i <= Math.ceil(data.length/perPage); i++) {
|
||||
var button = $('<li page='+i+'></li>').append('<a>'+i+'</a>');
|
||||
for(var i = 1; i <= lastPage; i++) {
|
||||
var button = $('<li page='+i+' id='+i+'></li>').append('<a>'+i+'</a>');
|
||||
button.on('click', function(){
|
||||
//get page
|
||||
var z = $(this).attr('page');
|
||||
@@ -62,7 +87,7 @@ block postscript
|
||||
b = perPage*z;
|
||||
|
||||
data.slice(a, b).forEach(function(element, index, array){
|
||||
$('table > tbody').append($('<tr></tr>').append('<td>'+(a+index+1)+'</td><td>'+element.user+'</td><td>'+element.points+'</td>'));
|
||||
$('table > tbody').append($('<tr></tr>').append('<td>'+(Number(a+index+1).toLocaleString('en'))+'</td><td>'+element.user+'</td><td>'+element.points+'</td>'));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -76,4 +101,13 @@ block postscript
|
||||
|
||||
// Show the first page when we load up
|
||||
$('ul.uk-pagination > li').first().click();
|
||||
|
||||
minifyPagination();
|
||||
|
||||
$('ul.uk-pagination > li').on('click', function(){
|
||||
minifyPagination();
|
||||
});
|
||||
|
||||
$('#total_farmers').append(Number(data.length).toLocaleString('en'));
|
||||
|
||||
});
|
||||
+23
-20
@@ -8,19 +8,7 @@ html(lang="en")
|
||||
script(src='/lib/uikit/js/uikit.min.js')
|
||||
|
||||
// Favicon stuff
|
||||
link(rel='apple-touch-icon', sizes='57x57', href='/apple-touch-icon-57x57.png')
|
||||
link(rel='apple-touch-icon', sizes='114x114', href='/apple-touch-icon-114x114.png')
|
||||
link(rel='apple-touch-icon', sizes='72x72', href='/apple-touch-icon-72x72.png')
|
||||
link(rel='apple-touch-icon', sizes='144x144', href='/apple-touch-icon-144x144.png')
|
||||
link(rel='apple-touch-icon', sizes='60x60', href='/apple-touch-icon-60x60.png')
|
||||
link(rel='apple-touch-icon', sizes='120x120', href='/apple-touch-icon-120x120.png')
|
||||
link(rel='apple-touch-icon', sizes='76x76', href='/apple-touch-icon-76x76.png')
|
||||
link(rel='apple-touch-icon', sizes='152x152', href='/apple-touch-icon-152x152.png')
|
||||
link(rel='icon', type='image/png', href='/favicon-196x196.png', sizes='196x196')
|
||||
link(rel='icon', type='image/png', href='/favicon-160x160.png', sizes='160x160')
|
||||
link(rel='icon', type='image/png', href='/favicon-96x96.png', sizes='96x96')
|
||||
link(rel='icon', type='image/png', href='/favicon-16x16.png', sizes='16x16')
|
||||
link(rel='icon', type='image/png', href='/favicon-32x32.png', sizes='32x32')
|
||||
link(rel='icon', type='image/png', href='/favicon.ico', sizes='32x32')
|
||||
meta(name='msapplication-TileColor', content='#da532c')
|
||||
meta(name='msapplication-TileImage', content='/mstile-144x144.png')
|
||||
|
||||
@@ -29,12 +17,12 @@ html(lang="en")
|
||||
div.uk-width-1-1
|
||||
div.uk-grid
|
||||
div.uk-width-1-4
|
||||
img(src='/img/#{logo}')
|
||||
img(src='/img/#{logo}', style='max-height:180px;')
|
||||
div.uk-width-2-4
|
||||
// bigimagelogo
|
||||
h1.uk-text-center #{title}<br/>#{slogan}
|
||||
div.uk-width-1-4
|
||||
img.flip.uk-float-right(src='/img/#{logo}')
|
||||
img.flip.uk-float-right(src='/img/#{logo}', style='max-height:180px;')
|
||||
div.uk-width-1-1
|
||||
nav.uk-navbar
|
||||
ul.uk-navbar-nav.uk-navbar-center
|
||||
@@ -43,16 +31,31 @@ html(lang="en")
|
||||
li: a(href='/ladder') Ladder
|
||||
li: a(href='/stats') Chat Stats
|
||||
li: a(href='/fanart') Fan Art
|
||||
li: a(href='http://www.twitter.com/#{twitter}'): img(src='/img/twitter.gif', alt='Twitter')
|
||||
li: a(href='http://www.twitter.com/#{twitter}'): img(src='/img/twitter.png', alt='Twitter')
|
||||
div.uk-width-1-1
|
||||
div.uk-container.uk-container-center
|
||||
block content
|
||||
div.uk-width-1-1
|
||||
footer.uk-text-center
|
||||
br
|
||||
span.tag Visit the potato lord @
|
||||
a(href='http://www.twitch.tv/shaneomad') Shaneomad
|
||||
span.tag Visit the #{ucfirst(currency)} Lord @
|
||||
a(href='http://www.twitch.tv/#{title}') #{title}
|
||||
br
|
||||
span.copyright Potatr (c) DotaNoobs 2014
|
||||
|
||||
span.copyright © DotaNoobs & #{title}. All rights reserved.
|
||||
|
||||
block postscript
|
||||
|
||||
script.
|
||||
$(document).ready(function() {
|
||||
$('span.copyright').prepend(new Date().getFullYear());
|
||||
});
|
||||
script.
|
||||
window._idl = {};
|
||||
_idl.variant = "modal";
|
||||
(function() {
|
||||
var idl = document.createElement('script');
|
||||
idl.type = 'text/javascript';
|
||||
idl.async = true;
|
||||
idl.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'members.internetdefenseleague.org/include/?url=' + (_idl.url || '') + '&campaign=' + (_idl.campaign || '') + '&variant=' + (_idl.variant || 'modal');
|
||||
document.getElementsByTagName('body')[0].appendChild(idl);
|
||||
})();
|
||||
@@ -1,9 +1,6 @@
|
||||
extends layout
|
||||
block content
|
||||
div.uk-grid.uk-height-1-1
|
||||
br
|
||||
br
|
||||
iframe#stats_content.uk-width-1-1(onload="resizeStats(this)")
|
||||
iframe#stats_content.uk-width-1-1(onload="resizeStats(this)")
|
||||
|
||||
block postscript
|
||||
script.
|
||||
@@ -13,4 +10,5 @@ block postscript
|
||||
|
||||
function resizeStats(iframe) {
|
||||
iframe.height = iframe.contentWindow.document.body.scrollHeight + "px";
|
||||
$('div.uk-container.uk-container-center').attr("style", "max-width: 100%!important; padding: 15px 5px;");
|
||||
}
|
||||
Reference in new issue
Block a user