Small photo fixes
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 29 Mar 2009 14:24:16 +0000 (15:24 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 29 Mar 2009 14:24:16 +0000 (15:24 +0100)
media/style/main.css
sommitrealweird/photo/templates/photo/album_index.html
sommitrealweird/photo/templates/photo/photo.html

index 3efdb8e6a5de0c694e964c460cf8d526f7596d5a..74496af0ca1958582cd480aec275a3be01100343 100644 (file)
@@ -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 {
index 33cbbc63cce2f4325ffbb82632c7299d6a3c3a95..df9259e9807a807bc3e37cf9de4eea4eed835a5d 100644 (file)
@@ -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;">&nbsp;</div>
             </div>
         {% endfor %}
         {% if is_paginated %}
index 513cd73418004c09e5a6e5f7f38609f52bbf2337..b62dc07f1eea1af3b62adee6c720740df4e02b94 100644 (file)
@@ -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;">&nbsp;</div>
     {% if prev_photo or next_photo%}