diff options
Diffstat (limited to 'design/templates/archives')
-rw-r--r-- | design/templates/archives/homepage.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/design/templates/archives/homepage.html b/design/templates/archives/homepage.html index 98d9937..1a1a406 100644 --- a/design/templates/archives/homepage.html +++ b/design/templates/archives/homepage.html @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load get_image_by_size %} {% load typogrify_tags %} {%block htmlclass%}class="black"{%endblock%} {% block sitename %} @@ -11,11 +12,10 @@ <article class="h-entry hentry" itemscope itemType="http://schema.org/Article"> <div class="post--image"> <a href="{{object.get_absolute_url}}" title="{{object.title}}"> + {%for image in homepage.images.all%} <img class="u-photo post-image homepage--hero" itemprop="image" sizes="(max-width: 960px) 100vw" - srcset="{{IMAGES_URL}}{% now "Y"%}/{{homepage.image_base_url}}-640.jpg 640w, - {{IMAGES_URL}}{% now "Y"%}/{{homepage.image_base_url}}.jpg 1140w, - {{IMAGES_URL}}{% now "Y"%}/{{homepage.image_base_url}}-2280.jpg 2280w" - src="{{IMAGES_URL}}{% now "Y"%}/{{homepage.image_base_url}}.jpg" alt="{{homepage.alt_text}}"> +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%}">{%endfor%} </a> </div> <div class="hero--wrapper"> |