return False
for msg in subset:
headlines.add_item(msg)
+ headlines.set_custom_html("""
+<STYLE>
+a:link {
+ color: maroon;
+ text-decoration: none;
+ font-weight: bold;
+}
+a:visited {
+ color: maroon;
+ text-decoration: none;
+ font-weight: bold;
+}
+a:active {
+ color: maroon;
+ text-decoration: none;
+ font-weight: bold;
+}
+</STYLE>""")
f = file_writer.file_writer('%s_4_none.html' % (
self.get_headlines_page_prefix()))
headlines.render_html(f)
details = page_builder.page_builder()
details.set_layout(page_builder.page_builder.LAYOUT_ONE_ITEM)
+ details.set_custom_html("""
+<STYLE>
+a:link {
+ color: maroon;
+ text-decoration: none;
+ font-weight: bold;
+}
+a:visited {
+ color: maroon;
+ text-decoration: none;
+ font-weight: bold;
+}
+a:active {
+ color: maroon;
+ text-decoration: none;
+ font-weight: bold;
+}
+</STYLE>""")
details.set_title("%s" % self.page_title)
subset = self.details.subset(1)
if subset is None:
self.layout = page_builder.LAYOUT_AUTO
self.items = []
self.debug_info = None
+ self.custom_html = None
def set_layout(self, layout):
self.layout = layout
else:
self.layout = page_builder.LAYOUT_MANY_ITEMS
+ def __render_custom_html(self, f):
+ if self.custom_html is not None:
+ f.write(self.custom_html)
+
def __render_header(self, f):
if self.title is not None:
f.write("<H1>%s</H1>\n" % self.title)
def render_html(self, f):
if self.layout == page_builder.LAYOUT_AUTO or self.layout is None:
self.__pick_layout()
-
+ self.__render_custom_html(f)
self.__render_header(f)
items_per_row = None
count += 1
if count % items_per_row == 0:
f.write("</TR>\n<TR>\n")
-
self.__render_footer(f)
+ def set_custom_html(self, html):
+ self.custom_html = html
+
#x = page_builder()
#x.set_title("title").add_item("item1").add_item("item2").add_item("item3").render_html(sys.stdout)