diff --git a/app.py b/app.py index 77fcc4f..527592b 100644 --- a/app.py +++ b/app.py @@ -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 = "" result += "" - result += "

1828 Webster Definitions

" + result += "

1828 Webster Definitions

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"], diff --git a/html/navbar.html b/html/navbar.html index 71c6ffd..9a5ceef 100644 --- a/html/navbar.html +++ b/html/navbar.html @@ -1,14 +1,20 @@ +
+ Home | Quick Search | + Random Verse | + Verse of the Day +
+ \ No newline at end of file diff --git a/html/response.html b/html/response.html index 854a404..be6de6d 100644 --- a/html/response.html +++ b/html/response.html @@ -1 +1 @@ -

{passage}
{text}

+{passage}
{text}
diff --git a/styles/header.css b/styles/header.css index cff94e4..9774f1d 100644 --- a/styles/header.css +++ b/styles/header.css @@ -1,11 +1,39 @@