2004-11-02 Davyd Madeley <[email protected]>
[planet-ucc.git] / XHTMLWriter.py
index b9cfcba..99300ba 100644 (file)
@@ -48,6 +48,19 @@ class XHTMLWriter:
                except:
                        pass
                output  +=      '</div>\n'
+               output  +=      '<div class="items">\n'
+               for date in self.planet:
+                       output  += '<h1>%s</h1>\n' % time.strftime('%A %B %d, %Y', time.localtime(date.planetDate))
+                       for item in date.items:
+                               output  += self.__write_item__(item)
+                               # see how many items we've written
+                               itemcount += 1
+                               if itemcount >= self.maxitems:
+                                       break
+                       # again, check to see if we've written the maximum number of items
+                       if itemcount >= self.maxitems:
+                               break
+               output  +=      '</div>\n'
                output  +=      '<div class="sidebar">\n'
                try:
                        output  +=      open('sidebar.html').read()
@@ -66,19 +79,6 @@ class XHTMLWriter:
                                output  += '<a href="%s">%s</a> (<a href="%s">feed</a>)<br />\n' % (blog.blogURL, blog.blogName, blog.feedURL)
                        output  +=      '</p>\n'
                output  +=      '</div>\n'
-               output  +=      '<div class="items">\n'
-               for date in self.planet:
-                       output  += '<h1>%s</h1>\n' % time.strftime('%A %B %d, %Y', time.localtime(date.planetDate))
-                       for item in date.items:
-                               output  += self.__write_item__(item)
-                               # see how many items we've written
-                               itemcount += 1
-                               if itemcount >= self.maxitems:
-                                       break
-                       # again, check to see if we've written the maximum number of items
-                       if itemcount >= self.maxitems:
-                               break
-               output  +=      '</div>\n'
                output  +=      '<div class="footer">\n'
                try:
                        output  +=      open('footer.html').read()

UCC git Repository :: git.ucc.asn.au