def as_html(self): #print "Cover.as_html:", self.get_id() x = XHTMLFile(title='Cover', stylesheet_path='style/stylesheet.css') h = x.get_header() h += ' <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"\n' h += ' width="100%%" height="100%%" viewBox="0 0 %s %s" preserveAspectRatio="xMidYMid meet">\n' % (self.width, self.height) h += ' <image width="%s" height="%s" xlink:href="%s" />\n' % (self.width, self.height, self.uri) h += ' </svg>\n' h += x.get_footer() return h
def as_html(self): #print "Chapter.as_html:", self.get_id() x = XHTMLFile(title=self.title, stylesheet_path='style/stylesheet.css') h = x.get_header() h += ' <h1>%s</h1>\n' % self.title for i in range(len(self.sections)): s = self.sections[i] h += s.as_html() h += x.get_footer() return h