etiquette/templates/album.html

69 lines
1.5 KiB
HTML
Raw Normal View History

2016-09-18 08:33:46 +00:00
<!DOCTYPE html5>
<html>
<head>
2016-11-07 02:00:30 +00:00
{% import "photo_card.html" as photo_card %}
2016-09-18 08:33:46 +00:00
{% import "header.html" as header %}
2016-10-10 03:50:13 +00:00
<title>Album {{album["title"]}}</title>
2016-09-18 08:33:46 +00:00
<meta charset="UTF-8">
<link rel="stylesheet" href="/static/common.css">
2016-11-27 09:06:11 +00:00
2016-09-18 08:33:46 +00:00
<style>
2016-12-14 21:26:42 +00:00
p
{
word-break: break-word;
}
2016-09-18 08:33:46 +00:00
#content_body
{
/* overriding common.css here */
display: block;
}
</style>
2016-11-27 09:06:11 +00:00
</head>
2016-09-18 08:33:46 +00:00
<body>
{{header.make_header()}}
<div id="content_body">
2016-10-10 03:50:13 +00:00
<h2>{{album["title"]}}</h2>
2016-12-14 21:26:42 +00:00
<p>{{album["description"]}}</p>
2016-10-10 03:50:13 +00:00
{% set parent=album["parent"] %}
2016-09-18 08:33:46 +00:00
{% if parent %}
<h3>Parent: <a href="/album/{{parent["id"]}}">{{parent["id"] + " " + parent.title}}</a></h3>
2016-11-06 00:58:37 +00:00
{% else %}
<h3>Parent: <a href="/albums">Albums</a></h3>
2016-09-18 08:33:46 +00:00
{% endif %}
2016-11-06 04:24:43 +00:00
{% if album["sub_albums"] %}
2016-09-18 08:33:46 +00:00
<h3>Sub-albums</h3>
<ul>
2016-11-06 04:24:43 +00:00
{% for sub_album in album["sub_albums"] %}
<li><a href="/album/{{sub_album["id"]}}">
{% if sub_album["title"] %}
{{sub_album["title"]}}
2016-09-18 08:33:46 +00:00
{% else %}
2016-11-06 04:24:43 +00:00
{{sub_album["id"]}}
2016-09-18 08:33:46 +00:00
{% endif %}</a>
</li>
{% endfor %}
</ul>
{% endif %}
2016-11-06 00:58:37 +00:00
<span><a href="/album/{{album["id"]}}.tar">(download .tar)</a></span>
2016-09-18 08:33:46 +00:00
{% if photos %}
<h3>Photos</h3>
<ul>
{% for photo in photos %}
2016-11-27 09:06:11 +00:00
{{photo_card.create_photo_card(photo, view=view)}}
2016-09-18 08:33:46 +00:00
{% endfor %}
</ul>
{% endif %}
</div>
</body>
<script type="text/javascript">
2016-10-21 03:15:24 +00:00
function submit_tag(callback)
{
add_photo_tag('{{album["id"]}}', add_tag_box.value, callback);
add_tag_box.value = "";
}
2016-11-27 09:06:11 +00:00
</script>
</html>