{% macro create_album_card(album, view="grid", unlink_parent=none) %} {% set view = (view if view in ("list", "grid") else "grid") %} {% set viewparam = "?view=list" if view == "list" else "" %}
{% if album == "root" %} {% else %} {% endif %}
{% if unlink_parent is not none %} {% endif %}
{% if album == "root" %} Albums {% else %} {{album.display_name}} {% endif %}
{% if album == "root" %} {% else %} {% set child_count = album.get_children()|length %} {% set photo_count = album.sum_photos(recurse=False) %} {{child_count}} {{-' | '-}} {{photo_count}} {% endif %}
{% endmacro %}