mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix tags markup in catalog
This commit is contained in:
parent
4153a4e647
commit
ab10ac42ba
@ -1,3 +1,5 @@
|
|||||||
|
body { background-color: white; }
|
||||||
|
|
||||||
p.title {
|
p.title {
|
||||||
margin-top:0em;
|
margin-top:0em;
|
||||||
margin-bottom:1em;
|
margin-bottom:1em;
|
||||||
|
@ -178,7 +178,7 @@ class Document(QWebPage):
|
|||||||
|
|
||||||
def set_user_stylesheet(self):
|
def set_user_stylesheet(self):
|
||||||
raw = config().parse().user_css
|
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 = 'data:text/css;charset=utf-8;base64,'
|
||||||
data += b64encode(raw.encode('utf-8'))
|
data += b64encode(raw.encode('utf-8'))
|
||||||
self.settings().setUserStyleSheetUrl(QUrl(data))
|
self.settings().setUserStyleSheetUrl(QUrl(data))
|
||||||
|
@ -938,6 +938,8 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
# Insert a spacer to match the author indent
|
# Insert a spacer to match the author indent
|
||||||
fontTag = Tag(soup,"font")
|
fontTag = Tag(soup,"font")
|
||||||
fontTag['style'] = 'color:white;font-size:large'
|
fontTag['style'] = 'color:white;font-size:large'
|
||||||
|
if self.opts.fmt == 'epub':
|
||||||
|
fontTag['style'] += ';opacity: 0.0'
|
||||||
fontTag.insert(0, NavigableString("by "))
|
fontTag.insert(0, NavigableString("by "))
|
||||||
tagsTag.insert(ttc, fontTag)
|
tagsTag.insert(ttc, fontTag)
|
||||||
ttc += 1
|
ttc += 1
|
||||||
@ -948,6 +950,8 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
aTag.insert(0,escape(NavigableString(tag)))
|
aTag.insert(0,escape(NavigableString(tag)))
|
||||||
emTag = Tag(soup, "em")
|
emTag = Tag(soup, "em")
|
||||||
emTag.insert(0, aTag)
|
emTag.insert(0, aTag)
|
||||||
|
if ttc < len(title['tags']):
|
||||||
|
emTag.insert(1, NavigableString(', '))
|
||||||
tagsTag.insert(ttc, emTag)
|
tagsTag.insert(ttc, emTag)
|
||||||
ttc += 1
|
ttc += 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user