]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/player_game_index.mako
Remove Persona since it was shut down. :(
[xonotic/xonstat.git] / xonstat / templates / player_game_index.mako
index 18eeeabb98a8151edd65f5e307866f722fe35a14..d2b138a5fd5d6c77673c64ed427e1512d161c4c8 100644 (file)
 <%namespace name="nav" file="nav.mako" />
 <%namespace file="navlinks.mako" import="navlinks" />
 
-<%block name="css">
-${parent.css()}
-<link href="/static/css/sprites.css" rel="stylesheet">
-</%block>
-
 <%block name="navigation">
-${nav.nav('games')}
+  ${nav.nav('games')}
 </%block>
 
 <%block name="title">
-Recent Games
+  Recent Games
 </%block>
 
 % if not games:
-<h2>Sorry, no 
+  <h2>Sorry, no 
     % if game_type_descr:
-    ${game_type_descr.lower()}
+      ${game_type_descr.lower()}
     % endif
-  games yet for 
-  <a href="${request.route_url('player_info', id=player.player_id)}">${player.nick_html_colors()|n}</a>. Get playing!
-</h2>
-<p><a href="${player_url}">Back to player info page</a></p>
+    games yet for 
+    <a href="${request.route_url('player_info', id=player.player_id)}">${player.nick_html_colors()|n}</a>. Get playing!
+  </h2>
+
+  <p><a href="${player_url}">Back to player info page</a></p>
 
 % else:
-<div class="row">
-  <div class="span12">
-    <h3>Recent 
-      % if game_type_descr:
-      ${game_type_descr}
-      % endif
-      Games by 
-      <a href="${request.route_url('player_info', id=player.player_id)}">
-        ${player.nick_html_colors()|n}
-      </a>
-    </h3>
+  <div class="row">
+    <div class="small-12 columns">
+      <h5>Recent 
+        % if game_type_descr:
+        ${game_type_descr}
+        % endif
+        Games by 
+        <a href="${request.route_url('player_info', id=player.player_id)}">
+          ${player.nick_html_colors()|n}
+        </a>
+      </h5>
+    </div>
   </div>
-</div>
 
-<div class="row">
-  <div class="span12 tabbable">
-    <ul class="nav nav-tabs">
-      % for game in games_played:
-      % if not game.game_type_cd in ['cq']:
-      <li 
-      % if game.game_type_cd == game_type_cd or (game.game_type_cd == 'overall' and game_type_cd is None):
-      class="active"
-      % endif
-      >
-      % if game.game_type_cd == 'overall':
-      <a href="${request.route_url("player_game_index", player_id=player.player_id)}" alt="${game.game_type_cd}" title="" data-toggle="none">
-      % else:
-      <a href="${request.route_url("player_game_index", player_id=player.player_id, _query={'type':game.game_type_cd})}" alt="${game.game_type_cd}" title="" data-toggle="none">
-      % endif
-        <span class="sprite sprite-${game.game_type_cd}"> </span><br />
-        ${game.game_type_cd} <br />
-      </a>
-      </li>
-      % endif
-      % endfor
-    </ul>
+  <div class="row">
+    <div class="small-12 columns">
+      <ul class="tabs">
+        % for game in games_played:
+          % if not game.game_type_cd in ['cq']:
+            <li class="text-center tab-title
+              % if game.game_type_cd == game_type_cd or (game.game_type_cd == 'overall' and game_type_cd is None):
+                active
+              % endif
+              "
+            >
+              % if game.game_type_cd == 'overall':
+                <a href="${request.route_url("player_game_index", player_id=player.player_id)}" alt="${game.game_type_cd}" title="" data-toggle="none">
+              % else:
+                <a href="${request.route_url("player_game_index", player_id=player.player_id, _query={'type':game.game_type_cd})}" alt="${game.game_type_cd}" title="" data-toggle="none">
+              % endif
+              <span class="sprite sprite-${game.game_type_cd}"></span><br />
+              ${game.game_type_cd} <br />
+              </a>
+            </li>
+          % endif
+        % endfor
+      </ul>
+      <br />
+    </div>
   </div>
-  <div class="span12 tab-content" style="margin-top:10px;">
-    <table class="table table-hover table-condensed">
-      <thead>
+
+  <div class="row">
+    <div class="small-12 columns">
+      <table class="table-hover table-condensed">
+        <thead>
+          <tr>
+            <th class="small-1 text-center"></th>
+            <th class="small-1">Type</th>
+            <th class="show-for-medium-up small-3">Server</th>
+            <th class="small-2">Map</th>
+            <th class="show-for-medium-up small-1">Result</th>
+            <th class="show-for-medium-up small-2">Played</th>
+            <th class="small-1">Elo</th>
+          </tr>
+        </thead>
+        <tbody>
+        % for rg in games.items:
         <tr>
-          <th></th>
-          <th>Type</th>
-          <th>Server</th>
-          <th>Map</th>
-          <th>Result</th>
-          <th>Played</th>
-          <th>Elo</th>
-        </tr>
-      </thead>
-      <tbody>
-      % for rg in games.items:
-      <tr>
-        <td class="tdcenter"><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="tdcenter"><img title="${rg.game_type_cd}" src="/static/images/icons/24x24/${rg.game_type_cd}.png" alt="${rg.game_type_cd}" /></td>
-        <td><a href="${request.route_url("server_info", id=rg.server_id)}" name="Server info page for ${rg.server_name}">${rg.server_name}</a></td>
-        <td><a href="${request.route_url("map_info", id=rg.map_id)}" name="Map info page for ${rg.map_name}">${rg.map_name}</a></td>
-        <td>
-          % if rg.team != None:
-          % if rg.team == rg.winner:
-          Win
-          % else:
-          Loss
-          % endif
-          % else:
-          % if rg.rank == 1:
-          Win
-          % else:
-          Loss (#${rg.rank})
-          % endif
-          % endif
-        </td>
-        <td><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>
-        <td class="tdcenter">
-          <a href="${request.route_url('game_info', id=rg.game_id, _query={'show_elo':1})}" title="View detailed information about this game">
-            % if rg.elo_delta is not None:
-            % if round(rg.elo_delta,2) > 0:
-            <span class="eloup" title="Elo went up by ${round(rg.elo_delta,2)}"><i class="glyphicon glyphicon-arrow-up"></i></span>
-            % elif round(rg.elo_delta,2) < 0:
-            <span class="elodown" title="Elo went down by ${round(-rg.elo_delta,2)}"><i class="glyphicon glyphicon-arrow-down"></i></span>
+          <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>
+          <td class="text-center"><span class="sprite sprite-${rg.game_type_cd}"></span></td>
+          <td class="show-for-medium-up no-stretch"><a href="${request.route_url("server_info", id=rg.server_id)}" name="Server info page for ${rg.server_name}">${rg.server_name}</a></td>
+          <td class="no-stretch"><a href="${request.route_url("map_info", id=rg.map_id)}" name="Map info page for ${rg.map_name}">${rg.map_name}</a></td>
+          <td class="show-for-medium-up">
+            % if rg.team != None:
+              % if rg.team == rg.winner:
+                Win
+              % else:
+                Loss
+              % endif
             % else:
-            <span class="eloneutral" title="Elo did not change"><i class="glyphicon glyphicon-minus"></i></span>
+              % if rg.rank == 1:
+                Win
+              % else:
+                Loss (#${rg.rank})
+              % endif
             % endif
-            % else:
-            <span class="eloneutral" title="Elo did not change"><i class="glyphicon glyphicon-minus"></i></span>
-            % endif
-          </a>
-        </td>
-      </tr>
-      % endfor
-      </tbody>
-    </table>
+          </td>
+          <td class="show-for-medium-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>
+          <td class="text-center">
+            <a href="${request.route_url('game_info', id=rg.game_id, _query={'show_elo':1})}" title="View detailed information about this game">
+              % if rg.elo_delta is not None:
+                % if round(rg.elo_delta,2) > 0:
+                  <span class="eloup">+${round(rg.elo_delta,2)}</span>
+                % elif round(rg.elo_delta,2) < 0:
+                  <span class="elodown">${round(rg.elo_delta,2)}</span>
+                % else:
+                  <span class="eloneutral"><i class="fa fa-minus"></i></span>
+                % endif
+              % else:
+                <span class="eloneutral"><i class="fa fa-minus"></i></span>
+              % endif
+            </a>
+          </td>
+        </tr>
+        % endfor
+        </tbody>
+      </table>
+    </div>
   </div>
-</div>
 
 
-<!-- navigation links -->
-${navlinks("player_game_index", games.page, games.last_page, player_id=player_id, search_query=request.GET)}
+  <!-- navigation links -->
+  ${navlinks("player_game_index", games.page, games.last_page, player_id=player_id, search_query=request.GET)}
 % endif