diff --git a/app.py b/app.py
index 826db4c..ba59a97 100644
--- a/app.py
+++ b/app.py
@@ -178,12 +178,13 @@ def return_dict_plain(ref, defs):
return ref.capitalize() + "
" + response
def return_dict_rich(ref, defs):
+ header = open('html/header.html', 'r')
css = open('styles/human_readable.css', 'r')
response_html = open('html/response.html', 'r')
response = ''
for e in defs:
response += e + "
"
- return (response_html.read().format(passage = ref.capitalize(), text = response) + css.read())
+ return (header.read() + response_html.read().format(passage = ref.capitalize(), text = response) + css.read())
@app.get("/show")
def show():
@@ -276,7 +277,8 @@ def response_single(scripture):
if arg_view == "plain":
return(response_text(scripture))
elif arg_view == "rich":
- return(response_rich(scripture))
+ header = open('html/header.html', 'r')
+ return(header.read() + response_rich(scripture))
else:
response = response_dict(scripture)
return jsonify(response)
@@ -289,6 +291,7 @@ def response_multi(scriptures):
for scripture in scriptures:
response.append(response_text(scripture))
elif arg_view == "rich":
+ response.append(open('html/header.html', 'r').read())
for scripture in scriptures:
response.append(response_rich(scripture))
else:
diff --git a/html/header.html b/html/header.html
new file mode 100644
index 0000000..428dc70
--- /dev/null
+++ b/html/header.html
@@ -0,0 +1,9 @@
+
+