Make media thumbnail gallery a list instead of a table
authorJef van Schendel <mail@jefvanschendel.nl>
Sun, 12 Feb 2012 18:33:05 +0000 (19:33 +0100)
committerJef van Schendel <mail@jefvanschendel.nl>
Sun, 12 Feb 2012 18:33:05 +0000 (19:33 +0100)
mediagoblin/static/css/base.css
mediagoblin/templates/mediagoblin/utils/object_gallery.html

index 0447d8e56956e86a3b14c812d00e9d6ff0acc10f..165fdcf771610fbbc8282222a4b139d718412e26 100644 (file)
@@ -381,6 +381,7 @@ textarea#comment_content {
   margin: 0px 4px 10px 4px;
   text-align: center;
   font-size: 0.875em;
+  list-style: none;
 }
 
 .media_thumbnail a {
index 81506a84e01222902b4fe3a0b480ca464bcddf5a..6b5988fbe748158746a6fd8544cb52ca22562c34 100644 (file)
 {% from "mediagoblin/utils/pagination.html" import render_pagination %}
 
 {% macro media_grid(request, media_entries, col_number=5) %}
-  <table class="thumb_gallery">
+  <ul class="thumb_gallery">
     {% for row in gridify_cursor(media_entries, col_number) %}
-      <tr class="thumb_row
-                 {%- if loop.first %} thumb_row_first
-                 {%- elif loop.last %} thumb_row_last{% endif %}">
-        {% for entry in row %}
-          {% set entry_url = entry.url_for_self(request.urlgen) %}
-          <td class="media_thumbnail thumb_entry
-                     {%- if loop.first %} thumb_entry_first
-                     {%- elif loop.last %} thumb_entry_last{% endif %}">
-            <a href="{{ entry_url }}">
-              <img src="{{ request.app.public_store.file_url(
-                             entry.media_files['thumb']) }}" />
-            </a>
-            {% if entry.title %}
-              <br />
-              <a href="{{ entry_url }}">{{ entry.title }}</a>
-            {% endif %}
-          </td>
-        {% endfor %}
-      </tr>
+      {% for entry in row %}
+        {% set entry_url = entry.url_for_self(request.urlgen) %}
+        <li class="media_thumbnail">
+          <a href="{{ entry_url }}">
+            <img src="{{ request.app.public_store.file_url(
+                           entry.media_files['thumb']) }}" />
+          </a>
+          {% if entry.title %}
+            <br />
+            <a href="{{ entry_url }}">{{ entry.title }}</a>
+          {% endif %}
+        </li>
+      {% endfor %}
     {% endfor %}
-  </table>
+  </ul>
 {%- endmacro %}
 
 {#