From: Brett Parker <iDunno@sommitrealweird.co.uk> Date: Sun, 29 Mar 2009 14:24:16 +0000 (+0100) Subject: Small photo fixes X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/commitdiff_plain/bf5eb312070092ce660e85f271db579fc3d1edf9?ds=inline;hp=-c Small photo fixes --- bf5eb312070092ce660e85f271db579fc3d1edf9 diff --git a/media/style/main.css b/media/style/main.css index 3efdb8e..74496af 100644 --- a/media/style/main.css +++ b/media/style/main.css @@ -150,6 +150,16 @@ body #page #footer p { div.album { margin-top: 2em; + border-bottom: 1px solid #afafaf; +} + +div.lastalbum { + border: 0; +} + +div.album img { + float: left; + padding-right: 1em; } div.album a img { diff --git a/sommitrealweird/photo/templates/photo/album_index.html b/sommitrealweird/photo/templates/photo/album_index.html index 33cbbc6..df9259e 100644 --- a/sommitrealweird/photo/templates/photo/album_index.html +++ b/sommitrealweird/photo/templates/photo/album_index.html @@ -5,7 +5,11 @@ {% block content %} {% if object_list %} {% for album in object_list %} + {% if forloop.last %} + <div class="album lastalbum"> + {% else %} <div class="album"> + {% endif %} {% if album.get_main_image %} <a href="{{ album.slug }}/"><img src="{{ album.get_main_image.url|thumbnail:"width=250" }}" alt="{{ album.get_main_image.caption }}" /></a> {% endif %} @@ -13,6 +17,7 @@ {% if album.caption %} <p>{{ album.caption }}</h2> {% endif %} + <div style="clear: both;"> </div> </div> {% endfor %} {% if is_paginated %} diff --git a/sommitrealweird/photo/templates/photo/photo.html b/sommitrealweird/photo/templates/photo/photo.html index 513cd73..b62dc07 100644 --- a/sommitrealweird/photo/templates/photo/photo.html +++ b/sommitrealweird/photo/templates/photo/photo.html @@ -4,7 +4,9 @@ {% block content %} <div class="single_photo"> <a href="{{ object.image.url }}"><img src='{{ object.image.url|thumbnail:"width=500" }}' alt="{{ object.caption }}" /></a> - <p>{{ object.caption }}</h2> + {% if object.caption %} + <p>{{ object.caption }}</p> + {% endif %} </div> <div style="clear: both;"> </div> {% if prev_photo or next_photo%}