mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Clean up Rankings Page
This commit is contained in:
@@ -7,7 +7,7 @@ body {
|
||||
font-family: 'robotoregular';
|
||||
position: fixed;
|
||||
font-size: 2em;
|
||||
cursor: none;
|
||||
/*cursor: none;*/
|
||||
}
|
||||
|
||||
#titlebar {
|
||||
@@ -32,7 +32,6 @@ body {
|
||||
width: 100%;
|
||||
background-color: #0070ff;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
#container {
|
||||
position: fixed;
|
||||
@@ -46,6 +45,10 @@ body {
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
td {
|
||||
padding: 0.2em 1em;
|
||||
}
|
||||
|
||||
@@ -23,27 +23,18 @@ function getData(callback){
|
||||
|
||||
function populateView(){
|
||||
$('#container table').html(template(rankings));
|
||||
equalize(true);
|
||||
equalize();
|
||||
setTimeout(scroll, PAUSE_TIME);
|
||||
}
|
||||
|
||||
// Balance Column Widths
|
||||
var widths = [];
|
||||
function equalize(all){
|
||||
if(all){
|
||||
var width = $('#container table').width();
|
||||
var count = $('#container tr').first().children('td').length;
|
||||
var offset = ($(window).width() - width) / (count + 1);
|
||||
$('#container tr').first().children('td').each(function(){
|
||||
var width = $(this).width()+offset;
|
||||
$(this).width(width);
|
||||
widths.push(width);
|
||||
});
|
||||
$('#header').children('td').each(function(index){
|
||||
$(this).width(widths[index]);
|
||||
});
|
||||
}
|
||||
$('#container table#new tr').first().children('td').each(function(index){
|
||||
function equalize(){
|
||||
$('#container #new tr').first().children('td').each(function(){
|
||||
var width = $(this).width();
|
||||
widths.push(width);
|
||||
});
|
||||
$('#header').children('td').each(function(index){
|
||||
$(this).width(widths[index]);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
<table>
|
||||
<tr id='header'>
|
||||
<td class='rank'>Rank</td>
|
||||
<td class='team'>Team</td>
|
||||
<td class='team'>Name</td>
|
||||
<td class='qs'>QS</td>
|
||||
<td class='assist'>Assist</td>
|
||||
<td class='tc'>Auto</td>
|
||||
<td class='qs'>W-L-T</td>
|
||||
<td>Rank</td>
|
||||
<td>Team</td>
|
||||
<td class='left'>Name</td>
|
||||
<td>QS</td>
|
||||
<td>Assist</td>
|
||||
<td>Auto</td>
|
||||
<td>W-L-T</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user