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