recently added:

ABC music

links (this site):

home
email me
show source

links (other sites):

buienradar
python

Hippos Technical Systems BV - Larry Myerscough


These pages contain information about my family, my company, my hobbies and myself.
hide surround


python source of 'phileas_project/myPage.py'

#!/usr/bin/python
# -*- encoding: utf8 -*-
from __future__ import print_function
import sys, os
from phileas import _html40 as h

from htdocs.page import Page, modulename2text, text2modulename, main

class OrderedPage(Page):
    _upperBanner = "Hippos Technical Systems BV - Larry Myerscough"
    upperBarColour = '#880000'
    _lowerBanner = "(dummy 'Lower banner')"
    lowerBarColour = '#000088'
    _synopsis = """dummy synopsis"""
    _detail = """dummy detail - this page is intended to be included, not displayed in itw own right!"""
    _rightPanel = """This Panel on the Right is used for local navigation
                    - not yet fully implemented as you can see!"""

    topLeftImage = "/.images/.thumbs/tn-Larry_2.jpg"
    centreImage = None
    columns = None
    homePage = "./index.py"
    modulename2text, text2modulename # not used within here: we import them so
                                     # our derived classes can esily use them.

    def synopsis(self, **kw):
        return self._synopsis

    def detail(self, **kw):
        return self._detail

    def rightPanel(self, **kw):
        return self._rightPanel

    def lowerBanner(self, **kw):
        return self._lowerBanner

    def upperBanner(self, **kw):
        return self._upperBanner

    def upperText(self, **kw):
        return (
            h.br,
""""This web-site came into being as a test-bed for the """,
            h.a(href='/phileas_project') | 'Phileas project',
            ". ",
            """

ile, of course, I'll try to keep all things working at all times,
the quality of some pages may leave a lot to be desired. In
particular, the current use of styling parameters is (visibly!)
inconsistent.
            """,
            2*h.br,
        )

    def colourBarBox(self, header, bgcolor, content):
        return (
            h.table(width="100%",cellpadding="0",
                            cellspacing="0")| (
                h.tr | (
                    h.th(bgcolor=bgcolor, valign="top") | (
                        h.font(color="#FFFFFF", size="2") | (h.h3 | header),
                    ),
                ),
                h.tr | (
                    h.td | content,
                ),
            )
        )

    def navBox(self, header, *items):
        return (
            h.table(width="100%",cellpadding="0",cellspacing="0") | (
                h.tr | (h.td | h.br*1),
                header and ( h.tr | ( h.th | (h.b | header))),
                h.tr | (h.td | h.br),
                [   h.tr |(h.td|(h.a(href=href)|text))
                    for text, href in items ],
            )
        )

    def leftPanel(self, **kw):
        return (
            h.table(cellpadding="0", width="100%", cellspacing="0") | (
                h.tr|(
                    h.td | h.img(src=self.topLeftImage, align="left"),
                ),
                h.tr|(
                    h.td|(
                        self.navBox( 
"recently added:",
    ('python course','/pythonCourse'),
                        ),
                        self.navBox( 
"links (this site):",
    ('home', self.homePage),
    ('email me',"mailto:l.myerscough@chello.nl?subject=(mailed using weblink on larry.myerscough.nl):"),
    ('photos','/photos'),
    ('my blog','/blog'),
    ('show source','/show_python_source.py?script_filename=%s'
        % os.path.relpath(sys.argv[0], self.topDir))
                        ),
                        self.navBox(
"links (other sites):",
    ('buienradar','http://www.buienradar.nl/'),
    ('python','http://python.org'),
                        ),
                    )
                )
            )
        )

    def lowerText(self, **kw):
        return (
            h | self.synopsis(**kw),
            h | self.detail(**kw)
        )
    
    def centrePanel(self, **kw):
        return (
            self.colourBarBox(h | self.upperBanner(**kw), self.upperBarColour,
                    h | self.upperText(**kw)),
            self.colourBarBox(h | self.lowerBanner(**kw), self.lowerBarColour,
                    h | self.lowerText(**kw)),
        )

    def body(self, **kw):
        return h.table(width="100%") | (
            h.tr | (
                h.td(width='15%', valign='top',
                               bgcolor='#a0a0e0') | (h | self.leftPanel(**kw)),
                h.td(width='70%', align='center',
                                  valign='top')   | (h | self.centrePanel(**kw)),
                h.td(width='15%', valign='top',
                               bgcolor='#80e080') | (h | self.rightPanel(**kw)),
            )
        )
if __name__=="__main__":
    main(OrderedPage)
This Panel on the Right is used for local navigation - not yet fully implemented as you can see!