Put a parchment background behind normal pages.
authorMatthijs Kooijman <matthijs@stdin.nl>
Thu, 2 Jul 2009 20:44:18 +0000 (22:44 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 4 Aug 2009 21:05:56 +0000 (23:05 +0200)
plugin/theme/site.py
static/exodus/css/screen.css

index 37bff91f75dc2e4b3341aa25054417f6f7bf8ab1..17f4bfe3125c92fde5c203c93e3b85c6c49490f2 100644 (file)
@@ -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'<div id="pagetop"></div>\n'
+            html += u'<div id="pagemiddle">'
+        return html
+
+    def endPage(self, d):
+        if d['page'].page_name != 'Site':
+            html = u'</div><!-- #pagemiddle -->'
+            html += u'<div id=pagebottom></div>'
+            html += u'</div>'
+        else:
+            html = u'</div>'
+        #html += ThemeBase.endPage(self)
+        return html
+
 def execute(request):
     """
     Generate and return a theme object
index d7be9a70d817b3fbe2c9cf525cbb235051a9fa65..bddf19b1a378f0db09861cb1b345d34ffb95910b 100644 (file)
@@ -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;
 }