Yay! Full navbar on all pages

This commit is contained in:
James Vega 2003-11-21 04:50:28 +00:00
parent e3b09746c0
commit c283ca73de

View File

@ -64,28 +64,40 @@ def genHeader(title, meta=''):
<body><div> <body><div>
''' % (title, meta) ''' % (title, meta)
def genNavbar(path): def genNavbar(path, cActive=True):
download = 'http://sourceforge.net/project/showfiles.php?group_id=58965' download = 'http://sourceforge.net/project/showfiles.php?group_id=58965'
bug = 'http://sourceforge.net/tracker/?func=add&amp;group_id=58965&amp;'\ bug = 'http://sourceforge.net/tracker/?func=add&amp;group_id=58965&amp;'\
'atid=489447' 'atid=489447'
if cActive:
command = '<li>\n<a href="%scommands.html">Commands Index</a>\n</li>'\
% path[3:]
else:
command = '<li class="plain">\nCommands Index\n</li>'
return ''' return '''
<div id="nav"> <div id="nav">
<div> <ul>
<a href="%s">Home Page</a> <li>
</div> <a href="%s">Home</a>
<div> </li>
<li>
<a href="http://sourceforge.net/projects/supybot/">Sourceforge Project</a>
</li>
<li>
<a href="%s"> <a href="%s">
Download Download
</a> </a>
</div> </li>
<div> <li>
<a <a
href="%s"> href="%s">
Submit a Bug Submit a Bug
</a> </a>
</div> </li>
%s
</ul>
<p style="clear:both; margin:0; padding:0;"></p>
</div> </div>
''' % (path, download, bug) ''' % (path, download, bug, command)
def genFooter(): def genFooter():
return ''' return '''
@ -116,7 +128,7 @@ def prepIndex():
%s %s
<div class="maintitle">Supybot Plugin Documentation Index</div> <div class="maintitle">Supybot Plugin Documentation Index</div>
%s %s
<div class="whitebox"> <div class="mainbody">
''' % (genHeader('Supybot Plugin Documentation'), genNavbar('../')))) ''' % (genHeader('Supybot Plugin Documentation'), genNavbar('../'))))
fd.close() fd.close()
@ -153,6 +165,7 @@ def makePluginDocumentation(pluginWindow):
%s %s
<div class="plugintitle">%s</div> <div class="plugintitle">%s</div>
%s %s
<div class="mainbody" style="padding: 0;">
<table> <table>
<tr id="headers"><td>Command</td><td>Args</td><td> <tr id="headers"><td>Command</td><td>Args</td><td>
Detailed Help</td></tr> Detailed Help</td></tr>
@ -188,11 +201,12 @@ def makePluginDocumentation(pluginWindow):
fd.write('</table>\n') fd.write('</table>\n')
fd.write(textwrap.dedent(''' fd.write(textwrap.dedent('''
</div> </div>
</div>
<div style="text-align: center;"> <div style="text-align: center;">
<br /> <br />
<a href="%s.html">&lt;- %s</a> | <a href="%s.html">&lt;- %s</a> |
<a href="../plugins.html">Plugin Index</a> | <a href="../plugins.html">Plugins Index</a> |
<a href="../commands.html">Command Index</a> | <a href="../commands.html">Commands Index</a> |
<a href="%s.html">%s -&gt;</a> <a href="%s.html">%s -&gt;</a>
%s %s
''' % (prev, cprev, next, cnext, genFooter()))) ''' % (prev, cprev, next, cnext, genFooter())))
@ -220,8 +234,10 @@ def makeCommandsIndex():
%s %s
<div class="maintitle">%s</div> <div class="maintitle">%s</div>
%s %s
<div class="whitebox" style="text-align: center;"> <div class="mainbody" style="text-align: center;">
''' % (genHeader(title), title, genNavbar('../')))) ''' % (genHeader(title),
title,
genNavbar('../', cActive=False))))
commands = [c for c in commandDict.iterkeys()] commands = [c for c in commandDict.iterkeys()]
commands.sort() commands.sort()
for i in ascii_lowercase: for i in ascii_lowercase: