More chord-table stuff..

This commit is contained in:
Tomas Groth 2017-01-29 22:25:52 +01:00
parent c3a953ce1b
commit dda37552d1
4 changed files with 9 additions and 32 deletions

View File

@ -292,7 +292,7 @@ def clean_tags(text, remove_chords=False):
"""
text = text.replace('<br>', '\n')
text = text.replace('{br}', '\n')
#text = text.replace('&nbsp;', ' ')
text = text.replace('&nbsp;', ' ')
for tag in FormattingTags.get_html_tags():
text = text.replace(tag['start tag'], '')
text = text.replace(tag['end tag'], '')
@ -410,7 +410,8 @@ def expand_chords(text):
new_line += line
new_line += '</td></tr></table>'
expanded_text_lines.append(new_line)
return '{br}'.join(expanded_text_lines)
# the {br} tag used to split lines is not inserted again since the line-tables style make them redundant.
return ''.join(expanded_text_lines)
def create_separated_list(string_list):

View File

@ -263,7 +263,7 @@ class ServiceItem(RegistryProperties):
new_frame = {
'title': clean_tags(page),
'text': clean_tags(page.rstrip(), True),
'chords_text': clean_tags(expand_chords(page.rstrip()), False),
'chords_text': expand_chords(clean_tags(page.rstrip(), False)),
'html': html_data.replace('&amp;nbsp;', '&nbsp;'),
'verseTag': verse_tag,
}

View File

@ -60,33 +60,7 @@
vertical-align: middle;
}
.chordline {
line-height: 2.0;
}
.chordline1 {
line-height: 1.0
}
.firstchordline {
line-height: 2.1em;
}
.chordline span.chord span {
position: relative;
}
.chordline span.chord span strong {
position: absolute;
top: -0.8em;
left: 0;
font-size: 30pt;
font-weight: normal;
line-height: normal;
color: yellow;
}
#nextslide .chordline span.chord span strong {
#nextslide td.note {
color: gray;
}
@ -96,6 +70,9 @@ table.segment {
float: left;
}
td.note {}
td.note {
font-size: 30pt;
color: yellow;
}
td.lyrics {}

View File

@ -265,7 +265,6 @@ window.OpenLP = {
text = "<p class=\"nextslide\">" + $("#next-text").val() + ": " + OpenLP.nextSong + "</p>";
$("#nextslide").html(text);
}
if(!OpenLP.showchords) $(".chordline").toggleClass('chordline1');
},
updateClock: function(data) {
var div = $("#clock");