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

Albums

{% for album in albums %} {{cards.create_album_card(album, view=view, draggable=true)}} {% endfor %}
{% else %} {## Individual album ###################################################################} {% import "header.html" as header %} {% import "cards.html" as cards %} {% 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 author = album.get_author() %} {% if author is not none %}

Author: {{author.display_name}}

{% endif %}

Created on {{album.created|timestamp_to_naturaldate}}.

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

{{parents|length}} Parents

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

1 Parent

{{cards.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') %} {{cards.create_album_card(sub_album, view=view, unlink_parent=album, draggable=true)}} {% endfor %}
{% endif %} {% set photos = album.get_photos() %} {% if photos %}

{{photos|length}} Photos

{% for photo in photos|sort(attribute='basename', case_sensitive=False) %} {{cards.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 ############################################################################}