"""
from site import SiteTheme
+from MoinMoin.theme import ThemeBase
class Theme(SiteTheme):
return '\n'.join(html)
+ def startPage(self, d):
+ # For the homepage, don't use SiteTheme's changes
+ if d['page'].page_name == 'Site':
+ return ThemeBase.startPage(self)
+ else:
+ return SiteTheme.startPage(self, d)
+
+ def endPage(self, d):
+ # For the homepage, don't use SiteTheme's changes, but also don't use
+ # ThemeBase, since that adds a #pagebottom.
+ if d['page'].page_name == 'Site':
+ return u'</div><!-- #page -->'
+ else:
+ return SiteTheme.endPage(self, d)
+
+
def execute(request):
"""
Generate and return a theme object
return html
def startPage(self, d):
+ # This opens up #page
html = ThemeBase.startPage(self)
- if d['page'].page_name != 'Site':
- html += u'<div id="pagetop"></div>\n'
- html += u'<div id="pagemiddle">'
+ html += u'<div id="pagetop"></div>\n'
+ html += u'<div id="pagemiddle">\n'
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)
+ html = u'</div><!-- #pagemiddle -->\n'
+ html += ThemeBase.endPage(self)
+ # This adds #pagebottom and closes #page
return html
def execute(request):