/show landing page; default result selection
This commit is contained in:
@@ -11,6 +11,9 @@ DEBUG = 0
|
||||
"""
|
||||
To-do:
|
||||
Styles
|
||||
Bible Reading Plan
|
||||
Bible Viewer
|
||||
fix Multiple Reference resolving /show
|
||||
"""
|
||||
|
||||
def dbg(message):
|
||||
@@ -189,7 +192,9 @@ def return_dict_rich(ref, defs):
|
||||
|
||||
@app.get("/show")
|
||||
def show():
|
||||
ref = request.args.get("kw", "John 3:16")
|
||||
ref = request.args.get("kw", None)
|
||||
if ref is None:
|
||||
return send_file("html/show.html")
|
||||
dbg("show({})".format(ref))
|
||||
ref = ref_input_cleaning(ref)
|
||||
if not ref:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<input type="text" name="kw"><br><br>
|
||||
|
||||
<label for='view'>View<label><br>
|
||||
<input type="radio" name="view" value="rich">Rich<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>
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<input type="text" name="kw"><br><br>
|
||||
|
||||
<label for='view'>View<label><br>
|
||||
<input type="radio" name="view" value="rich">Rich<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>
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<h2>Show Verse</h2>
|
||||
<form action="/show">
|
||||
<label for='kw'>Key Words</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="submit">
|
||||
<form>
|
||||
|
||||
<hr>
|
||||
<p>You can try to search a Bible reference in this box, such as "1 John 5:7".</p>
|
||||
<p>You can use abbreviations, but you may not get the result you are looking for.</p>
|
||||
<p>Use a dash for the verse to get the entire chapter, eg. "John 3:-"<p>
|
||||
Reference in New Issue
Block a user