diff options
Diffstat (limited to 'design/templates/lib/img_picfull.html')
-rw-r--r-- | design/templates/lib/img_picfull.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/design/templates/lib/img_picfull.html b/design/templates/lib/img_picfull.html new file mode 100644 index 0000000..5dba01d --- /dev/null +++ b/design/templates/lib/img_picfull.html @@ -0,0 +1,9 @@ +{% load get_image_by_size %} +{% if caption %} +<figure class="picfull">{%endif%} +<img class="picfull" sizes="(max-width: 680px) 100vw, (min-width: 681) 680px" +srcset="{% for size in image.sizes.all%}{% get_image_by_size image size %} {{size}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%} +{% for size in image.sizes.all%}{%if forloop.first %}src="{% get_image_by_size image size %}"{%endif%}{%endfor%} alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}"> + {% if caption %}<figcaption>{{image.caption}}</figcaption> +</figure> +{% endif %} |