CVS: ht2html DocsPDOGenerator.py,NONE,1.1

"Fred L. Drake, Jr." <[email protected]> Wed, 07 Apr 2004 22:45:51 -0700
Newsgroups gmane.comp.web.ht2html.devel
Message-ID <[email protected]>
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 = '[email protected]'

    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>'''



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click