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

index 8de413ea983b941b20203f3df613033706c67ebf..ceb32f82f0e4485822145ca033839af3f148b40e 100644 (file)
@@ -3,11 +3,11 @@
 <%namespace file="navlinks.mako" import="navlinks" />
 
 <%block name="navigation">
-${nav.nav('maps')}
+  ${nav.nav('maps')}
 </%block>
 
 <%block name="title">
-Active Maps Index
+  Active Maps Index
 </%block>
 
 % if not top_maps:
@@ -15,36 +15,41 @@ Active Maps Index
 
 % 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;">Map</th>
-          <th style="width:60px;">Games</th>
-        </tr>
-      </thead>
-      <tbody>
-      ##### this is to get around the actual row_number/rank of the map not being in the actual query
-      <% i = 1 + (top_maps.page-1) * 25%>
-      % for (map_id, name, count) in top_maps:
-        <tr>
-          <td>${i}</td>
-          % if map_id != '-':
-          <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map 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">Map</th>
+            <th class="small-3">Games</th>
+          </tr>
+        </thead>
+        <tbody>
+        ##### this is to get around the actual row_number/rank of the map not being in the actual query
+        <% i = 1 + (top_maps.page-1) * 25%>
+        % for (map_id, name, count) in top_maps:
+          <tr>
+            <td>${i}</td>
+            % if map_id != '-':
+            <td class="no-stretch"><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
+            % else:
+            <td class="nostretch">${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_maps_by_times_played", top_maps.page, top_maps.last_page)}
+    </div>
+  </div>
 
-${navlinks("top_maps_by_times_played", top_maps.page, top_maps.last_page)}
-  </div> <!-- /span4 -->
-</div> <!-- /row -->
+% endif