aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorJoar Wandborg <git@wandborg.com>2011-07-03 01:30:07 +0200
committerJoar Wandborg <git@wandborg.com>2011-07-03 01:30:07 +0200
commit93214d8e0287150aef3f4370237303bc73ec448c (patch)
tree3c6c49a9179d7402cf82df43c7cd2ea1f5cd3464 /mediagoblin/templates
parentfe5f8a281a3cd5d2e449866caaa410b06e488588 (diff)
downloadmediagoblin-93214d8e0287150aef3f4370237303bc73ec448c.tar.lz
mediagoblin-93214d8e0287150aef3f4370237303bc73ec448c.tar.xz
mediagoblin-93214d8e0287150aef3f4370237303bc73ec448c.zip
Feature #400 - Resize images to fit on page
* `mediagoblin.process_media.__init__` * Added `medium` size image conversion * Updated `thumbnail` conversion to use `queued_filename` instead of `queued_file` * `media.html` * If there exists a `medium` size for the `MediaEntry`, it will display instead of the original `main` image.
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 3cebe2f9..e16f1e00 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -26,8 +26,13 @@
<h1>
{{media.title}}
</h1>
- <img class="media_image" src="{{ request.app.public_store.file_url(
- media.media_files.main) }}" />
+ {% if media.media_files.medium %}
+ <img class="media_image" src="{{ request.app.public_store.file_url(
+ media.media_files.medium) }}" />
+ {% else %}
+ <img class="media_image" src="{{ request.app.public_store.file_url(
+ media.media_files.main) }}" />
+ {% endif %}
<p>
Uploaded on
{{ "%4d-%02d-%02d"|format(media.created.year,