First draft image gallery
[sommitrealweird.git] / sommitrealweird / photo / templates / photo / photo.html
diff --git a/sommitrealweird/photo/templates/photo/photo.html b/sommitrealweird/photo/templates/photo/photo.html
new file mode 100644 (file)
index 0000000..513cd73
--- /dev/null
@@ -0,0 +1,20 @@
+{% extends "base.html" %}
+{% load thumbnail %}
+
+{% 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>
+    </div>
+    <div style="clear: both;">&nbsp;</div>
+    {% if prev_photo or next_photo%}
+        <p class="paginator">
+            {% if prev_photo %}
+                <a href="/photo/{{ object.album.slug }}/{{ prev_photo.id }}/">Previous</a>
+            {% endif %}
+            {% if next_photo %}
+                <a href="/photo/{{ object.album.slug }}/{{ next_photo.id }}/">Next</a>
+            {% endif %}
+        </p>
+    {% endif %}
+{% endblock %}