Implement sidebar on media page

This commit is contained in:
Jef van Schendel 2011-06-27 22:39:05 +02:00
parent da0683b48c
commit a54e5be78e
3 changed files with 45 additions and 32 deletions

View File

@ -174,12 +174,16 @@ a.mediagoblin_logo:hover {
/* media pages */ /* media pages */
img.media_image { .media_image{
display:block; width:640px;
margin-left:auto;
margin-right:auto;
} }
.media_sidebar{
width:280px;
}
/* media galleries */
ul.media_thumbnail { ul.media_thumbnail {
padding:0px; padding:0px;
} }

View File

@ -20,13 +20,17 @@
{# temporarily, an "image gallery" that isn't one really ;) #} {# temporarily, an "image gallery" that isn't one really ;) #}
{% if media %} {% if media %}
<h1>Media details for {{media.title}}</h1> <div class="grid_8 alpha media_image">
<div>
<img src="{{ request.app.public_store.file_url( <img src="{{ request.app.public_store.file_url(
media.media_files.main) }}" /> media.media_files.main) }}" />
<h1>Media details for {{media.title}}</h1>
<p>
<br/>Uploaded: {{ media.created}} <br/>Uploaded: {{ media.created}}
<br/>Description: {{media.description}} <br/>Description: {{media.description}}
</p>
</div>
<div class="grid_4 omega sidebar">
<p>Uploaded: {{ media.created}}</p>
</div> </div>
{% else %} {% else %}
<p>Sorry, no such media found.<p/> <p>Sorry, no such media found.<p/>

View File

@ -20,11 +20,12 @@
{# temporarily, an "image gallery" that isn't one really ;) #} {# temporarily, an "image gallery" that isn't one really ;) #}
{% if media %} {% if media %}
<h1> <div class="grid_8 alpha media_image">
{{media.title}}
</h1>
<img class="media_image" src="{{ request.app.public_store.file_url( <img class="media_image" src="{{ request.app.public_store.file_url(
media.media_files.main) }}" /> media.media_files.main) }}" />
<h2>
{{media.title}}
</h2>
<p> <p>
Uploaded on Uploaded on
{{ "%4d-%02d-%02d"|format(media.created.year, {{ "%4d-%02d-%02d"|format(media.created.year,
@ -42,6 +43,10 @@
user= media.uploader().username, user= media.uploader().username,
media= media._id) }}">Edit</a></p> media= media._id) }}">Edit</a></p>
{% endif %} {% endif %}
</div>
<div class="grid_4 omega media_sidebar">
<p>This is a sidebar! Yay!</p>
</div>
{% else %} {% else %}
<p>Sorry, no such media found.<p/> <p>Sorry, no such media found.<p/>
{% endif %} {% endif %}