From 371e42ea0c515801ff2f04918b9e5e80537adb5b Mon Sep 17 00:00:00 2001 From: eclipse Date: Thu, 6 Mar 2025 10:38:31 +0100 Subject: [PATCH] cards.html now uses fi macro --- theme/templates/cards.html | 11 +++++------ theme/templates/includes/featured_image.html | 8 +++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/theme/templates/cards.html b/theme/templates/cards.html index 4ea2b86..23e4bc6 100644 --- a/theme/templates/cards.html +++ b/theme/templates/cards.html @@ -11,12 +11,11 @@

{{ article.title }}

- {% if article.featured_image %} - Titelbild zu "{{ article.title }}" - {% endif %} - {# {% if article.summary %} -

{{ article.summary }}

- {% endif %} #} + {% from 'includes/featured_image.html' import fi %} + {% if article.featured_image %} + {% set i = article.featured_image[0] %} + {{ fi(i.pic, i.link | default("/" + article.save_as), i.alt | default("Titelbild von " + article.title), i.title | default(article.title), i.credit) }} + {% endif %}
{% endfor %} diff --git a/theme/templates/includes/featured_image.html b/theme/templates/includes/featured_image.html index e71c82c..84ff603 100644 --- a/theme/templates/includes/featured_image.html +++ b/theme/templates/includes/featured_image.html @@ -1,10 +1,8 @@ -{% macro fi(pic, link='', alt='', credit='') %} +{% macro fi(pic, link='', alt='', title='', credit='') %} {% endmacro %}