Centered image on media page

This commit is contained in:
Jef van Schendel 2011-05-29 01:47:12 +02:00
parent 722d6a9705
commit 37a0074826
2 changed files with 17 additions and 11 deletions

View File

@ -138,3 +138,11 @@ a.mediagoblin_logo:hover {
margin-top:8px;
margin-bottom:8px;
}
/* media pages */
img.media_image {
display:block;
margin-left:auto;
margin-right:auto;
}

View File

@ -20,18 +20,17 @@
{# temporarily, an "image gallery" that isn't one really ;) #}
{% if media %}
<h1>
Media details for
<a href="{{ request.urlgen(
'mediagoblin.user_pages.user_home',
user=media.uploader().username) }}">
{{- media.uploader().username }}</a>
/ {{media.title}}
</h1>
<div>
<img src="{{ request.app.public_store.file_url(
<img class="media_image" src="{{ request.app.public_store.file_url(
media.media_files.main) }}" />
<br />
<h1>
Media details for
<a href="{{ request.urlgen(
'mediagoblin.user_pages.user_home',
user=media.uploader().username) }}">
{{- media.uploader().username }}</a>
/ {{media.title}}
</h1>
Uploaded on
{{ "%4d-%02d-%02d"|format(media.created.year,
media.created.month, media.created.day) }}
@ -41,7 +40,6 @@
{{- media.uploader().username }}</a>
<br />
Description: {{ media.description }}
</div>
{% else %}
<p>Sorry, no such media found.<p/>
{% endif %}