Added styling for footnotes in Chapter H content.

master
Pacman Ghost 4 years ago
parent 92e727f182
commit 4385f52efc
  1. 3
      vasl_templates/webapp/data/default-template-pack/ob_vo_note.css
  2. 8
      vasl_templates/webapp/vo_notes.py

@ -9,7 +9,8 @@ img.piece { float: left ; margin-right: 0.5em ; }
.content { text-align: justify ; }
.content li { margin-bottom: 2px ; }
.content .example { font-size: 90% ; font-style: italic ; }
.content .rf { font-style: italic ; color: #444 ; }
.content .dagger-note { font-size:95% ; font-style: italic ; color: #404040 ; }
.content .rf { font-size: 95% ; font-style: italic ; color: #404040 ; }
.content .lfloat { float: left ; margin-right: 0.5em ; }
.content .rfloat { float: right ; margin-left: 0.5em ; }
.content table { margin: 0 10px 0 10px ; margin-top: 0.5em ; font-size: 95% ; }

@ -145,6 +145,14 @@ def load_vo_notes( msg_store ): #pylint: disable=too-many-statements,too-many-lo
key = get_ma_note_key( nat2, os.path.split(fname)[1] )
if re.search( r"^\d+(\.\d+)?$", key ):
# FUDGE! The HTML version of the Chapter H content contain a lot of notes
# that start with "<p> &dagger;". We detect these and add a CSS class.
# Larger blocks of content need to be wrapped in a <div>.
html_content = re.sub( r"^<(p|div)> &dagger;", r"<\1 class='dagger-note'> &dagger;",
html_content,
flags=re.MULTILINE
)
# check if the content is specifying its own layout
if "<!-- vasl-templates:manual-layout -->" not in html_content:
# nope - use the default one

Loading…
Cancel
Save