Commits

Anonymous committed 419a63a

Typography and code order tweaks.

  • Participants
  • Parent commits 7e910cf

Comments (0)

Files changed (2)

relaxlog/static/styles.css

 #container { margin: 6em auto; width: 530px; }
 #footer { border-top: 1px solid #E0E0E0; padding-top: 1.4em; margin: 3em 0; }
 #footer a { color: black; text-decoration: underline; }
-h1 { line-height: 20px; color: black; font-weight: bold; margin-bottom: 10px; }
-h2 { font-style: italic; line-height: 20px; }
+h1 { font-family: Georgia, serif; font-size: 16px; line-height: 24px; color: black; font-weight: bold; margin-bottom: 10px; }
+h2 { font-weight: bold; line-height: 20px; }
 h3 { line-height: 20px; }
 p { margin-bottom: 20px; line-height: 20px; }
 

relaxlog/weblog/views.py

 
 @login_required
 def add(request):
+    
     if request.method == "POST":
         form = DocumentAddForm(request.POST)
         if form.is_valid():
             return HttpResponseRedirect(reverse('weblog.views.article', args=[_id]))
     else:
         form = DocumentAddForm()
+        
     return response(request, 'weblog/add.html', {'form': form })
 
 
-@require_POST
-def preview(request):
-    form = DocumentForm(request.POST)
-    if form.is_valid():
-        document = form.cleaned_data
-    else:
-        return HttpResponse(u'Skjölun ekki lokið')
-    return response(request, 'weblog/preview.html', {'document': document })
-
-
 @login_required
 def edit(request, slug):
             
         article['date'] = datetime.date(*date.timetuple()[:3]) # Convert from datetime to date
         form = DocumentForm(initial=article)
     
-    return response(request, 'weblog/add.html', {'form': form })
+    return response(request, 'weblog/add.html', {'form': form })
+
+
+@require_POST
+def preview(request):
+    
+    form = DocumentForm(request.POST)
+    if form.is_valid():
+        document = form.cleaned_data
+    else:
+        return HttpResponse(u'Skjölun ekki lokið')
+        
+    return response(request, 'weblog/preview.html', {'document': document })