From: Matthijs Kooijman Date: Thu, 2 Jul 2009 20:44:18 +0000 (+0200) Subject: Put a parchment background behind normal pages. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=bca7a535d5c77b71a60e5f535db8b6f8116ca698;p=matthijs%2Fprojects%2Fwipi.git Put a parchment background behind normal pages. --- diff --git a/plugin/theme/site.py b/plugin/theme/site.py index 37bff91..17f4bfe 100644 --- a/plugin/theme/site.py +++ b/plugin/theme/site.py @@ -62,10 +62,11 @@ class SiteTheme(ThemeBase): # Post header custom html (not recommended) self.emit_custom_html(self.cfg.page_header2), - # Start of page - self.startPage(), - self.editbar(d), self.msg(d), + self.editbar(d), + + # Start of page + self.startPage(d), ] return u'\n'.join(html) @@ -89,7 +90,7 @@ class SiteTheme(ThemeBase): self.emit_custom_html(self.cfg.page_header2), # Start of page - self.startPage(), + self.startPage(d), self.msg(d), ] return u'\n'.join(html) @@ -105,7 +106,7 @@ class SiteTheme(ThemeBase): page = d['page'] html = [ # End of page - self.endPage(), + self.endPage(d), # Pre footer custom html (not recommended!) self.emit_custom_html(self.cfg.page_footer1), @@ -168,6 +169,23 @@ class SiteTheme(ThemeBase): } return html + def startPage(self, d): + html = ThemeBase.startPage(self) + if d['page'].page_name != 'Site': + html += u'
\n' + html += u'
' + return html + + def endPage(self, d): + if d['page'].page_name != 'Site': + html = u'
' + html += u'
' + html += u'' + else: + html = u'' + #html += ThemeBase.endPage(self) + return html + def execute(request): """ Generate and return a theme object diff --git a/static/exodus/css/screen.css b/static/exodus/css/screen.css index d7be9a7..bddf19b 100644 --- a/static/exodus/css/screen.css +++ b/static/exodus/css/screen.css @@ -82,7 +82,38 @@ ul#menubar li a { margin-left: auto; } -h1 { margin: 0; padding: 0; } + +#pagetop { + width: 694px; + height:39px; + background-image:url('../img/perkamentTop.gif'); +} + +#pagemiddle { + background-image:url('../img/perkamentCenter.gif'); + background-repeat:repeat-y; + /* Force a new block-formatting context, to prevent any margins from + * content to stick out of this div, causing a gap between #pagetop + * and #pagemiddle */ + overflow: hidden; + /* Indent the text a bit, so it skips the jagged edges of the + * background */ + padding:0px 45px 0px 45px; + /* 694px image width minus two times 45px padding*/ + width: 604px; + /* Set a font colour that's readable on the background image. We + * should really also set a background colour here (for when images + * are disabled), but it seems it's impossible to do that without the + * colour showing always */ + color:#731E01; + font-weight:bold; +} + +#pagebottom { + width: 694px; + height:37px; + background-image:url('../img/perkamentBottom.gif'); +} #footer { /* Put a dotted line at the top of the footer */ @@ -140,7 +171,6 @@ h1 { margin: 0; padding: 0; } /* Put a bit of offset between the pageinfo and searchform. Don't use * margin here, that collapses with the floating pageinfo. */ padding-top: 10px; - margin: 0px 12px; } .editbar { @@ -164,7 +194,7 @@ h1 { margin: 0; padding: 0; } } .editbar li { - display: inline; + /* display: inline;*/ padding: 0; margin: 4px 6px; }