]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/game_finder.mako
Use Luma throughout the site. Thank you, sev!
[xonotic/xonstat.git] / xonstat / templates / game_finder.mako
1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
3 <%namespace file="navlinks.mako" import="navlinks" />
4
5 <%block name="navigation">
6 ${nav.nav('games')}
7 </%block>
8
9 <%block name="css">
10     ${parent.css()}
11     <link href="/static/css/luma.css" rel="stylesheet">
12 </%block>
13
14 <%block name="title">
15 Game Index
16 </%block>
17
18 ##### ROW OF GAME TYPE ICONS #####
19 <div class="row">
20   <div class="small-12 columns">
21     <ul class="tabs">
22       % for gt, url in game_type_links:
23         <li class="text-center tab-title
24           % if game_type_cd == gt or (game_type_cd is None and gt == 'overall'):
25             active
26           % endif
27           "
28         >
29           <a href="${url}" alt="${gt}" title="Show only ${gt} games">
30             <span class="sprite sprite-${gt}"> </span><br />
31             ${gt} <br />
32           </a>
33         </li>
34       % endfor
35     </ul>
36     <br />
37   </div>
38 </div>
39
40 ##### RECENT GAMES TABLE #####
41 <div class="row">
42   <div class="small-12 columns">
43     % if len(recent_games) > 0:
44     <table class="table-hover table-condensed">
45       <thead>
46         <tr>
47           <th class="small-1 text-center"></th>
48           <th class="small-1">Type</th>
49           <th class="show-for-medium-up small-3">Server</th>
50           <th class="show-for-medium-up small-2">Map</th>
51           <th class="show-for-large-up small-2">Time</th>
52           <th class="small-3">Winner</th>
53         </tr>
54       </thead>
55       <tbody>
56       % for rg in recent_games:
57         <tr>
58           <td class="text-center"><a class="button tiny" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
59           <td class="text-center"><i class="sprite sprite-${rg.game_type_cd}" title="${rg.game_type_descr}"></i></td>
60           <td class="show-for-medium-up no-stretch"><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
61           <td class="show-for-medium-up"><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the map detail page for this map">${rg.map_name}</a></td>
62           <td class="show-for-large-up"><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
63           <td class="no-stretch">
64             % if rg.player_id > 2:
65             <a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a></td>
66             % else:
67             ${rg.nick_html_colors|n}</td>
68             % endif
69         </tr>
70         % endfor
71         </tbody>
72     </table>
73     % else:
74     <h2>No more games to show!</h2>
75     % endif
76   </div>
77 </div>
78
79 % if len(recent_games) == 20:
80 <div class="row">
81   <div class="small-12 columns">
82     <ul class="pagination">
83       <li>
84         <a  href="${request.route_url('game_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
85       </li>
86     </ul>
87   </div>
88 </div>
89 % endif