"""
from MoinMoin.theme import ThemeBase
+from MoinMoin.Page import Page
class SiteTheme(ThemeBase):
# Header
u'<div id="header">',
+ self.menu(d),
#self.logo(),
- self.searchform(d),
#self.username(d),
- u'<div id="locationline">',
+ #u'<div id="locationline">',
#self.interwiki(d),
- self.title(d),
- u'</div>',
- self.trail(d),
- #self.navibar(d),
+ #self.title(d),
+ #u'</div>',
+ self.navibar(d),
#u'<hr id="pageline">',
#u'<div id="pageline"><hr style="display:none;"></div>',
self.msg(d),
self.editbar(d),
+ self.trail(d),
u'</div>',
# Post header custom html (not recommended)
# Footer
u'<div id="footer">',
self.username(d),
+ self.searchform(d),
#self.editbar(d),
#self.credits(d),
#self.showversion(d, **keywords),
]
return u'\n'.join(html)
+ def menu(self, d):
+ """ Assemble a "main menu
+
+ @param d: parameter dictionary
+ @rtype: unicode
+ @return: menu html
+ """
+ items = Page(self.request, 'Site/Menu').data.split('\n')
+
+ html = '<ul id="menubar">'
+
+ for item in items:
+ if (not item.startswith("#")):
+ (pagename, link) = self.splitNavilink(item)
+ html = html + ("<li class=\"menulink\">%s</li>" % link)
+
+ html = html + '</ul>'
+
+ return html
def execute(request):
"""
text-align: right;
}
+#menubar {
+ display: block;
+ margin-bottom: 60px;
+ margin-top: 30px;
+}
+
+#menubar li {
+ /* Hide the leading dots */
+ display: inline;
+ /* Put the menu items horizontal */
+ float: left;
+ /* Put some spacing between items */
+ padding: 0px 5px;
+
+ font-size: +4pt;
+ font-weight: bold;
+}
+
/* end MonthCalendar stuff */