Improved look
This commit is contained in:
@@ -26,11 +26,10 @@ TODO:
|
||||
Replace send_file with something that loads headers and nav templates
|
||||
Search phrase alias dictionary
|
||||
Response Bible book reading
|
||||
*Forward and Backward Navigation ** add to rich responses
|
||||
Pretty navigation bar
|
||||
Search highlighting
|
||||
Styles
|
||||
Bible Reading Plan
|
||||
Bible Reader
|
||||
/seq Going backwards (works but is buggy, disabled for now)
|
||||
/seq Wrap back to Gen 1:1 when you reach the end of Rev
|
||||
/seq Querying what your UID's next verse is going to be
|
||||
@@ -56,7 +55,6 @@ cached = {
|
||||
}
|
||||
|
||||
# Fill the chapter list with unique chapters for seeking back and forward by index.
|
||||
#TODO Fix string-based..? sorting problem
|
||||
[
|
||||
cached["chapter_list"].append(int(str(chap)[:-3]))
|
||||
for chap in cached.get("verse_ids")
|
||||
@@ -131,6 +129,9 @@ def get_next_prev_chapter(verseid):
|
||||
next_chapter_id = str(cached["chapter_list"][(current_chapter_index + 1) % len(cached["chapter_list"])])
|
||||
#prev_chapter_id = str(cached["chapter_list"][current_chapter_index - 1])
|
||||
prev_chapter_id = str(cached["chapter_list"][(current_chapter_index - 1) % len(cached["chapter_list"])])
|
||||
current_chapter_name = " ".join(
|
||||
(lookup_bookname(current_chapter[:-3]), str(current_chapter[-3:]).lstrip("0"))
|
||||
)
|
||||
next_chapter_name = " ".join(
|
||||
(lookup_bookname(next_chapter_id[:-3]), str(next_chapter_id[-3:]).lstrip("0"))
|
||||
)
|
||||
@@ -140,6 +141,7 @@ def get_next_prev_chapter(verseid):
|
||||
next_chapter_link = f"/show?kw={next_chapter_name}&view=rich"
|
||||
prev_chapter_link = f"/show?kw={prev_chapter_name}&view=rich"
|
||||
result = {
|
||||
"current_chapter_name": current_chapter_name,
|
||||
"prev_chapter_name": prev_chapter_name,
|
||||
"prev_chapter_link": prev_chapter_link,
|
||||
"next_chapter_name": next_chapter_name,
|
||||
@@ -220,7 +222,7 @@ def parse_query():
|
||||
return result
|
||||
result = "<!DOCTYPE html>"
|
||||
result += "<style>" + cached["css_collapsible"] + "</style>"
|
||||
result += "<h3>1828 Webster Definitions</h3>"
|
||||
result += "<h3>1828 Webster Definitions</h3> Click on the word to get the definition."
|
||||
split_query = query.replace(",", " ").split(" ")
|
||||
if len(split_query) > 20:
|
||||
return "Your Query is too long. 20 Words or less."
|
||||
@@ -407,6 +409,7 @@ def response_single(scripture):
|
||||
return (
|
||||
cached["html_navbar"].format(
|
||||
query=request.args.get("kw", ""),
|
||||
current_chapter_name=l_r_nav["current_chapter_name"],
|
||||
next_chapter_name=l_r_nav["next_chapter_name"],
|
||||
next_chapter_link=l_r_nav["next_chapter_link"],
|
||||
prev_chapter_name=l_r_nav["prev_chapter_name"],
|
||||
@@ -437,6 +440,7 @@ def response_multi(scriptures):
|
||||
response.append(
|
||||
cached["html_navbar"].format(
|
||||
query=request.args.get("kw", ""),
|
||||
current_chapter_name=l_r_nav["current_chapter_name"],
|
||||
next_chapter_name=l_r_nav["next_chapter_name"],
|
||||
next_chapter_link=l_r_nav["next_chapter_link"],
|
||||
prev_chapter_name=l_r_nav["prev_chapter_name"],
|
||||
|
||||
Reference in New Issue
Block a user