summaryrefslogtreecommitdiff
path: root/design/templates
diff options
context:
space:
mode:
Diffstat (limited to 'design/templates')
-rw-r--r--design/templates/archives/gallery_list.html12
1 files changed, 5 insertions, 7 deletions
diff --git a/design/templates/archives/gallery_list.html b/design/templates/archives/gallery_list.html
index 3f7bd73..99252ef 100644
--- a/design/templates/archives/gallery_list.html
+++ b/design/templates/archives/gallery_list.html
@@ -31,12 +31,11 @@
<h1 class="hide">{% if region %}Photographs from {{region.name|title|smartypants|safe}}{%else%}Photographs from Around the World {%endif%}</h1>
{% autopaginate object_list 24 %}{% for object in object_list %}
<article id="image-{{forloop.counter}}" class="photo-gallery">
- <a href="{{object.get_absolute_url}}" title="view images from {{ object.title }}">
- <img sizes="(max-width: 1140px) 100vw"
- srcset="{% get_image_by_size object.thumb '720' %} 720w,
- {% get_image_by_size object.thumb '1140' %} 1140w,
- {% get_image_by_size object.thumb '2280' %} 2280w,"
- src="{% get_image_by_size object.thumb '1140' %}" alt="{{object.title}}" ></a>
+ <a href="{{object.get_absolute_url}}" title="view images from {{ object.title }}">
+ <img sizes="(max-width: 1170px) 100vw"
+ srcset="{% for size in object.thumb.sizes.all %}{%spaceless%}
+ {% get_image_by_size object.thumb size.width %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endspaceless%}{%endfor%}
+ {% for size in object.thumb.sizes.all %}{%spaceless%}{% if size.width > 720 and size.width < 2000 %}src="{% get_image_by_size object.thumb size.width %}"{%endif%}{%endspaceless%}{%endfor%} alt="{{object.title}}" {%if photo.is_portait %}class="v"{%endif%} ></a>
<div class="gallery-text">
<h4>{{object.title}}</h4>
<time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> &ndash;
@@ -50,7 +49,6 @@
{%if object.description%}<p>{{object.description|safe|smartypants|widont}}</p>{%endif%}
</div>
</article>{% endfor %}
- </ul>
</main>
<nav class="pagination">{% paginate %}
</nav>