From 445da31691d340ff68974a15d135037c6d4c61f2 Mon Sep 17 00:00:00 2001 From: Kees Bakker Date: Wed, 16 Jul 2008 07:59:29 +0000 Subject: [PATCH] Update from Rob Healey and Jason Simanek: new stylesheets and some (small?) changes in the generated HTML. (( Not fully tested, please give it a try )) * src/plugins/NarrativeWeb.py svn: r10869 --- src/plugins/NarrativeWeb.py | 156 ++++++++++++++++++++---------------- 1 file changed, 88 insertions(+), 68 deletions(-) diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index c65d6d601..fed29b0b7 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -114,13 +114,9 @@ _XOFFSET = 5 # stylesheets. _CSS_FILES = [ # First is used as default selection. - [_("Basic - Ash"), 'NWeb-Screen_Basic-Ash.css'], - [_("Basic - Cypress"), 'NWeb-Screen_Basic-Cypress.css'], - [_("Basic - Lilac"), 'NWeb-Screen_Basic-Lilac.css'], - [_("Basic - Peach"), 'NWeb-Screen_Basic-Peach.css'], - [_("Basic - Spruce"), 'NWeb-Screen_Basic-Spruce.css'], - [_("Mainz"), 'NWeb-Screen_Mainz.css'], - [_("Nebraska"), 'NWeb-Screen_Nebraska.css'], + [_("Evergreen"), 'Web_Evergreen.css'], + [_("Nebraska"), 'Web_Nebraska.css'], + [_("Simply Red"), 'Web_Simply-Red.css'], [_("No style sheet"), ''], ] @@ -149,32 +145,32 @@ _CC = [ '' 'Creative Commons License - By attribution', + 'src="%(gif_fname)s" />', '' 'Creative Commons License - By attribution, No derivations', + 'src="%(gif_fname)s" />', '' 'Creative Commons License - By attribution, Share-alike', + 'src="%(gif_fname)s" />', '' 'Creative Commons License - By attribution, Non-commercial', + 'src="%(gif_fname)s" />', '' 'Creative Commons License - By attribution, Non-commercial, No derivations', + 'src="%(gif_fname)s" />', '' 'Creative Commons License - By attribution, Non-commerical, Share-alike' + 'src="%(gif_fname)s" />' ] _COPY_OPTIONS = [ @@ -285,28 +281,34 @@ class BasePage: of.write('

\n') of.write('\t\n') - copyright = self.report.copyright - if copyright == 0: - of.write('\t\n') - elif copyright <= 6: - of.write('\t\n') + of.write('

\n') + + of.write('\t

') + of.write('

\n') of.write('\t\t
\n') of.write('\n') @@ -329,14 +331,25 @@ class BasePage: of.write(' %s - %s\n' % (html_escape(self.title_str), html_escape(title))) of.write(' \n' % self.report.encoding) + of.write(' \n') + of.write(' \n') + author = get_researcher().get_name() + if author: + author = author.replace(',,,', '') + of.write(' \n' % author) # Link to narrative.css - url = self.report.build_url_fname(_NARRATIVESCREEN, None, self.up) - of.write(' \n' % url) + fname = os.path.join("styles", _NARRATIVESCREEN) + url = self.report.build_url_fname(fname, None, self.up) + of.write(' \n' % url) # Link to narrativePrint.css - url = self.report.build_url_fname(_NARRATIVEPRINT, None, self.up) - of.write(' \n' % url) + fname = os.path.join("styles", _NARRATIVEPRINT) + url = self.report.build_url_fname(fname, None, self.up) + of.write(' \n' % url) # Link to favicon.ico url = self.report.build_url_image('favicon.ico', 'images', self.up) @@ -344,14 +357,11 @@ class BasePage: of.write(' \n' % ('$', '$')) of.write('\n\n') - of.write('\n') # Terminated in write_footer() + of.write('\n') # Terminated in write_footer() + of.write('