diff options
author | Magnus Hagander | 2008-10-22 20:20:33 +0000 |
---|---|---|
committer | Magnus Hagander | 2008-10-22 20:20:33 +0000 |
commit | 494c6c3dffb366c9a42562d7c710100ee0772665 (patch) | |
tree | ef208fae403e4954390e4191e3d6f9f06e2bd332 | |
parent | 29a27ace4199d0f92bdcb30c7f507bd2bd9f2d11 (diff) |
Make the output use the full width of the page.
In passing, fix a number of XHTML errors.
git-svn-id: file:///Users/dpage/pgweb/svn-repo/trunk@2226 8f5c7a92-453e-0410-a47f-ad33c8a6b003
-rw-r--r-- | planet/planethtml.py | 27 | ||||
-rw-r--r-- | planet/www/css/planet.css | 25 |
2 files changed, 34 insertions, 18 deletions
diff --git a/planet/planethtml.py b/planet/planethtml.py index 3e3afe47..6fd14def 100644 --- a/planet/planethtml.py +++ b/planet/planethtml.py @@ -9,6 +9,7 @@ Copyright (C) 2008 PostgreSQL Global Development Group """ import datetime +import urllib class PlanetHtml: def __init__(self): @@ -25,9 +26,9 @@ class PlanetHtml: <style type="text/css" media="screen" title="Normal Text">@import url("css/planet.css");</style> </head> <body> - <div align="center"> + <div id="planetWrap"> <div id="planetHeader"> - <div class="fl"><img src="http://www.postgresql.org/layout/images/hdr_left.png" border="0" alt="PostgreSQL" /></div> + <div class="fl"><img src="http://www.postgresql.org/layout/images/hdr_left.png" alt="PostgreSQL" /></div> <div class="fr"><img width="210" height="80" src="http://www.postgresql.org/layout/images/hdr_right.png" alt="The world's most advanced open source database" /></div> <div class="cb"></div> </div> @@ -64,15 +65,19 @@ class PlanetHtml: <div class="planetPostTitle"><a href="%s">%s</a></div> <div class="planetPostAuthor"> <div class="ppa_top"> </div> - <p>Posted by %s on <span class="date">%s at %s</span></p> - <div class="ppa_bottom"> </div> + <p>Posted by %s on <span class="date">%s at %s</span></p> + <div class="ppa_bottom"> </div> </div> <div class="planetPostContent">%s</div> - <div class="cb"></div> + <div class="cl"></div> </div>""" % (post[1], post[3], posterstr, post[2].date(), post[2].time(), txt) self.str += """ </div>""" + def quoteurl(self, str): + p = str.split(":",2) + return p[0] + ":" + urllib.quote(p[1]) + def BuildRight(self): self.str += """ <div id="planetRight"> <div class="planetRightTitle">Subscriptions</div> @@ -80,24 +85,24 @@ class PlanetHtml: for feed in self.feeds: self.str += "<li>" if feed[1] != '': - self.str += """<a href="%s">%s</a>""" % (feed[1], feed[0]) + self.str += """<a href="%s">%s</a>""" % (self.quoteurl(feed[1]), feed[0]) else: self.str += feed[0] self.str += """ -<a href="%s"><img border="0" src="http://www.postgresql.org/layout/images/ico_rss.png" alt="rss" /></a></li>""" % (feed[2]) - self.str += """ </ul> +<a href="%s"><img src="http://www.postgresql.org/layout/images/ico_rss.png" alt="rss" /></a></li>""" % (feed[2]) + self.str += """ + </ul> <div class="planetRightTitle">Feeds</div> <ul> - <li><a href="rss20.xml">Planet PostgreSQL</a> <a href="rss20.xml"><img border="0" src="http://www.postgresql.org/layout/images/ico_rss.png" alt="rss"></a></li> + <li><a href="rss20.xml">Planet PostgreSQL</a> <a href="rss20.xml"><img src="http://www.postgresql.org/layout/images/ico_rss.png" alt="rss" /></a></li> </ul> </div> """ def WriteFile(self,filename): - self.BuildPosts() self.BuildRight() + self.BuildPosts() self.str += """ </div> - </div> </div> </body> </html> diff --git a/planet/www/css/planet.css b/planet/www/css/planet.css index 19dc0896..b21bd6ae 100644 --- a/planet/www/css/planet.css +++ b/planet/www/css/planet.css @@ -8,21 +8,28 @@ body { } div#planetHeader { - width: 800px; + width: 90%; background: url(http://www.postgresql.org/layout/images/hdr_fill.png); padding: 0 0 0 0; height: 80px; margin: 5px 0 2px 0; } -div#planetMain { - width: 800px; +div#planetWrap { + margin-left: 20px; +} + +div#planetWrap img { + /* applies to all images */ border: none; } +div#planetMain { + width: 90%; +} + div#planetLeft { - width: 590px; - float:left; + margin-right: 270px; padding-top: 10px; } @@ -105,25 +112,29 @@ max-width: 100px; } div#planetRight { - width: 190px; + width: 250px; margin-top: 10px; float: right; text-align: left; + border-left: 1px solid #dadada; + clear: both; } div#planetRight div.planetRightTitle { font-weight: bold; font-size: 20px; + padding-left: 10px; } div#planetRight ul { list-style: none; - padding-left: 5px; + padding-left: 15px; } div.fl { float: left; border: none; text-align: left; } div.fr { float: right; } div.cb { clear: both; } +div.cl { clear: left; } a:link { color:#0085B0; text-decoration: underline; } a:visited { color:#004E66; text-decoration: underline; } |