Fixed some validation errors
[planet-ucc.git] / XMLWriter.py
index 8a443ba..8b0118b 100644 (file)
@@ -101,7 +101,7 @@ class XHTMLWriter:
                output  +=      '<p class="body">\n'
                output  +=      item.contents
                output  +=      '\n</p>\n'
-               output  +=      '</div>'
+               output  +=      '</div>\n'
                return output
        
        def write(self):
@@ -113,15 +113,24 @@ class XHTMLWriter:
                output  +=      '<head>\n'
                output  +=      '<title>Planet UCC</title>\n'
                output  +=      '<link rel="stylesheet" href="planet.css" type="text/css" media="screen" />\n'
+               output  +=      '<link rel="icon" type="image/png" href="icon.png" />\n'
                output  +=      '</head>\n'
                output  +=      '<body>\n'
                output  +=      '<div id="header">\n'
+               try:
+                       output  +=      open('header.html').read()
+               except:
+                       pass
                output  +=      '</div>\n'
                output  +=      '<div id="sidebar">\n'
                try:
                        output  +=      open('sidebar.html').read()
                except:
                        pass
+               output  +=      '<h2>Last Updated</h2>\n'
+               output  +=      '<p>\n'
+               output  +=      '%s\n' % time.strftime('%A %B %d, %Y %H:%M', time.localtime())
+               output  +=      '</p>\n'
                if self.parent:
                        output  +=      '<h2>Feeds</h2>\n'
                        output  +=      '<p>\n'
@@ -147,6 +156,7 @@ class XHTMLWriter:
                        output  +=      open('footer.html').read()
                except:
                        pass
+               output  +=      '</div>\n'
                output  +=      '</body>\n'
                output  +=      '</html>'
                return output

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