<%inherit file="base.mako"/>
<%block name="title">
-Leaderboard
-</%block>
-
-<%block name="css">
- ${parent.css()}
- <link href="/static/css/sprites.css" rel="stylesheet">
+ Leaderboard
</%block>
<%block name="hero_unit">
<div class="text-center">
- <img src="/static/css/img/web_background_l2.png" />
- % if summary_stats is None:
- <p id="statline">Tracking Xonotic statistics since October 2011.</p>
+ <img src="/static/css/img/xonotic-logo.png" />
+ % if stat_line is None:
+ <p class="statline">Tracking Xonotic statistics since October 2011.</p>
% else:
- <p id="statline">Tracking <a href="${request.route_url('player_index')}">${'{:2,d}'.format(summary_stats.total_players)}</a> players, <a href="${request.route_url('game_index')}">${'{:2,d}'.format(summary_stats.total_games)}</a> games (${'{:2,d}'.format(summary_stats.duel_games)} duel; ${'{:2,d}'.format(summary_stats.ctf_games)} ctf; ${'{:2,d}'.format(summary_stats.dm_games)} dm) and <a href="${request.route_url('server_index')}">${'{:2,d}'.format(summary_stats.total_servers)}</a> servers since October 2011.</p>
+ <p class="statline">Tracking ${stat_line|n} since October 2011.</p>
% endif
% if day_stat_line is not None:
- <p id="statline">${day_stat_line|n}</p>
+ <p class="statline">${day_stat_line|n} in the past 24 hours.</p>
% endif
</div>
</%block>
-##### RANKS #####
-% if len(ranks) < 4:
- <div class="row">
- <div class="span12">
- <p style="text-align: center;"><i class="icon-white icon-info-sign"> </i> You don't seem to have any ranks yet.</p>
- </div> <!-- span12 -->
- </div> <!-- row -->
-
-% else:
- <div class="row">
- % for rs in ranks[:4]:
- % if len(rs) > 0:
- <div class="span3">
- % if rs[0].game_type_cd == 'duel':
- <h3>Duel Ranks</h3>
- % elif rs[0].game_type_cd == 'ctf':
- <h3>CTF Ranks</h3>
- % elif rs[0].game_type_cd == 'dm':
- <h3>DM Ranks</h3>
- % elif rs[0].game_type_cd == 'tdm':
- <h3>TDM Ranks</h3>
- % endif
+##### ACTIVE PLAYERS #####
+<div class="row">
+ <div class="small-12 large-4 columns">
+ <h5>Most Active Players <a href="${request.route_url('top_players_index')}" title="See more player activity"><i class="fa fa-plus-circle"></i></a></h5>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th style="width:40px;">#</th>
- <th style="width:150px;">Nick</th>
- <th style="width:60px;">Elo</th>
+ <th class="small-2">#</th>
+ <th class="small-7">Nick</th>
+ <th class="small-3">Time</th>
</tr>
</thead>
<tbody>
- <% i = 1 %>
- % for r in rs:
- <tr>
- <td>${i}</td>
- <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=r.player_id)}" title="Go to the player info page for this player">${r.nick_html_colors()|n}</a></td>
- <td>${int(round(r.elo))}</td>
- </tr>
- <% i = i+1 %>
+ % for tp in top_players:
+ <tr>
+ <td>${tp.sort_order}</td>
+ <td class="no-stretch"><a href="${request.route_url('player_info', id=tp.player_id)}" title="Go to the player info page for this player">${tp.nick_html_colors()|n}</a></td>
+ <td>${tp.alivetime}</td>
+ </tr>
% endfor
</tbody>
</table>
- <p class="note"><a href="${request.route_url('rank_index', page=1, game_type_cd=rs[0].game_type_cd)}" title="See more ${rs[0].game_type_cd} rankings">More...</a></p>
- </div> <!-- /span4 -->
- % endif
-
- % endfor
-</div> <!-- row -->
-% endif
-
-
-##### ACTIVE PLAYERS #####
-<div class="row">
- <div class="span4">
- <h3>Most Active Players</h3>
- <table class="table table-hover table-condensed">
- <thead>
- <tr>
- <th style="width:40px;">#</th>
- <th style="width:150px;">Nick</th>
- <th class="play-time" style="width:90px;">Play Time</th>
- </tr>
- </thead>
- <tbody>
- <% i = 1 %>
- % for (player_id, nick, alivetime) in top_players:
- <tr>
- <td>${i}</td>
- % if player_id != '-':
- <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
- % else:
- <td class="nostretch" style="max-width:150px;">${nick|n}</td>
- % endif
- <td class="play-time">${alivetime}</td>
- </tr>
- <% i = i+1 %>
- % endfor
- </tbody>
- </table>
- <p class="note"><a href="${request.route_url('top_players_by_time', page=1)}" title="See more player activity">More...</a></p>
- </div> <!-- /span4 -->
+ </div>
##### ACTIVE SERVERS #####
- <div class="span4">
- <h3>Most Active Servers</h3>
+ <div class="small-12 large-4 columns">
+ <h5>Most Active Servers <a href="${request.route_url('top_servers_index')}" title="See more server activity"><i class="fa fa-plus-circle"></i></a></h5>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th style="width:40px;">#</th>
- <th style="width:180px;">Server</th>
- <th style="width:60px;">Games</th>
+ <th class="small-2">#</th>
+ <th class="small-7">Server</th>
+ <th class="small-3" title="Total accumulated player time on the server">Time</th>
</tr>
</thead>
<tbody>
- <% i = 1 %>
- % for (server_id, name, count) in top_servers:
+ % for ts in top_servers:
<tr>
- <td>${i}</td>
- % if server_id != '-':
- <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
- % else:
- <td class="nostretch" style="max-width:180px;">${name}</td>
- % endif
- <td>${count}</td>
+ <td>${ts.sort_order}</td>
+ <td class="no-stretch"><a href="${request.route_url('server_info', id=ts.server_id)}" title="Go to the server info page for ${ts.server_name}">${ts.server_name}</a></td>
+ <td>${ts.play_time_str(max_segments=2)}</td>
</tr>
- <% i = i+1 %>
% endfor
</tbody>
</table>
- <p class="note"><a href="${request.route_url('top_servers_by_players', page=1)}" title="See more server activity">More...</a></p>
- </div> <!-- /span4 -->
+ </div>
##### ACTIVE MAPS #####
- <div class="span4">
- <h3>Most Active Maps</h3>
+ <div class="small-12 large-4 columns">
+ <h5>Most Active Maps <a href="${request.route_url('top_maps_index')}" title="See more map activity"><i class="fa fa-plus-circle"></i></a></h5>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th style="width:40px;">#</th>
- <th style="width:180px;">Map</th>
- <th style="width:60px;">Games</th>
+ <th class="small-2">#</th>
+ <th class="small-7">Map</th>
+ <th class="small-3">Games</th>
</tr>
</thead>
<tbody>
- <% i = 1 %>
- % for (map_id, name, count) in top_maps:
+ % for tm in top_maps:
<tr>
- <td>${i}</td>
- % if map_id != '-':
- <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
- % else:
- <td class="nostretch" style="max-width:180px;">${name}</td>
- % endif
- <td>${count}</td>
+ <td>${tm.sort_order}</td>
+ <td class="no-stretch"><a href="${request.route_url('map_info', id=tm.map_id)}" title="Go to the map info page for ${tm.map_name}">${tm.map_name}</a></td>
+ <td>${tm.games}</td>
</tr>
- <% i = i+1 %>
% endfor
</tbody>
</table>
- <p class="note"><a href="${request.route_url('top_maps_by_times_played', page=1)}" title="See more map activity">More...</a></p>
- </div> <!-- /span4 -->
-</div> <!-- /row -->
-<row class="span12">
- <p class="note">*Most active stats are from the past 7 days</p>
+ </div>
+</div>
+
+<div class="row">
+ <div class="small-12 columns">
+ <small>*Most active stats are from the past 7 days</small>
+ </div>
</div>
##### RECENT GAMES #####
% if len(recent_games) > 0:
<div class="row">
- <div class="span12">
- <h3>Recent Games</h3>
+ <div class="small-12 columns">
+ <h5>Recent Games <a href="${request.route_url('game_index')}"><i class="fa fa-plus-circle"></i></a></h5>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th></th>
- <th>Type</th>
- <th>Server</th>
- <th>Map</th>
- <th>Time</th>
- <th>Winner</th>
+ <th class="small-1 text-center"></th>
+ <th class="small-1">Type</th>
+ <th class="show-for-medium-up small-3">Server</th>
+ <th class="show-for-medium-up small-2">Map</th>
+ <th class="show-for-large-up small-2">Time</th>
+ <th class="small-3">Winner</th>
</tr>
</thead>
<tbody>
% for rg in recent_games:
<tr>
- <td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
- <td class="tdcenter"><span class="sprite sprite-${rg.game_type_cd}" alt="${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
- <td><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
- <td><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the map detail page for this map">${rg.map_name}</a></td>
- <td><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
- <td class="nostretch">
+ <td class="text-center"><a class="button tiny" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
+ <td class="text-center"><span class="sprite sprite-${rg.game_type_cd}" alt="${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
+ <td class="show-for-medium-up no-stretch"><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
+ <td class="show-for-medium-up"><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the map detail page for this map">${rg.map_name}</a></td>
+ <td class="show-for-large-up"><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
+ <td class="no-stretch">
% if rg.player_id > 2:
<a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a></td>
% else:
% endfor
</tbody>
</table>
- <p><a href="${request.route_url('game_index')}">More...</a></p>
- </div> <!-- /span12 -->
-</div> <!-- /row -->
+ </div>
+</div>
% endif