]> git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/main_index.mako
Applied Xonotic HTML/CSS/JS theme and worked existing HTML/CSS
[xonotic/xonstat.git] / xonstat / templates / main_index.mako
1 <%inherit file="base.mako"/>\r
2 \r
3 <%block name="title">\r
4 Main Page - ${parent.title()}\r
5 </%block>\r
6 \r
7 <div id="sidebar" class="leaderboard left">\r
8 \r
9 ##### TOP PLAYERS #####\r
10 <h2>Top Players</h2>\r
11 <table id="top-players">\r
12         <thead>\r
13                 <tr>\r
14                         <th>#</th>\r
15                         <th>Nick</th>\r
16                         <th>Score</th>\r
17                 </tr>\r
18         </thead>\r
19         <tbody>\r
20         <% i = 1 %>\r
21         % for (player_id, nick, score) in top_players:\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|n}</a></td>\r
26                         % else:\r
27                         <td>${nick}</td>\r
28                         % endif\r
29                         <td>${score}</td>\r
30                 </tr>\r
31                 <% i = i+1 %>\r
32         % endfor\r
33         </tbody>\r
34 </table>\r
35 \r
36 ##### TOP SERVERS #####\r
37 <h2>Top Servers</h2>\r
38 <table id="top-servers">\r
39         <thead>\r
40                 <tr>\r
41                         <th>#</th>\r
42                         <th>Server</th>\r
43                         <th>Games</th>\r
44                 </tr>\r
45         </thead>\r
46         <tbody>\r
47         <% i = 1 %>\r
48         % for (server_id, name, count) in top_servers:\r
49                 <tr>\r
50                         <td>${i}</td>\r
51                         % if server_id != '-':\r
52                         <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>\r
53                         % else:\r
54                         <td>${name}</td>\r
55                         % endif\r
56                         <td>${count}</td>\r
57                 </tr>\r
58                 <% i = i+1 %>\r
59         % endfor\r
60         </tbody>\r
61 </table>\r
62 \r
63 ##### TOP MAPS #####\r
64 <h2>Top Maps</h2>\r
65 <table id="top-maps">\r
66         <thead>\r
67                 <tr>\r
68                         <th>#</th>\r
69                         <th>Map</th>\r
70                         <th>Times Played</th>\r
71                 </tr>\r
72         </thead>\r
73         <tbody>\r
74         <% i = 1 %>\r
75         % for (map_id, name, count) in top_maps:\r
76                 <tr>\r
77                         <td>${i}</td>\r
78                         % if map_id != '-':\r
79                         <td><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>\r
80                         % else:\r
81                         <td>${name}</td>\r
82                         % endif\r
83                         <td>${count}</td>\r
84                 </tr>\r
85                 <% i = i+1 %>\r
86         % endfor\r
87         </tbody>\r
88 </table>\r
89 </div> <!-- END LEADERBOARD -->\r
90 \r
91 <div id="main" class="right">\r
92 \r
93 ##### RECENT GAMES #####\r
94 <h2>Recent Games</h2>\r
95 <table id="recent-games">\r
96         <thead>\r
97                 <tr>\r
98                         <th>Game #</th>\r
99                         <th>Type</th>\r
100                         <th>Server</th>\r
101                         <th>Map</th>\r
102                         <th>Time</th>\r
103                         <th>Winner</th>\r
104                 </tr>\r
105         </thead>\r
106         <tbody>\r
107         % for (game, server, map) in recent_games:\r
108                 % if game != '-':\r
109                 <tr>\r
110                         <td><a href="${request.route_url('game_info', id=game.game_id)}" title="View detailed information about this game">${game.game_id}</a></td>\r
111                         <td>${game.game_type_cd}</td>\r
112                         <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
113                         <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
114                         <td>${game.start_dt.strftime('%m/%d/%Y %H:%M')}</td>\r
115                         <td>${game.winner}</td>\r
116                 </tr>\r
117                 % else:\r
118                 <tr>\r
119                         <td>-</td>\r
120                         <td>-</td>\r
121                         <td>-</td>\r
122                         <td>-</td>\r
123                         <td>-</td>\r
124                         <td>-</td>\r
125                 </tr>\r
126                 % endif\r
127     % endfor\r
128     </tbody>\r
129 </table>\r
130 </div> <!-- END RECENT GAMES -->\r