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 %}