Browse Source

Fix photo markup and add copyable links for blogs

pull/2/head
Noah Petherbridge 4 years ago
parent
commit
6a2e055dfd
2 changed files with 9 additions and 3 deletions
  1. +1
    -1
      rophako/modules/photo/templates/photos/album.html
  2. +8
    -2
      rophako/modules/photo/templates/photos/view.html

+ 1
- 1
rophako/modules/photo/templates/photos/album.html 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 %}


+ 8
- 2
rophako/modules/photo/templates/photos/view.html 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"] %}
@@ -54,4 +60,4 @@
subject="Photo Comment",
) | safe }}

{% endblock %}
{% endblock %}

Loading…
Cancel
Save