]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/main_index.mako
Remove ranks from the front page.
[xonotic/xonstat.git] / xonstat / templates / main_index.mako
1 <%inherit file="base.mako"/>
2
3 <%block name="title">
4   Leaderboard
5 </%block>
6
7 <%block name="hero_unit">
8   <div class="text-center">
9     <img src="/static/css/img/xonotic-logo.png" />
10     % if stat_line is None:
11       <p class="statline">Tracking Xonotic statistics since October 2011.</p>
12     % else:
13       <p class="statline">Tracking ${stat_line|n} since October 2011.</p>
14     % endif
15
16     % if day_stat_line is not None:
17       <p class="statline">${day_stat_line|n} in the past 24 hours.</p>
18     % endif
19   </div>
20 </%block>
21
22
23 ##### ACTIVE PLAYERS #####
24 <div class="row">
25   <div class="small-12 large-4 columns">
26     <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>
27       <table class="table table-hover table-condensed">
28         <thead>
29           <tr>
30             <th class="small-2">#</th>
31             <th class="small-7">Nick</th>
32             <th class="small-3">Time</th>
33           </tr>
34         </thead>
35         <tbody>
36         % for tp in top_players:
37           <tr>
38             <td>${tp.sort_order}</td>
39             <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>
40             <td>${tp.alivetime}</td>
41           </tr>
42         % endfor
43         </tbody>
44       </table>
45   </div>
46
47
48 ##### ACTIVE SERVERS #####
49   <div class="small-12 large-4 columns">
50     <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>
51     <table class="table table-hover table-condensed">
52       <thead>
53         <tr>
54           <th class="small-2">#</th>
55           <th class="small-7">Server</th>
56           <th class="small-3" title="Total accumulated player time on the server">Time</th>
57         </tr>
58       </thead>
59       <tbody>
60       % for ts in top_servers:
61         <tr>
62           <td>${ts.sort_order}</td>
63           <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>
64           <td>${ts.play_time_str(max_segments=2)}</td>
65         </tr>
66       % endfor
67       </tbody>
68     </table>
69   </div>
70
71
72 ##### ACTIVE MAPS #####
73   <div class="small-12 large-4 columns">
74     <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>
75     <table class="table table-hover table-condensed">
76       <thead>
77         <tr>
78           <th class="small-2">#</th>
79           <th class="small-7">Map</th>
80           <th class="small-3">Games</th>
81         </tr>
82       </thead>
83       <tbody>
84       % for tm in top_maps:
85         <tr>
86           <td>${tm.sort_order}</td>
87           <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>
88           <td>${tm.games}</td>
89         </tr>
90       % endfor
91       </tbody>
92     </table>
93   </div>
94 </div>
95
96 <div class="row">
97   <div class="small-12 columns">
98     <small>*Most active stats are from the past 7 days</small>
99   </div>
100 </div>
101
102
103 ##### RECENT GAMES #####
104 % if len(recent_games) > 0:
105 <div class="row">
106   <div class="small-12 columns">
107     <h5>Recent Games <a href="${request.route_url('game_index')}"><i class="fa fa-plus-circle"></i></a></h5>
108     <table class="table table-hover table-condensed">
109       <thead>
110         <tr>
111           <th class="small-1 text-center"></th>
112           <th class="small-1">Type</th>
113           <th class="show-for-medium-up small-3">Server</th>
114           <th class="show-for-medium-up small-2">Map</th>
115           <th class="show-for-large-up small-2">Time</th>
116           <th class="small-3">Winner</th>
117         </tr>
118       </thead>
119       <tbody>
120       % for rg in recent_games:
121         <tr>
122           <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>
123           <td class="text-center"><span class="sprite sprite-${rg.game_type_cd}" alt="${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
124           <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>
125           <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>
126           <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>
127           <td class="no-stretch">
128             % if rg.player_id > 2:
129             <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>
130             % else:
131             ${rg.nick_html_colors|n}</td>
132             % endif
133         </tr>
134         % endfor
135         </tbody>
136     </table>
137   </div>
138 </div>
139 % endif