summaryrefslogtreecommitdiff
path: root/design/templates/archives/birds.html
diff options
context:
space:
mode:
Diffstat (limited to 'design/templates/archives/birds.html')
-rw-r--r--design/templates/archives/birds.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/design/templates/archives/birds.html b/design/templates/archives/birds.html
index 32a7aa1..db7c860 100644
--- a/design/templates/archives/birds.html
+++ b/design/templates/archives/birds.html
@@ -17,7 +17,15 @@
<h1 class="hide">Birds seen {% if region %}in {%if region.name == 'United States'%}the United States{%else%}{{region.name|title|smartypants|safe}}{%endif%}{%else%} by {{user}}{%endif%}</h1> {% for object in object_list %}
<article class="{% cycle 'odd' 'even' %} {% cycle 'first' 'second' 'third' %}">
<div class="post--image">
- <a href="{{object.bird.get_absolute_url}}" title="{{object.bird}}"><img src="{{object.get_small_image}}" alt="{{ object.title }}" class="post-image" /></a>
+{% load get_image_by_size %}
+{% load get_image_width %}
+<figure>
+<a href="{{object.bird.get_absolute_url}}" title="{{object.bird}}">
+<img class="picfull" sizes="(max-width: 680px) 100vw, (min-width: 681) 680px" srcset="{% for size in object.image.sizes.all%}{% get_image_by_size object.image size.name %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}
+ {% for size in object.image.sizes.all%}{%if forloop.first %} src="{% get_image_by_size object.image size.name %}"{%endif%}{%endfor%} alt="{{object.image.alt}} photographed by {% if object.image.photo_credit_source %}{{object.image.photo_credit_source}}{%else%}luxagraf{%endif%}" >
+</a>
+{% if object.image.photo_credit_source %}<figcaption>photo by <a href="{{object.image.photo_credit_url}}">{{object.image.photo_credit_source}}</a></figcaption>{%endif%}
+</figure>
</div>
<h3 class="post--title"><a href="{{object.bird.get_absolute_url}}" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.bird}}{%endif%}">{{object.bird|safe|smartypants|widont}}</a> (<span class="sci">{{object.bird.scientific_name}}</span>)</h3>
<time class="post--date" datetime="{{object.date|date:'c'}}">Seen: {{object.date|date:"F"}} <span>{{object.date|date:"j, Y"}}</span></time>