Ejemplo n.º 1
0
    def __init__(self, title):
        """ Construct Main Header tag. """
        super(MainHeader, self).__init__()
        self.append_class(self.MAIN_HEADER_CLASS)

        # insert to separate text from background
        titleContainer = Div()
        titleContainer.set_text(title)

        self.append_child(titleContainer)
Ejemplo n.º 2
0
    def __init__(self, headings):
        """ Constuct a list header. """
        super(ListHeader, self).__init__()
        self.append_class(self.LIST_HEADER_CLASS)
        self.append_class(HEADED_LIST_ITEM_CLASS)

        for h in headings:
            col_head = Div()
            col_head.set_text(h)
            col_head.append_class(LIST_COLUMN_CLASS)
            self.append_child(col_head)