From 6771f51ca0c3c3987d16fd753ecf048dea09e6f2 Mon Sep 17 00:00:00 2001 From: Stefan Wehrmeyer Date: Thu, 12 Oct 2023 16:10:36 +0200 Subject: [PATCH] Use responsive filer image template for campaign slider images Currently they are resized to 250w which looks bad on many devices. --- .../cms/plugins/primarylink/campaign.html | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/fragdenstaat_de/fds_cms/templates/cms/plugins/primarylink/campaign.html b/fragdenstaat_de/fds_cms/templates/cms/plugins/primarylink/campaign.html index e62cbc71d..55253a72d 100644 --- a/fragdenstaat_de/fds_cms/templates/cms/plugins/primarylink/campaign.html +++ b/fragdenstaat_de/fds_cms/templates/cms/plugins/primarylink/campaign.html @@ -1,5 +1,5 @@ {% load i18n %} -{% load thumbnail %} +{% load fds_cms_tags %} {% load static %} {% load markup %} @@ -9,13 +9,23 @@ {% endif %}
{% if object.image %} + {# the column values are guesses, the glider js config determines actual size. #} + {% get_responsive_filer_image object.image "col-6 col-md-4" as respimg %} - {% thumbnail object.image 250x0 crop subject_location=object.image.subject_location as thumb %} - - {{ object.image.default_alt_text|default: + {% for source in respimg.sources %} + + {% endfor %} + + {{ object.image.default_alt_text|default: {% endif %}