From 4385f52efc91cd716a07a8a311da3e7db5bddb1a Mon Sep 17 00:00:00 2001 From: Taka Date: Tue, 26 May 2020 13:04:05 +0000 Subject: [PATCH] Added styling for footnotes in Chapter H content. --- .../webapp/data/default-template-pack/ob_vo_note.css | 3 ++- vasl_templates/webapp/vo_notes.py | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/vasl_templates/webapp/data/default-template-pack/ob_vo_note.css b/vasl_templates/webapp/data/default-template-pack/ob_vo_note.css index 0d12d87..5f741b6 100644 --- a/vasl_templates/webapp/data/default-template-pack/ob_vo_note.css +++ b/vasl_templates/webapp/data/default-template-pack/ob_vo_note.css @@ -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% ; } diff --git a/vasl_templates/webapp/vo_notes.py b/vasl_templates/webapp/vo_notes.py index a441530..b2efb55 100644 --- a/vasl_templates/webapp/vo_notes.py +++ b/vasl_templates/webapp/vo_notes.py @@ -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 "

†". We detect these and add a CSS class. + # Larger blocks of content need to be wrapped in a

. + html_content = re.sub( r"^<(p|div)> †", r"<\1 class='dagger-note'> †", + html_content, + flags=re.MULTILINE + ) + # check if the content is specifying its own layout if "" not in html_content: # nope - use the default one