small improvements for templates

This commit is contained in:
eclipse 2025-03-12 11:01:52 +01:00
parent 0286648474
commit 8c7f517314
2 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,8 @@
{% macro fi(pic, link='', alt='', title='', credit='', credit_link='') %} {% macro fi(pic, link='', alt='', title='', credit='', credit_link='') %}
<div class="featured-image"> <div class="featured-image">
<figure> <figure>
{% if link %}<a href="{{ link }}"{% if title %} title="{{ title }}"{% endif %}>{% endif %}<img class="image-process-featured" src="{{ pic }}"{% if alt %} alt="{{ alt }}"{% endif %}/>{% if link %}</a>{% endif %} {% if link %}<a href="{{ link }}"{% if title %} title="{{ title | escape }}"{% endif %}>{% endif %}<img class="image-process-featured" src="{{ pic }}"{% if alt %} alt="{{ alt | escape}}"{% endif %}/>{% if link %}</a>{% endif %}
{% if credit %}<figcaption>Bild: {% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %} {% if credit %}<figcaption>Bild: {% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit | escape }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %}
</figure> </figure>
</div> </div>
{% endmacro %} {% endmacro %}
@ -12,8 +12,8 @@
{% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %} {% macro ci(pic, link='', alt='', title='', credit='', credit_link='') %}
<div class="card-image"> <div class="card-image">
<figure> <figure>
{% if link %}<a href="{{ link }}"{% if title %} title="{{ title }}"{% endif %}>{% endif %}<img class="image-process-card" src="{{ pic }}"{% if alt %} alt="{{ alt }}"{% endif %}/>{% if link %}</a>{% endif %} {% if link %}<a href="{{ link }}"{% if title %} title="{{ title | escape }}"{% endif %}>{% endif %}<img class="image-process-card" src="{{ pic }}"{% if alt %} alt="{{ alt | escape }}"{% endif %}/>{% if link %}</a>{% endif %}
{% if credit %}<figcaption>Bild: {% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %} {% if credit %}<figcaption>Bild: {% if credit_link %}<a href="{{ credit_link }}" alt="Bildquelle: {{ credit | escape }}" target="_blank">{% endif %}{{ credit }}{% if credit_link %}</a>{% endif %}</figcaption>{% endif %}
</figure> </figure>
</div> </div>
{% endmacro %} {% endmacro %}

View File

@ -1,2 +1,2 @@
{% set t = [ pages | map(attribute="modified") | list | max , articles | map(attribute="modified") | list | max ] | max %} {% set t = [ pages | map(attribute="modified") | list | max , articles | map(attribute="modified") | list | max ] | max %}
<p>Letzte Aktualisierung dieser Webseite: {{ t.strftime("%d.%m.%Y") }}</p> <p>Letzte Aktualisierung dieser Webseite: {{ t.strftime("%d.%m.%Y um %H:%M") }}</p>