print('</pre><script type="text/javascript" src="%s" defer="defer"></script>' \
% relative_url('sys/GuruMeditation.js'))
-def send_title(name, text="Limbo", msg_text=None, msg_type='error', writable=False, mtime=None):
+def send_title(name, text="Limbo", msg_text=None, msg_type='error', writable=False, mtime=None, navbar="on"):
global title_done
if title_done: return
title_done = True
send_guru(msg_text, msg_type)
+ if navbar != "on":
+ return
+
# NAVBAR
print('<nav><div class="nav">')
print link_tag('FrontPage', config_get('site_icon', 'Home'), cssclass='navlink')
send_httperror("403 Forbidden", pagename)
return
- pg = Page(form['q'].value)
+ pg = Page(form['q'].value)
if 'save' in form:
if form['file'].value:
pg.save(form['file'].file.read(), form['changelog'].value)
search_re = re.compile(r"^\b((([A-Z][a-z0-9]+){2,}/)*([A-Z][a-z0-9]+){2,})\b$")
return sorted(filter(search_re.match, os.listdir(dirname or '.')))
-def send_footer(mtime=None):
+def send_footer(mtime=None, footer="sys/footer"):
if config_get('debug_cgi', False):
cgi.print_arguments()
cgi.print_form(form)
cgi.print_environ()
- link_inline("sys/footer", kvargs = {
- 'LAST_MODIFIED': strftime(config_get('datetime_fmt', '%a %d %b %Y %I:%M %p'), localtime(mtime))
- })
+ if footer != "off":
+ link_inline(footer, kvargs = {
+ 'LAST_MODIFIED': strftime(config_get('datetime_fmt', '%a %d %b %Y %I:%M %p'), localtime(mtime))
+ })
print("</body></html>")
def _macro_ELAPSED_TIME(*args, **kvargs):
link_urls += [ [ "stylesheet", value ] ]
send_title(self.page_name, self.split_title(),
- msg_text=self.msg_text, msg_type=self.msg_type, writable=self.can_write(), mtime=self._mtime())
+ msg_text=self.msg_text, msg_type=self.msg_type, writable=self.can_write(), mtime=self._mtime(),
+ navbar=self.pragma("navbar", "on"))
self.send_naked()
- send_footer(mtime=self._mtime())
+ send_footer(mtime=self._mtime(), footer=self.pragma("footer", "sys/footer"))
def send_editor(self, preview=None):
send_title(None, 'Edit ' + self.split_title(), msg_text=self.msg_text, msg_type=self.msg_type)