{% macro names(raw) %} {%- for part in raw.split(';') %}{% set p = part.strip() %} {%- if '<' in p %}{{ p.split('<')[0]|trim }} {%- else %}{{ p }}{% endif %}{% if not loop.last %}, {% endif %} {%- endfor %} {%- endmacro %} {# The 2014 site ran the credits inline under the title: "with X for Y". #} {% macro credits(a) %} {%- for key, label in [('with','with'), ('for','for'), ('hiredby','hired by'), ('photosby','photos by')] %} {%- if a.metadata.get(key) %}{{ label }} {{ names(a.metadata.get(key)) }} {% endif %} {%- endfor %} {%- endmacro %} {% macro tile(a, SITEURL) %} {% set th = a.metadata.get('thumb') if not a.metadata.get('thumb_missing') else none %} {# the original showed animated static (void.gif) until jquery.lazyload swapped in data-original. Same effect, IntersectionObserver instead. #} {# --seed desynchronises the static: derived from the slug so it is stable across builds rather than reshuffling every time. #} {% set seed = (a.slug|length * 7 + a.title|length * 13 + a.date.month * 3) % 12 %} {% if th %} {% else %}{% endif %}
{{ a.title }}
{{ a.date.strftime('%b %Y') }}
{% endmacro %}