From: Fred L. D. Jr. <fd...@us...> - 2004-04-08 05:58:54
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25358 Added Files: DocsPDOGenerator.py Log Message: simple style for docs.python.org --- NEW FILE: DocsPDOGenerator.py --- """Generate the docs.python.org website style. This mostly inherits from PDOGenerator, but changes a few of the links and default values. """ from PDOGenerator import PDOGenerator class DocsPDOGenerator(PDOGenerator): AUTHOR = 'do...@py...' sitelinks = [ ('http://www.python.org/', 'Python Home'), ('%(rootdir)s/download.html', 'Download'), ('%(rootdir)s/', 'Documentation'), ] def __init__(self, file, rootdir, relthis): PDOGenerator.__init__(self, file, rootdir, relthis) self._Banner__cols = 2 def get_banner(self): banner = PDOGenerator.get_banner(self) searchbox = SEARCHBOX % self.get_lightshade() banner = banner.replace("</tr>", searchbox + "</tr>", 1) return banner # %-substitutions will be performed on this string SEARCHBOX = ''' <td rowspan="2" id="search" align="right" width="30%%" style="padding: 5pt; vertical-align: middle;" bgcolor="%s"> <form method="get" action="http://www.google.com/search"> Search: <input id="q" name="q" size="30" value=""> <input type="hidden" id="domains" name="domains" value="docs.python.org"> <input type="hidden" id="sitesearch" name="sitesearch" value="docs.python.org"> <input type="hidden" id="sourceid" name="sourceid" value="google-search"> <input type="submit" id="submit" name="submit" value="submit"> </form> </td>''' |