]> git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/main_index.mako
Merge branch 'badges' into approved
[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="hero-unit">
9         <img src="/static/css/img/web_background_l2.png" />
10         #####<p id="statline">Tracking <a href="#">12345</a> players, <a href="#">12345</a> games (<a href="#">123</a> duels, <a href="#">123</a> ctfs, <a href="#">123</a> dms), <a href="#">12345</a> servers, and <a href="#">12345</a> maps since November 2011.</p>
11         <p id="statline">Tracking Xonotic statistics since October 2011.</p>
12       </div>
13 </%block>
14
15 <div class="row">
16   <div class="span4">
17     ##### DUEL RANKS #####
18     <h3>Duel Ranks</h3>
19     <table class="table table-bordered table-condensed">
20       <thead>
21         <tr>
22           <th>#</th>
23           <th>Nick</th>
24           <th>Elo</th>
25         </tr>
26       </thead>
27       <tbody>
28       <% i = 1 %>
29       % for (player_id, nick, elo) in duel_ranks:
30         <tr>
31           <td>${i}</td>
32           % if player_id != '-':
33           <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
34           % else:
35           <td>${nick|n}</td>
36           % endif
37           % if elo != '-':
38           <td>${round(elo, 3)}</td>
39           % else:
40           <td>${elo}</td>
41           % endif
42         </tr>
43         <% i = i+1 %>
44       % endfor
45       </tbody>
46     </table>
47     <p class="note"><a href="${request.route_url('rank_index', page=1, game_type_cd='duel')}" title="See more duel rankings">More...</a></p>
48   </div> <!-- /span4 -->
49
50   <div class="span4">
51     ##### CTF RANKS #####
52     <h3>CTF Ranks</h3>
53     <table class="table table-bordered table-condensed">
54       <thead>
55         <tr>
56           <th>#</th>
57           <th>Nick</th>
58           <th>Elo</th>
59         </tr>
60       </thead>
61       <tbody>
62       <% i = 1 %>
63       % for (player_id, nick, elo) in ctf_ranks:
64         <tr>
65           <td>${i}</td>
66           % if player_id != '-':
67           <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
68           % else:
69           <td>${nick|n}</td>
70           % endif
71           % if elo != '-':
72           <td>${round(elo, 3)}</td>
73           % else:
74           <td>${elo}</td>
75           % endif
76         </tr>
77         <% i = i+1 %>
78       % endfor
79       </tbody>
80     </table>
81     <p class="note"><a href="${request.route_url('rank_index', page=1, game_type_cd='ctf')}" title="See more CTF rankings">More...</a></p>
82   </div> <!-- /span4 -->
83
84   <div class="span4">
85     ##### DM RANKS #####
86     <h3>DM Ranks</h3>
87     <table class="table table-bordered table-condensed">
88       <thead>
89         <tr>
90           <th>#</th>
91           <th>Nick</th>
92           <th>Elo</th>
93         </tr>
94       </thead>
95       <tbody>
96       <% i = 1 %>
97       % for (player_id, nick, elo) in dm_ranks:
98         <tr>
99           <td>${i}</td>
100           % if player_id != '-':
101           <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
102           % else:
103           <td>${nick|n}</td>
104           % endif
105           % if elo != '-':
106           <td>${round(elo, 3)}</td>
107           % else:
108           <td>${elo}</td>
109           % endif
110         </tr>
111         <% i = i+1 %>
112       % endfor
113     </tbody>
114   </table>
115   <p class="note"><a href="${request.route_url('rank_index', page=1, game_type_cd='dm')}" title="See more deathmatch rankings">More...</a></p>
116   </div> <!-- /span4 -->
117 </div> <!-- /row -->
118
119 <div class="row">
120   <div class="span4">
121     <h3>Most Active Players</h3>
122     <table class="table table-bordered table-condensed">
123       <thead>
124         <tr>
125           <th>#</th>
126           <th>Nick</th>
127           <th class="play-time">Play Time</th>
128         </tr>
129       </thead>
130       <tbody>
131       <% i = 1 %>
132       % for (player_id, nick, alivetime) in top_players:
133         <tr>
134           <td>${i}</td>
135           % if player_id != '-':
136           <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
137           % else:
138           <td>${nick|n}</td>
139           % endif
140           <td class="play-time">${alivetime}</td>
141         </tr>
142         <% i = i+1 %>
143       % endfor
144       </tbody>
145     </table>
146     <p class="note">*Most active stats are from the past 7 days</p>
147   </div> <!-- /span4 -->
148
149   <div class="span4">
150     <h3>Most Active Servers</h3>
151     <table class="table table-bordered table-condensed">
152       <thead>
153         <tr>
154           <th>#</th>
155           <th>Server</th>
156           <th>Games</th>
157         </tr>
158       </thead>
159       <tbody>
160       <% i = 1 %>
161       % for (server_id, name, count) in top_servers:
162         <tr>
163           <td>${i}</td>
164           % if server_id != '-':
165           <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
166           % else:
167           <td>${name}</td>
168           % endif
169           <td>${count}</td>
170         </tr>
171         <% i = i+1 %>
172       % endfor
173       </tbody>
174     </table>
175   </div> <!-- /span4 -->
176
177   <div class="span4">
178     <h3>Most Active Maps</h3>
179     <table class="table table-bordered table-condensed">
180       <thead>
181         <tr>
182           <th>#</th>
183           <th>Map</th>
184           <th>Games</th>
185         </tr>
186       </thead>
187       <tbody>
188       <% i = 1 %>
189       % for (map_id, name, count) in top_maps:
190         <tr>
191           <td>${i}</td>
192           % if map_id != '-':
193           <td><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
194           % else:
195           <td>${name}</td>
196           % endif
197           <td>${count}</td>
198         </tr>
199         <% i = i+1 %>
200       % endfor
201       </tbody>
202     </table>
203   </div> <!-- /span4 -->
204 </div> <!-- /row -->
205
206 <div class="row">
207   <div class="span12">
208     <h3>Recent Games</h3>
209     <table class="table table-bordered table-condensed">
210       <thead>
211         <tr>
212           <th></th>
213           <th>Type</th>
214           <th>Server</th>
215           <th>Map</th>
216           <th>Time</th>
217           <th>Winner</th>
218         </tr>
219       </thead>
220       <tbody>
221       % for (game, server, map, pgstat) in recent_games:
222         % if game != '-':
223         <tr>
224           <td><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=game.game_id)}" title="View detailed information about this game">view</a></td>
225           <td class="gt_icon"><img title="${game.game_type_cd}" src="/static/images/icons/24x24/${game.game_type_cd}.png" alt="${game.game_type_cd}" /></td>
226           <td><a href="${request.route_url('server_info', id=server.server_id)}" title="Go to the detail page for this server">${server.name}</a></td>
227           <td><a href="${request.route_url('map_info', id=map.map_id)}" title="Go to the map detail page for this map">${map.name}</a></td>
228           <td><span class="abstime" data-epoch="${game.epoch()}" title="${game.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${game.fuzzy_date()}</span></td>
229           <td>
230             % if pgstat.player_id > 2:
231             <a href="${request.route_url('player_info', id=pgstat.player_id)}" title="Go to the player info page for this player">${pgstat.nick_html_colors()|n}</a></td>
232             % else:
233             ${pgstat.nick_html_colors()|n}</td>
234             % endif
235         </tr>
236         % else:
237         <tr>
238           <td>-</td>
239           <td>-</td>
240           <td>-</td>
241           <td>-</td>
242           <td>-</td>
243           <td>-</td>
244         </tr>
245         % endif
246         % endfor
247         </tbody>
248     </table>
249   </div> <!-- /span12 -->
250 </div> <!-- /row -->