Redesign UI with modern dark theme and improved styling
- Unified color scheme using CSS variables across all pages - Fixed spacing issues in verse display (removed <br> joins for rich view) - Updated all HTML pages with proper HTML5 structure - Added responsive design with mobile breakpoints - Created shared stylesheet (styles/page.css) for form pages - Fixed unclosed div tag in scripture_response - Improved typography with serif fonts for scripture text - Added verse container cards with hover effects - Inline dark background to prevent white flash on navigation All endpoints remain backward compatible with existing functionality.
This commit is contained in:
@@ -134,6 +134,10 @@ def serve_shortcode_js():
|
||||
def serve_collapsible_js():
|
||||
return Response(cached.get("js_collapsible"), mimetype='application/javascript')
|
||||
|
||||
@app.get("/styles/page.css")
|
||||
def serve_page_css():
|
||||
return send_file("styles/page.css", mimetype='text/css')
|
||||
|
||||
def generate_short_id():
|
||||
remain = random.randrange(614_656, 17_210_367) # resolves to length of 5
|
||||
chars = "0123456789ACEFHJKLMNPRTUVWXY"
|
||||
@@ -604,7 +608,7 @@ def show(kw=None, get_start_verse_id=False, human_readable=False):
|
||||
if arg_view == "plain":
|
||||
response = "<br>".join(response_list)
|
||||
elif arg_view == "rich" or human_readable:
|
||||
response = "<br>".join(response_list)
|
||||
response = "".join(response_list)
|
||||
else:
|
||||
response = jsonify(response_list)
|
||||
return response
|
||||
@@ -670,8 +674,8 @@ def scripture_response(scriptures, human_readable=False):
|
||||
)
|
||||
|
||||
response.append(cached["css_navbar"])
|
||||
response.append("<div class='responses'")
|
||||
response.append(f"{len(scriptures)} Results")
|
||||
response.append("<div class='responses'>")
|
||||
response.append(f"<div class='results-count'>{len(scriptures)} Results</div>")
|
||||
for scripture in scriptures:
|
||||
response.append(response_rich(scripture))
|
||||
response.append("</div>")
|
||||
@@ -720,7 +724,7 @@ def random_verse():
|
||||
if arg_view == "plain":
|
||||
response = "<br>".join(response_list)
|
||||
elif arg_view == "rich":
|
||||
response = "<br>".join(response_list)
|
||||
response = "".join(response_list)
|
||||
else:
|
||||
response = jsonify(response_list)
|
||||
#logging.debug(f"Search Response: {response}")
|
||||
@@ -741,7 +745,7 @@ def verse_of_the_day():
|
||||
if arg_view == "plain":
|
||||
response = "<br>".join(response_list)
|
||||
elif arg_view == "rich":
|
||||
response = "<br>".join(response_list)
|
||||
response = "".join(response_list)
|
||||
else:
|
||||
response = jsonify(response_list)
|
||||
#logging.debug(f"Search Response: {response}")
|
||||
@@ -781,7 +785,7 @@ def search():
|
||||
if arg_view == "plain":
|
||||
response = "<br>".join(response_list)
|
||||
elif arg_view == "rich":
|
||||
response = "<br>".join(response_list)
|
||||
response = "".join(response_list)
|
||||
else:
|
||||
response = jsonify(response_list)
|
||||
#logging.debug(f"Search Response: {response}")
|
||||
@@ -935,8 +939,10 @@ def sequential_read(start=0, num=1, uid=None, getuid=False):
|
||||
# only look at a small set of the oldest unused entries.
|
||||
seq_conn.commit()
|
||||
arg_view = request.args.get("view", None)
|
||||
if arg_view == "plain" or arg_view == "rich":
|
||||
if arg_view == "plain":
|
||||
response = "<br>".join(response_list)
|
||||
elif arg_view == "rich":
|
||||
response = "".join(response_list)
|
||||
else:
|
||||
response = jsonify(response_list)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user