+ {% if article.content | length is not eq(0) %}{{ article.content }}{% endif %}
+ {% if article.klappentext %}
+
Klappentext
+
{{ article.klappentext }}
{% endif %}
-
- {% if article.klappentext is defined %}
-
-
- Klappentext
- {{ article.klappentext }}
-
-
- {% endif %} {% if article.content | length is not eq(0) %}
-
{{ article.content }}
- {% endif %}
-
+
+ {% if article.featured_image is defined %}
+ {% from 'includes/macros.html' import fi %}
+ {% set i = article.featured_image[0] %}
+ {{ fi(i.pic, i.link, i.text, i.title, i.credit, i.credit_link) }}
+ {% endif %}
+
+
Details
+
{% if article.reihe is defined %}
- - aus der Reihe {{ article.reihe }}
- {% endif %} {% if article.tags is defined %}
- -
- Schlagworte: {% for tag in article.tags %}{{ tag }}, {% endfor %}
-
- {% endif %} {% if article.isbn is defined %}
- - ISBN: {{ article.isbn }}
- {% endif %} {% if article.verlag is defined %}
- - erschienen bei: {{ article.verlag }}
+ - aus der Reihe {{ article.reihe }}
+ {% endif %}
+ {% if article.tags is defined %}
+ - Schlagworte: {% for tag in article.tags %}{% if not loop.first %}, {% endif%}{{ tag }}{% endfor %}
+ {% endif %}
+ {% if article.isbn is defined %}
+ - ISBN: {{ article.isbn }}
+ {% endif %}
+ {% if article.verlag is defined %}
+ - erschienen bei: {{ article.verlag }}
{% endif %}
-
-
+
{% endblock content_body %}
diff --git a/theme/templates/cards.html b/theme/templates/cards.html
index 23e4bc6..338e5a8 100644
--- a/theme/templates/cards.html
+++ b/theme/templates/cards.html
@@ -11,10 +11,10 @@
- {% from 'includes/featured_image.html' import fi %}
+ {% from 'includes/macros.html' import ci %}
{% 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) }}
+ {{ ci(i.pic, i.link | default("/" + article.save_as), i.alt | default("Titelbild von " + article.title), i.title | default(article.title), i.credit, i.credit_link) }}
{% endif %}
diff --git a/theme/templates/includes/featured_image.html b/theme/templates/includes/featured_image.html
deleted file mode 100644
index 84ff603..0000000
--- a/theme/templates/includes/featured_image.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{% macro fi(pic, link='', alt='', title='', credit='') %}
-
-{% endmacro %}
diff --git a/theme/templates/includes/macros.html b/theme/templates/includes/macros.html
new file mode 100644
index 0000000..e04b5e7
--- /dev/null
+++ b/theme/templates/includes/macros.html
@@ -0,0 +1,19 @@
+{# featured image macro #}
+{% macro fi(pic, link='', alt='', title='', credit='', credit_link='') %}
+
+{% endmacro %}
+
+{# card image macro #}
+{% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %}
+
+{% endmacro %}
diff --git a/theme/templates/index.html b/theme/templates/index.html
index 63a34e7..7f8d5e1 100644
--- a/theme/templates/index.html
+++ b/theme/templates/index.html
@@ -1,22 +1,17 @@
{% extends "base.html" %}
{% block content_body %}
{% for p in pages if p.title == "Index" %}
-{% set lr = cycler("row", "row-reverse") %}
-{% if p.featured is defined %}
-
-{% endif %}
-{% from 'includes/featured_image.html' import fi %}
-{% for c in p.index_cards %}
-
- {{ fi( c.pic, c.link, c.text, c.credit) }}
-
- {{ c.text }}
-
- {{ c.more }}
-
-
-
-{% endfor %}
+ {% set lr = cycler("row", "row-reverse") %}
+ {% if p.featured is defined %}
+
+ {% endif %}
+ {% from 'includes/macros.html' import fi %}
+ {% for i in p.index_cards %}
+
+ {{ fi( i.pic, i.link, i.alt, i.title, i.credit, i.credit_link) }}
+
{{ i.alt }}
+
+ {% endfor %}
{% endfor %}
{% include "includes/subscribe.html" %}
{% include "includes/unsubscribe.html" %}
diff --git a/theme/templates/page.html b/theme/templates/page.html
index 65aa472..a08b525 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -12,9 +12,9 @@
{% block content_body %}
{% if page.featured_image is defined %}
- {% from 'includes/featured_image.html' import fi %}
+ {% from 'includes/macros.html' import fi %}
{% set i = page.featured_image[0] %}
- {{ fi(i.pic, i.link, i.text, i.credit) }}
+ {{ fi(i.pic, i.link, i.text, i.alt, i.credit, i.credit_link) }}
{% endif %}
{{ page.content }}
diff --git a/theme/templates/wide-cards.html b/theme/templates/wide-cards.html
index 443ce13..868ef6b 100644
--- a/theme/templates/wide-cards.html
+++ b/theme/templates/wide-cards.html
@@ -20,8 +20,8 @@ wide_card) | list | first is defined %}
{% for image in wcard.card_images %}
-
-
-
+
+