{% macro shared_css() %} {% endmacro %} {% if album is not defined %} {## Album listing ###################################################} {% import "header.html" as header %} {% import "album_card.html" as album_card %} Albums {% if theme %}{% endif %} {{shared_css()}} {{header.make_header(session=session)}}

Albums

{% for album in albums %} {{album_card.create_album_card(album, view=view)}} {% endfor %}
{% else %} {## Individual album ###################################################################} {% import "header.html" as header %} {% import "album_card.html" as album_card %} {% import "photo_card.html" as photo_card %} {% import "clipboard_tray.html" as clipboard_tray %} {{album.display_name}} | Albums {% if theme %}{% endif %} {{shared_css()}} {{header.make_header(session=session)}}

{{-album.display_name-}}

                    {{-album.description-}}
                
{% set parents = album.get_parents() %} {% if parents %}

{{parents|length}} Parents

{% for parent in parents %} {{album_card.create_album_card(parent, view=view)}} {% endfor %} {% else %}

1 Parent

{{album_card.create_album_card("root", view=view)}} {% endif %}
{% set sub_albums = album.get_children() %} {% if sub_albums %}

{{sub_albums|length}} Children

{% for sub_album in sub_albums|sort(attribute='title') %} {{album_card.create_album_card(sub_album, view=view, unlink_parent=album)}} {% endfor %}
{% endif %} {% set photos = album.get_photos() %} {% if photos %}

{{photos|length}} Photos

{% for photo in photos %} {{photo_card.create_photo_card(photo, view=view)}} {% endfor %}
{% endif %} {% set has_local_photos = photos|length > 0 %} {% set has_child_photos = album.has_any_subalbum_photo() %} {% if has_local_photos or has_child_photos %} {% endif %}
{{clipboard_tray.clipboard_tray()}}
{% endif %} {## Shared ############################################################################}