# HG changeset patch # User Steve Losh # Date 1234672549 18000 # Node ID 91f05965e2070807b34fc4906060746e96c9800d # Parent 444fa384fab87c9729db32a6521c9846efee2a1c More changes for the photo blog. diff -r 444fa384fab8 -r 91f05965e207 photoblog/specs.py --- a/photoblog/specs.py Sat Feb 14 12:39:39 2009 -0500 +++ b/photoblog/specs.py Sat Feb 14 23:35:49 2009 -0500 @@ -6,6 +6,7 @@ class ResizeDisplay(processors.Resize): width = 550 + height = 550 class EnchanceThumb(processors.Adjustment): contrast = 1.2 diff -r 444fa384fab8 -r 91f05965e207 photoblog/views.py --- a/photoblog/views.py Sat Feb 14 12:39:39 2009 -0500 +++ b/photoblog/views.py Sat Feb 14 23:35:49 2009 -0500 @@ -8,4 +8,15 @@ entry = get_object_or_404(Entry, slug=slug, pub_date__year=year, pub_date__month=month, pub_date__day=day,) - return render_to_response('photoblog/entry.html', { 'entry': entry }) \ No newline at end of file + try: + next = entry.get_next_by_pub_date() + except Entry.DoesNotExist, e: + next = None + + try: + previous = entry.get_previous_by_pub_date() + except Entry.DoesNotExist, e: + previous = None + + return render_to_response('photoblog/entry.html', + { 'entry': entry, 'next': next, 'previous': previous }) \ No newline at end of file diff -r 444fa384fab8 -r 91f05965e207 site-media/style/photoblog.css --- a/site-media/style/photoblog.css Sat Feb 14 12:39:39 2009 -0500 +++ b/site-media/style/photoblog.css Sat Feb 14 23:35:49 2009 -0500 @@ -1,5 +1,8 @@ -img#photoblog-main-image { border: 15px solid #eee; margin: 1em auto 2em; display: block; } -div#photoblog-entry-date { color: #666; } +h1#photoblog-entry-title { margin-bottom: 0.1em;} +div#photoblog-entry-date { color: #666; margin-top: 0em; margin-bottom: 2em; } + +img#photoblog-main-image { border: 10px solid #eee; margin: 1em auto 2em; display: block; } + div.photoblog-nav-entry { border-bottom: 1px solid #eee; height: 54px; vertical-align: middle; } div.photoblog-nav-entry h2, div.photoblog-nav-entry h3 { line-height: 54px; display: inline; } div.photoblog-nav-entry img { float: right; margin: 2px 0px; } diff -r 444fa384fab8 -r 91f05965e207 templates/photoblog/entry.html --- a/templates/photoblog/entry.html Sat Feb 14 12:39:39 2009 -0500 +++ b/templates/photoblog/entry.html Sat Feb 14 23:35:49 2009 -0500 @@ -15,37 +15,59 @@ - - -
- {{ entry.body|markdown|typogrify }} -
-

Posted on {{ entry.pub_date|date:"F j, Y" }}

+ + +
+ {{ entry.body|markdown|typogrify }} +
+
-
-

Newer

-
-
- -

{{ entry.title }}

-
+ {% if next %} +
+

Newer

+
+
+ + + +

+ + {{ next.title }} + +

+
+ {% else %} +   + {% endif %} +
-
-

Older

-
-
- -

{{ entry.title }}

-
+ {% if previous %} +
+

Older

+
+
+ + + +

+ + {{ previous.title }} + +

+
+ {% else %} +   + {% endif %} +