photojawn/resources/skel/_templates/album.html
2025-04-27 09:45:49 -07:00

55 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block content %}
{% if not album_dir.is_root %}
<h1>
<a href="{{root_path}}">Home</a>
{% for href, name in breadcrumbs %}
/ <a href="{{href}}">{{name}}</a>
{% endfor %}
/ {{album_dir.path.name}}
</h1>
<hr>
{% endif %}
{% if album_dir.description %}
<div class="caption">
{{ album_dir.description | safe }}
</div>
{% endif %}
{% if album_dir.children %}
<h2>Albums</h2>
<div id="album-children">
{% for child in album_dir.children %}
<div class="album">
<a href="{{child.path.name}}/">
<div>
{% if child.cover_path %}
<img
src="{{child.cover_path.path.parent.relative_to(album_dir.path)}}/slides/{{child.cover_path.thumbnail_filename()}}" />
{% endif %}
</div>
<div>
{{child.path.name}}
</div>
</a>
</div>
{% endfor %}
</div>
{% endif %}
{% if album_dir.images %}
{% if album_dir.children %}
<h2>Photos</h2>
{% endif %}
<div id="album-photos">
{% for image in album_dir.images %}
<div class="thumbnail">
<a href="slides/{{image.html_filename()}}">
<img src="slides/{{image.thumbnail_filename()}}" />
</a>
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}