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