A Python content management system designed for kirsle.net featuring a blog, comments and photo albums. https://rophako.kirsle.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.9 KiB

{% extends "layout.html" %}
{% block title %}{{ photo["caption"] or "Photo" }}{% endblock %}
{% block content %}
{% macro nav_links() %}
<div class="right">
Photo {{ photo["position"] }} of {{ photo["siblings"] }}
{% if photo["siblings"] > 1 %}
&nbsp;&nbsp;&nbsp;
[
<a href="{{ url_for('photo.view_photo', key=photo['previous']) }}">&lt; Previous</a>
|
<a href="{{ url_for('photo.view_photo', key=photo['next']) }}">Next &gt;</a>
]
{% endif %}
</div>
{% endmacro %}
<h1>Photo</h1>
<a href="{{ url_for('photo.album_index', name=photo['album']) }}">&lt; Back to Album</a><p>
{{ nav_links() }}
{% if photo["caption"] %}
<h2>{{ photo["caption"] }}</h2>
{% endif %}
<a href="{{ url_for('photo.view_photo', key=photo['next']) }}">
<img src="{{ app['photo_url'] }}/{{ photo['large'] }}" class="portrait">
</a><p>
{% if photo["markdown"] %}
<div class="photo-description">{{ photo["markdown"]|safe }}</div>
{% endif %}
<em>Uploaded by {{ author["name"] }} on {{ photo["pretty_time"] }}.</em>
{{ nav_links() }}
{% if session["login"] %}
<h1>Administrative Options</h1>
<ul>
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
<li><a href="{{ url_for('photo.set_cover', album=photo['album'], key=photo['key']) }}">Set Album Cover</a></li>
<li><a href="{{ url_for('photo.set_profile', key=photo['key']) }}">Set as my Profile Picture</a></li>
<li><a href="{{ url_for('photo.edit', key=photo['key']) }}">Edit this photo</a></li>
<li><a href="{{ url_for('photo.crop', photo=photo['key']) }}">Change Thumbnail</a></li>
<li><a href="{{ url_for('photo.delete', key=photo['key']) }}">Delete this photo</a></li>
</ul>
{% endif %}
{{ include_page("comment.partial_index",
thread="photos-{}".format(photo["key"]),
subject="Photo Comment",
) | safe }}
{% endblock %}