Verse chapter linking

This commit is contained in:
2023-01-21 01:46:58 -08:00
parent 98768d9399
commit f629835961
4 changed files with 25 additions and 11 deletions
+12 -3
View File
@@ -18,6 +18,9 @@ Search highlighting
Styles
Bible Reading Plan
Bible Reader
Rich: <hr> on each comma
find: handle ending with :
find: handle ending with ,
"""
@@ -259,9 +262,10 @@ def return_dict_rich(ref, defs):
response = ""
for e in defs:
response += e + "<br><br>"
# return (header.read() + response_html.read().format(passage = ref.capitalize(), text = response) + css.read())
return (
response_html.read().format(passage=ref.capitalize(), text=response)
response_html.read().format(
chapter=ref.split(":")[0], passage=ref.capitalize(), text=response
)
+ css.read()
)
@@ -353,7 +357,12 @@ def response_rich(scripture):
verse = str(scripture[idx_verse])
text = str(scripture[idx_text])
passage = bookname + " " + chapter + ":" + verse
return response_html.read().format(passage=passage, text=text) + css.read()
return (
response_html.read().format(
chapter=passage.split(":")[0], passage=passage, text=text
)
+ css.read()
)
def response_single(scripture):
+1 -6
View File
@@ -17,12 +17,7 @@ html{
<form action="/find">
<label for='kw'>Query</label><br>
<input type="text" name="kw"><br><br>
<label for='view'>View<label><br>
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
<input type="radio" name="view" value="plain">Plain<br>
<input type="radio" name="view" value="json">JSON<br>
<input type="hidden" name="view" value="rich"">
<input type="submit">
<form>
+9 -2
View File
@@ -1,2 +1,9 @@
<h3>{passage}</h3>
<p>{text}</p>
<p>
<b>
<a href="/find?kw={chapter}&view=rich">
{passage}
</a>
</b>
<br>
{text}
</p>
+3
View File
@@ -3,5 +3,8 @@ html{
font-family: sans-serif;
font-size: 14pt;
width: 768px;
}
a {
color: #547720
}
</style>