diff options
Diffstat (limited to 'design/templates/lib')
-rw-r--r-- | design/templates/lib/img_cluster.html | 1 | ||||
-rw-r--r-- | design/templates/lib/img_picfull.html | 4 | ||||
-rw-r--r-- | design/templates/lib/img_picwide.html | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/design/templates/lib/img_cluster.html b/design/templates/lib/img_cluster.html new file mode 100644 index 0000000..b1ed854 --- /dev/null +++ b/design/templates/lib/img_cluster.html @@ -0,0 +1 @@ +{% load get_image_by_size %}<a href="{%get_image_by_size image "original"%} " title="view larger image"><img class="{{cluster_class}}" src="{% for size in image.sizes.all%}{%if size.name == cluster_class %}{% get_image_by_size image size.name %}{%endif%}{%endfor%}" alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}" data-jslghtbx="{%get_image_by_size image "original"%}" data-jslghtbx-group="group" {% if caption%}data-jslghtbx-caption="{{image.caption}}"{%endif%}></a> diff --git a/design/templates/lib/img_picfull.html b/design/templates/lib/img_picfull.html index 7e9c23e..f2afdce 100644 --- a/design/templates/lib/img_picfull.html +++ b/design/templates/lib/img_picfull.html @@ -2,8 +2,8 @@ {% 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%}"> +srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.long_edge %} {{size.long_edge}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%} +{% for size in image.sizes.all%}{%if forloop.first %}src="{% get_image_by_size image size.long_edge %}"{%endif%}{%endfor%} alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}"> {% if caption %}<figcaption>{{image.caption|safe}}</figcaption> </figure> {% endif %} diff --git a/design/templates/lib/img_picwide.html b/design/templates/lib/img_picwide.html index 4e96951..b98bb9b 100644 --- a/design/templates/lib/img_picwide.html +++ b/design/templates/lib/img_picwide.html @@ -1,9 +1,9 @@ {% load get_image_by_size %} {% if caption or exif %} <figure class="picwide">{%endif%} -<img class="picwide" sizes="(max-width: 1140px) 100vw, (min-width: 1141px) 1140px" -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 not forloop.first and not forloop.last%}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%}"> +<img class="picwide" sizes="(max-width: 1140px) 100vw, (min-width: 1281px) 1280px" +srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.long_edge %} {{size.long_edge}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%} +{% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%}src="{% get_image_by_size image size.long_edge %}"{%endif%}{%endfor%} alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}"> {% if caption or exif %}<figcaption>{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | <small>Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}</small>{% endif %}{% if caption or exif %}</figcaption> </figure> {% endif %} |