]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Make the topservers page mobile-friendly.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 8 Mar 2015 13:27:18 +0000 (09:27 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 8 Mar 2015 13:27:18 +0000 (09:27 -0400)
xonstat/templates/top_servers_by_players.mako

index 72765f1bc85501aa41de7d3fc5f8ecf28cb49fec..ea6912f4f24fa2e71a404af4e49bc2b31d0c27e7 100644 (file)
@@ -3,48 +3,53 @@
 <%namespace file="navlinks.mako" import="navlinks" />
 
 <%block name="navigation">
-${nav.nav('servers')}
+  ${nav.nav('servers')}
 </%block>
 
 <%block name="title">
-Active Servers Index
+  Active Servers Index
 </%block>
 
 % if not top_servers:
-<h2>Sorry, no servers yet. Get playing!</h2>
+  <h2>Sorry, no servers yet. Get playing!</h2>
 
 % else:
 ##### ACTIVE SERVERS #####
-  <div class="span6 offset3">
-    <table class="table table-hover table-condensed">
-      <thead>
-        <tr>
-          <th style="width:40px;">#</th>
-          <th style="width:180px;">Server</th>
-          <th style="width:60px;">Games</th>
-        </tr>
-      </thead>
-      <tbody>
-      ##### this is to get around the actual row_number/rank of the server not being in the actual query
-      <% i = 1 + (top_servers.page-1) * 25%>
-      % for (server_id, name, count) in top_servers.items:
-        <tr>
-          <td>${i}</td>
-          % if server_id != '-':
-          <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
-          % else:
-          <td class="nostretch" style="max-width:180px;">${name}</td>
-          % endif
-          <td>${count}</td>
-        </tr>
-        <% i = i+1 %>
-      % endfor
-      </tbody>
-    </table>
-    <p class="note">*figures are from the past 7 days</p>
-  </div> <!-- /span4 -->
-% endif
+  <div class="row">
+    <div class="small-12 large-6 large-offset-3 columns">
+      <table class="table-hover table-condensed">
+        <thead>
+          <tr>
+            <th class="small-2">#</th>
+            <th class="small-7">Server</th>
+            <th class="small-3">Games</th>
+          </tr>
+        </thead>
+        <tbody>
+        ##### this is to get around the actual row_number/rank of the server not being in the actual query
+        <% i = 1 + (top_servers.page-1) * 25%>
+        % for (server_id, name, count) in top_servers.items:
+          <tr>
+            <td>${i}</td>
+            % if server_id != '-':
+            <td class="no-stretch"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
+            % else:
+            <td class="no-stretch">${name}</td>
+            % endif
+            <td>${count}</td>
+          </tr>
+          <% i = i+1 %>
+        % endfor
+        </tbody>
+      </table>
+      <small>*figures are from the past 7 days<small>
+    </div>
+  </div>
+
+  <div class="row">
+    <div class="small-12 large-6 large-offset-3 columns">
+      ${navlinks("top_servers_by_players", top_servers.page, top_servers.last_page)}
+    </div>
+  </div>
 
-${navlinks("top_servers_by_players", top_servers.page, top_servers.last_page)}
-  </div> <!-- /span4 -->
-</div> <!-- /row -->
+% endif