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