cards.html now uses fi macro
This commit is contained in:
parent
caead5cfc1
commit
371e42ea0c
@ -11,12 +11,11 @@
|
|||||||
<h3><a href="{{ SITEURL }}/{{ article.save_as }}" title="{{ article.title }}">{{ article.title }}</a></h3>
|
<h3><a href="{{ SITEURL }}/{{ article.save_as }}" title="{{ article.title }}">{{ article.title }}</a></h3>
|
||||||
</header>
|
</header>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if article.featured_image %}
|
{% from 'includes/featured_image.html' import fi %}
|
||||||
<a href="{{ SITEURL }}/{{ article.save_as }}" title="{{ article.title }}"><img alt='Titelbild zu "{{ article.title }}"' src="{{ SITEURL }}/{{ article.featured_image[0].pic }}" /></a>
|
{% if article.featured_image %}
|
||||||
{% endif %}
|
{% set i = article.featured_image[0] %}
|
||||||
{# {% if article.summary %}
|
{{ fi(i.pic, i.link | default("/" + article.save_as), i.alt | default("Titelbild von " + article.title), i.title | default(article.title), i.credit) }}
|
||||||
<p>{{ article.summary }}</p>
|
{% endif %}
|
||||||
{% endif %} #}
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
{% macro fi(pic, link='', alt='', credit='') %}
|
{% macro fi(pic, link='', alt='', title='', credit='') %}
|
||||||
<div class="featured-image">
|
<div class="featured-image">
|
||||||
<figure>
|
<figure>
|
||||||
{% if link %}<a href="{{ link }}"{% if alt %} alt="{{ alt }}"{% endif %}>{% endif %}<img src="{{ pic }}" />{% if link %}</a>{% endif %}
|
{% if link %}<a href="{{ link }}"{% if alt %} alt="{{ alt }}"{% endif %}>{% endif %}<img src="{{ pic }}" title="{{ title }}"/>{% if link %}</a>{% endif %}
|
||||||
{% if credit %}
|
{% if credit %}<figcaption>Bild: {{ credit }}</figcaption>{% endif %}
|
||||||
<figcaption>Bild: {{ credit }}</figcaption>
|
|
||||||
{% endif %}
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user