2025-01-31 14:46:50 +01:00
{% import 'macro/badge.html' as badge %}
2025-01-29 10:36:43 +01:00
{% macro header(item, name, solo=false, identifier=none, icon='hashtag') %}
2025-01-17 11:03:00 +01:00
< div class = "card-header" >
{% if not solo %}
< a class = "text-decoration-none text-reset" href = "{{ item.url() }}" data-bs-toggle = "tooltip" title = "{{ name }}" >
{% endif %}
< h5 class = "mb-0 {% if not solo %}fs-6 text-nowrap overflow-x-hidden text-truncate{% endif %}" >
2025-01-31 14:46:50 +01:00
{{ badge.identifier(identifier, icon=icon, solo=solo, header=true) }}
2025-01-29 14:03:48 +01:00
{% if solo %}
2025-01-31 14:46:50 +01:00
{{ badge.color(item, header=true) }}
{{ badge.print(item, header=true) }}
2025-01-29 10:36:43 +01:00
{% endif %}
2025-01-17 11:03:00 +01:00
{{ name }}
< / h5 >
{% if not solo %}
< / a >
{% endif %}
< / div >
{% endmacro %}
{% macro image(item, solo=false, last=false, caption=none, alt=none, medium=none) %}
{% set image_url=item.url_for_image() %}
< div class = "card-img border-bottom" style = "background-image: url({{ image_url }})" >
< a { % if solo % } data-lightbox { % if caption % } data-caption = "{{ caption }}" { % endif % } href = "{{ image_url }}" target = "_blank" { % else % } href = "{{ item.url() }}" { % endif % } >
< img { % if solo and medium % } class = "card-medium-img" { % endif % } { % if last % } class = "card-last-img" { % endif % } src = "{{ image_url }}" { % if alt % } alt = "{{ alt }}" { % endif % } loading = "lazy" >
< / a >
< / div >
{% endmacro %}