Fix photo markup and add copyable links for blogs

This commit is contained in:
Noah 2015-05-15 00:18:50 +00:00
parent d77e9e10b9
commit 6a2e055dfd
2 changed files with 9 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<h1>Album: {{ album }}</h1>
{% if markdown %}
{% if album_info["description"] %}
<div class="photo-description">{{ markdown|safe }}</div><p>
{% endif %}

View File

@ -28,12 +28,18 @@
<a href="{{ url_for('photo.view_photo', key=photo['next']) }}">
<img src="{{ app['photo_url'] }}/{{ photo['large'] }}" class="portrait">
</a><p>
{% if photo["markdown"] %}
{% if photo["description"] %}
<div class="photo-description">{{ photo["markdown"]|safe }}</div>
{% endif %}
<em>Uploaded by {{ author["name"] }} on {{ photo["pretty_time"] }}.</em>
{% if session["login"] %}
<p>Embed this image in a blog post:<br>
<input type="text" class="form-input" readonly value="![{{ photo['caption'] }}]({{ app['photo_url'] }}/{{ photo['large'] }})"> (Markdown)<br>
<input type="text" class="form-input" readonly value='<a href="{{ app['photo_url'] }}/{{ photo['large'] }}\" alt=\"{{ photo['caption'] }}">'> (HTML)
{% endif %}
{{ nav_links() }}
{% if session["login"] %}