{% extends "base.html" %} {% import "_macros.html" as m %} {# `cv` is the three non-media jobs: a record, not portfolio tiles. #} {% set shown = articles | rejectattr('category.name', 'equalto', 'cv') | list %} {% set disciplines = shown | map(attribute='category.name') | unique | sort | list %} {# Engagements, biggest first. A four-year relationship like ClipAward — nine entries spanning design, projection, animation and organisation — is the thing this portfolio has that a flat grid cannot show. Grouping is the default view; the sort buttons fall back to a flat grid. #} {% set names = [] %} {% for a in shown if a.metadata.get('project') and a.metadata.get('project') not in names %} {% if names.append(a.metadata.get('project')) %}{% endif %} {% endfor %} {% set groups = [] %} {% for n in names %} {% set members = shown | selectattr('metadata.project', 'equalto', n) | list %} {% if groups.append({'name': n, 'members': members, 'n': members|length, 'first': members | map(attribute='date.year') | min}) %}{% endif %} {% endfor %} {# biggest engagement first, then earliest — Articles are not orderable, so sort on the counts rather than on the member lists #} {% set groups = groups | sort(attribute='first') | sort(attribute='n', reverse=true) %} {% set loose = shown | rejectattr('metadata.project') | list %} {% block content %}
discipline {% for d in disciplines %} {% endfor %} {{ shown|length }} entries
arrange
{% for g in groups %} {% set yrs = g.members | map(attribute='date.year') | list %} {% set kinds = g.members | map(attribute='category.name') | unique | sort | list %}
{{ g.name }} {{ g.members|length }} entries · {{ yrs|min }}{% if yrs|min != yrs|max %}–{{ yrs|max }}{% endif %} · {{ kinds|join(', ') }}
{% for a in g.members|sort(attribute='date') %}{{ m.tile(a, SITEURL) }}{% endfor %} {% endfor %} {% if loose %}
Single commissions {{ loose|length }} entries
{% for a in loose|sort(attribute='date', reverse=true) %}{{ m.tile(a, SITEURL) }}{% endfor %} {% endif %}
{% endblock %}