Revert thumbnail gallery change: switch back to tables

This commit is contained in:
Jef van Schendel 2012-03-06 00:35:55 +01:00
parent fe53180359
commit b01a3b9386
2 changed files with 23 additions and 18 deletions

View File

@ -339,14 +339,13 @@ textarea#comment_content {
/* media galleries */ /* media galleries */
.media_thumbnail { .media_thumbnail {
display: inline-block; float: left;
padding: 0px; padding: 0px;
width: 180px; width: 180px;
overflow: hidden; overflow: hidden;
margin: 0px 5px 10px 5px; margin: 0px 4px 10px;
text-align: center; text-align: center;
font-size: 0.875em; font-size: 0.875em;
list-style: none;
} }
.media_thumbnail a { .media_thumbnail a {

View File

@ -19,11 +19,16 @@
{% from "mediagoblin/utils/pagination.html" import render_pagination %} {% from "mediagoblin/utils/pagination.html" import render_pagination %}
{% macro media_grid(request, media_entries, col_number=5) %} {% macro media_grid(request, media_entries, col_number=5) %}
<ul class="thumb_gallery"> <table class="thumb_gallery">
{% for row in gridify_cursor(media_entries, col_number) %} {% 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 %} {% for entry in row %}
{% set entry_url = entry.url_for_self(request.urlgen) %} {% set entry_url = entry.url_for_self(request.urlgen) %}
<li class="media_thumbnail"> <td class="media_thumbnail thumb_entry
{%- if loop.first %} thumb_entry_first
{%- elif loop.last %} thumb_entry_last{% endif %}">
<a href="{{ entry_url }}"> <a href="{{ entry_url }}">
<img src="{{ request.app.public_store.file_url( <img src="{{ request.app.public_store.file_url(
entry.media_files['thumb']) }}" /> entry.media_files['thumb']) }}" />
@ -32,10 +37,11 @@
<br /> <br />
<a href="{{ entry_url }}">{{ entry.title }}</a> <a href="{{ entry_url }}">{{ entry.title }}</a>
{% endif %} {% endif %}
</li> </td>
{% endfor %} {% endfor %}
</tr>
{% endfor %} {% endfor %}
</ul> </table>
{%- endmacro %} {%- endmacro %}
{# {#