Make media thumbnail gallery a list instead of a table
This commit is contained in:
parent
be09ed51c8
commit
4944e3c374
@ -381,6 +381,7 @@ textarea#comment_content {
|
|||||||
margin: 0px 4px 10px 4px;
|
margin: 0px 4px 10px 4px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.media_thumbnail a {
|
.media_thumbnail a {
|
||||||
|
@ -19,29 +19,23 @@
|
|||||||
{% 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) %}
|
||||||
<table class="thumb_gallery">
|
<ul 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
|
{% for entry in row %}
|
||||||
{%- if loop.first %} thumb_row_first
|
{% set entry_url = entry.url_for_self(request.urlgen) %}
|
||||||
{%- elif loop.last %} thumb_row_last{% endif %}">
|
<li class="media_thumbnail">
|
||||||
{% for entry in row %}
|
<a href="{{ entry_url }}">
|
||||||
{% set entry_url = entry.url_for_self(request.urlgen) %}
|
<img src="{{ request.app.public_store.file_url(
|
||||||
<td class="media_thumbnail thumb_entry
|
entry.media_files['thumb']) }}" />
|
||||||
{%- if loop.first %} thumb_entry_first
|
</a>
|
||||||
{%- elif loop.last %} thumb_entry_last{% endif %}">
|
{% if entry.title %}
|
||||||
<a href="{{ entry_url }}">
|
<br />
|
||||||
<img src="{{ request.app.public_store.file_url(
|
<a href="{{ entry_url }}">{{ entry.title }}</a>
|
||||||
entry.media_files['thumb']) }}" />
|
{% endif %}
|
||||||
</a>
|
</li>
|
||||||
{% if entry.title %}
|
{% endfor %}
|
||||||
<br />
|
|
||||||
<a href="{{ entry_url }}">{{ entry.title }}</a>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
{% endfor %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</ul>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{#
|
{#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user