Fix tags markup in catalog

This commit is contained in:
Kovid Goyal 2010-01-22 15:57:24 -07:00
parent 4153a4e647
commit ab10ac42ba
3 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,5 @@
body { background-color: white; }
p.title {
margin-top:0em;
margin-bottom:1em;

View File

@ -178,7 +178,7 @@ class Document(QWebPage):
def set_user_stylesheet(self):
raw = config().parse().user_css
raw = '::selection {background:#ffff00; color:#000;}\n'+raw
raw = '::selection {background:#ffff00; color:#000;}\nbody {background-color: white;}\n'+raw
data = 'data:text/css;charset=utf-8;base64,'
data += b64encode(raw.encode('utf-8'))
self.settings().setUserStyleSheetUrl(QUrl(data))

View File

@ -938,6 +938,8 @@ class EPUB_MOBI(CatalogPlugin):
# Insert a spacer to match the author indent
fontTag = Tag(soup,"font")
fontTag['style'] = 'color:white;font-size:large'
if self.opts.fmt == 'epub':
fontTag['style'] += ';opacity: 0.0'
fontTag.insert(0, NavigableString("by "))
tagsTag.insert(ttc, fontTag)
ttc += 1
@ -948,6 +950,8 @@ class EPUB_MOBI(CatalogPlugin):
aTag.insert(0,escape(NavigableString(tag)))
emTag = Tag(soup, "em")
emTag.insert(0, aTag)
if ttc < len(title['tags']):
emTag.insert(1, NavigableString(', '))
tagsTag.insert(ttc, emTag)
ttc += 1