Colour and poss blank verse fix?

This commit is contained in:
Jonathan Corwin 2010-09-03 19:30:56 +01:00
parent 8be66a0e6f
commit e292748b83
2 changed files with 27 additions and 25 deletions

View File

@ -39,40 +39,40 @@ log = logging.getLogger(__name__)
html_expands = [] html_expands = []
html_expands.append({u'desc':u'Red', u'start tag':u'{r}', \ html_expands.append({u'desc':u'Red', u'start tag':u'{r}', \
u'start html':u'<font color=red>', \ u'start html':u'<span style="-webkit-text-fill-color:red">', \
u'end tag':u'{/r}', u'end html':u'</font>', \ u'end tag':u'{/r}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Black', u'start tag':u'{b}', \ html_expands.append({u'desc':u'Black', u'start tag':u'{b}', \
u'start html':u'<font color=black>', \ u'start html':u'<span style="-webkit-text-fill-color:black">', \
u'end tag':u'{/b}', u'end html':u'</font>', \ u'end tag':u'{/b}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Blue', u'start tag':u'{bl}', \ html_expands.append({u'desc':u'Blue', u'start tag':u'{bl}', \
u'start html':u'<font color=blue>', \ u'start html':u'<span style="-webkit-text-fill-color:blue">', \
u'end tag':u'{/bl}', u'end html':u'</font>', \ u'end tag':u'{/bl}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Yellow', u'start tag':u'{y}', \ html_expands.append({u'desc':u'Yellow', u'start tag':u'{y}', \
u'start html':u'<font color=yellow>', \ u'start html':u'<span style="-webkit-text-fill-color:yellow">', \
u'end tag':u'{/y}', u'end html':u'</font>', \ u'end tag':u'{/y}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Green', u'start tag':u'{g}', \ html_expands.append({u'desc':u'Green', u'start tag':u'{g}', \
u'start html':u'<font color=green>', \ u'start html':u'<span style="-webkit-text-fill-color:green">', \
u'end tag':u'{/g}', u'end html':u'</font>', \ u'end tag':u'{/g}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Pink', u'start tag':u'{pk}', \ html_expands.append({u'desc':u'Pink', u'start tag':u'{pk}', \
u'start html':u'<font color=#CC33CC>', \ u'start html':u'<span style="-webkit-text-fill-color:#CC33CC">', \
u'end tag':u'{/pk}', u'end html':u'</font>', \ u'end tag':u'{/pk}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Orange', u'start tag':u'{o}', \ html_expands.append({u'desc':u'Orange', u'start tag':u'{o}', \
u'start html':u'<font color=#CC0033>', \ u'start html':u'<span style="-webkit-text-fill-color:#CC0033">', \
u'end tag':u'{/o}', u'end html':u'</font>', \ u'end tag':u'{/o}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Purple', u'start tag':u'{pp}', \ html_expands.append({u'desc':u'Purple', u'start tag':u'{pp}', \
u'start html':u'<font color=#9900FF>', \ u'start html':u'<span style="-webkit-text-fill-color:#9900FF">', \
u'end tag':u'{/pp}', u'end html':u'</font>', \ u'end tag':u'{/pp}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'White', u'start tag':u'{w}', \ html_expands.append({u'desc':u'White', u'start tag':u'{w}', \
u'start html':u'<font color=white>', \ u'start html':u'<span style="-webkit-text-fill-color:white">', \
u'end tag':u'{/w}', u'end html':u'</font>', \ u'end tag':u'{/w}', u'end html':u'</span>', \
u'protected':False}) u'protected':False})
html_expands.append({u'desc':u'Superscript', u'start tag':u'{su}', \ html_expands.append({u'desc':u'Superscript', u'start tag':u'{su}', \
u'start html':u'<sup>', \ u'start html':u'<sup>', \

View File

@ -217,11 +217,12 @@ body {
text.innerHTML = newtext; text.innerHTML = newtext;
return; return;
} }
if(text.style.opacity=='') text.style.opacity = 1;
if(newtext==text.innerHTML){ if(newtext==text.innerHTML){
text.style.opacity = parseFloat(text.style.opacity) + 0.3; text.style.opacity = parseFloat(text.style.opacity) + 0.3;
if(text.style.opacity>0.7)
text.style.opacity = 1;
} else { } else {
text.style.opacity -= 0.3; text.style.opacity = parseFloat(text.style.opacity) - 0.3;
if(text.style.opacity<=0.1){ if(text.style.opacity<=0.1){
text.innerHTML = newtext; text.innerHTML = newtext;
} }
@ -400,14 +401,15 @@ def build_lyrics_html(item, webkitvers):
theme = item.themedata theme = item.themedata
if webkitvers < 534.4 and theme and theme.display_outline: if webkitvers < 534.4 and theme and theme.display_outline:
lyrics += u'<div class="lyricstable">' \ lyrics += u'<div class="lyricstable">' \
u'<div id="lyricsshadow" class="lyricscell lyricsshadow">' \ u'<div id="lyricsshadow" style="opacity:1" ' \
u'</div></div>' u'class="lyricscell lyricsshadow"></div></div>'
if webkitvers < 533.3: if webkitvers < 533.3:
lyrics += u'<div class="lyricstable">' \ lyrics += u'<div class="lyricstable">' \
u'<div id="lyricsoutline" class="lyricscell lyricsoutline">' \ u'<div id="lyricsoutline" style="opacity:1" ' \
u'</div></div>' u'class="lyricscell lyricsoutline"></div></div>'
lyrics += u'<div class="lyricstable">' \ lyrics += u'<div class="lyricstable">' \
u'<div id="lyricsmain" class="lyricscell lyricsmain"></div></div>' u'<div id="lyricsmain" style="opacity:1" ' \
u'class="lyricscell lyricsmain"></div></div>'
return lyrics return lyrics
def build_footer_css(item): def build_footer_css(item):