diff --git a/CherryPy.conf b/CherryPy.conf index 71dca29..3ce97e3 100644 --- a/CherryPy.conf +++ b/CherryPy.conf @@ -64,7 +64,7 @@ tools.gzip.on: True tools.gzip.mime_types: ['text/html', 'application/xhtml+xml', 'application/atom+xml'] tools.I18nTool.on: True -tools.I18nTool.default: 'en_US' +tools.I18nTool.default: 'en' tools.I18nTool.mo_dir: CherryPyApp.install_dir + '/i18n' tools.I18nTool.domain: 'messages' diff --git a/CoverPages.py b/CoverPages.py index 74e3e2e..3626962 100644 --- a/CoverPages.py +++ b/CoverPages.py @@ -39,7 +39,7 @@ class CoverPages (object): Cover Flow - +-->
""" @@ -69,6 +69,7 @@ class CoverPages (object): style="background-image: url({url})"> \n""".format ( url = url, href = href, title = title, size = size) + return (s + '
\n').encode ('utf-8') def index (self, count, size, order, **kwargs): diff --git a/HTMLFormatter.py b/HTMLFormatter.py index c5b506e..406a4be 100644 --- a/HTMLFormatter.py +++ b/HTMLFormatter.py @@ -129,9 +129,7 @@ class HTMLFormatter (XMLishFormatter): """ Produce HTML output. """ CONTENT_TYPE = 'text/html; charset=UTF-8' - DOCTYPE = ('html', - '-//W3C//DTD XHTML+RDFa 1.0//EN', - 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd') + DOCTYPE = 'html5' def __init__ (self): super (HTMLFormatter, self).__init__ () @@ -139,7 +137,7 @@ class HTMLFormatter (XMLishFormatter): def get_serializer (self): # return BaseFormatter.XHTMLSerializer (doctype = self.DOCTYPE, strip_whitespace = False) - return genshi.output.XHTMLSerializer (doctype = self.DOCTYPE, strip_whitespace = False) + return genshi.output.HTMLSerializer (doctype = self.DOCTYPE, strip_whitespace = False) def fix_dc (self, dc, os): @@ -195,16 +193,14 @@ class MobileFormatter (XMLishFormatter): """ Produce HTML output suitable for mobile devices. """ CONTENT_TYPE = mt.xhtml + '; charset=UTF-8' - DOCTYPE = ('html', - '-//WAPFORUM//DTD XHTML Mobile 1.2//EN', - 'http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd') + DOCTYPE = 'html5' def __init__ (self): super (MobileFormatter, self).__init__ () def get_serializer (self): - return genshi.output.XMLSerializer (doctype = self.DOCTYPE, strip_whitespace = False) + return genshi.output.HTMLSerializer (doctype = self.DOCTYPE, strip_whitespace = False) def fix_dc (self, dc, os): diff --git a/templates/bibrec.html b/templates/bibrec.html index aba350d..247da21 100644 --- a/templates/bibrec.html +++ b/templates/bibrec.html @@ -21,7 +21,7 @@ Gutenberg metadata much faster than by scraping. xmlns:marcrel="http://www.loc.gov/loc.terms/relators/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xml:lang="${os.lang}" - version="XHTML+RDFa 1.0"> +> - + ${site_head ()} @@ -63,7 +62,7 @@ Gutenberg metadata much faster than by scraping. - @@ -149,7 +148,7 @@ ${site_top()}

Bibliographic Record ${help (_('Table: Bibliographic Record'))}

- +
@@ -245,7 +244,7 @@ ${site_top()} - +
Price$0.00$0.00
@@ -289,14 +288,15 @@ ${site_top()} -
+

Download This eBook

- +
- + + @@ -320,8 +320,7 @@ ${site_top()}
${file_.hr_filetype} ${file_.url} - + xml:lang="${os.lang}"> - + ${site_head ()} ${os.title} - ${os.pg} diff --git a/templates/site-layout.html b/templates/site-layout.html index c00d42e..ea3f345 100644 --- a/templates/site-layout.html +++ b/templates/site-layout.html @@ -1,126 +1,210 @@ - - - - + + + + - - - - - + - - - +