]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/main_index.mako
If there are no recent games, do not show the section.
[xonotic/xonstat.git] / xonstat / templates / main_index.mako
index 551eea4077287b75e5e642896e2541dc2859e5d6..bc227b527f5d73887d10fc78f1a6c1606a451724 100644 (file)
@@ -4,6 +4,11 @@
 Leaderboard
 </%block>
 
+<%block name="css">
+    ${parent.css()}
+    <link href="/static/css/sprites.css" rel="stylesheet">
+</%block>
+
 <%block name="hero_unit">
       <div class="hero-unit">
         <img src="/static/css/img/web_background_l2.png" />
@@ -203,6 +208,7 @@ Leaderboard
   </div> <!-- /span4 -->
 </div> <!-- /row -->
 
+% if len(recent_games) > 0:
 <div class="row">
   <div class="span12">
     <h3>Recent Games</h3>
@@ -221,7 +227,8 @@ Leaderboard
       % for rg in recent_games:
         <tr>
           <td><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
-          <td class="gt_icon"><img title="${rg.game_type_cd}" src="/static/images/icons/24x24/${rg.game_type_cd}.png" alt="${rg.game_type_cd}" /></td>
+          <!-- <td class="gt_icon"><img title="${rg.game_type_cd}" src="/static/images/icons/24x24/${rg.game_type_cd}.png" alt="${rg.game_type_cd}" /></td> -->
+          <td><span class="sprite sprite-${rg.game_type_cd}" title="${rg.game_type_cd}"></span></td>
           <td><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>
           <td><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>
           <td><span class="abstime" data-epoch="${rg.epoch}" title="${rg.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
@@ -237,3 +244,4 @@ Leaderboard
     </table>
   </div> <!-- /span12 -->
 </div> <!-- /row -->
+% endif