{# Provenance fields arrive as "Name ", several separated by "; ". Rendered as a mono credit line — the one slot no off-the-shelf theme has. #} {% macro names(raw) %} {%- for part in raw.split(';') %} {%- set p = part.strip() %} {%- if '<' in p %} {%- set nm = p.split('<')[0].strip() %} {%- set url = p.split('<')[1]|replace('>','')|trim %} {{ nm }} {%- else %}{{ p }}{% endif %} {%- if not loop.last %}, {% endif %} {%- endfor %} {%- endmacro %} {% macro credits(a) %} {%- set rows = [('for', 'for'), ('hiredby', 'hired by'), ('with', 'with'), ('photosby', 'photos by')] %} {%- set any = rows | selectattr(0, 'in', a.metadata) | list %} {%- if any %}
{%- for key, label in rows %}{% if a.metadata.get(key) %}
{{ label }} {{ names(a.metadata.get(key)) }}
{%- endif %}{% endfor %}
{%- endif %} {%- endmacro %} {# A tile. `empty` when no thumbnail survived — about 35 entries are in that position, so it degrades to a typographic card rather than a hole. #} {% macro tile(a, SITEURL) %} {# assetcheck flags references whose file did not survive #} {% set thumb = a.metadata.get('thumb') if not a.metadata.get('thumb_missing') else none %}
{% if thumb %} {# One image, not two: siblings dim on hover rather than the target colourising, so there is no need for a greyscale copy. #}
{{ a.title|striptags }}
{% else %}
{{ a.category }}
{% endif %}
{{ a.title }}
{{ a.date.year }}{% if a.metadata.get('project') %} · {{ a.metadata.get('project') }}{% endif %}
{% set d = a.summary|striptags|trim %} {% if d %}
{{ d|truncate(104, true, '…') }}
{% endif %} {% if a.tags %}
{% for t in a.tags %}{{ t }}{% endfor %}
{% endif %}
{% endmacro %}