Fix static spinner graphic and favicon
Browse files- app.py +3 -1
- wrdler/ui_helpers.py +10 -10
app.py
CHANGED
|
@@ -13,7 +13,9 @@ def main(opened=False):
|
|
| 13 |
st.set_page_config(
|
| 14 |
page_title="Wrdler",
|
| 15 |
layout="wide",
|
| 16 |
-
initial_sidebar_state="expanded" if opened else "collapsed"
|
|
|
|
|
|
|
| 17 |
)
|
| 18 |
|
| 19 |
st.markdown(
|
|
|
|
| 13 |
st.set_page_config(
|
| 14 |
page_title="Wrdler",
|
| 15 |
layout="wide",
|
| 16 |
+
#initial_sidebar_state="expanded" if opened else "collapsed",
|
| 17 |
+
initial_sidebar_state=None,
|
| 18 |
+
page_icon="/app/static/favicon.ico"
|
| 19 |
)
|
| 20 |
|
| 21 |
st.markdown(
|
wrdler/ui_helpers.py
CHANGED
|
@@ -641,16 +641,16 @@ def _render_footer(current_page: str = "play"):
|
|
| 641 |
def show_spinner(message: str = "Loading..."):
|
| 642 |
"""
|
| 643 |
Show a full-page overlay with a wrdler.gif spinner and optional message.
|
| 644 |
-
Expects
|
| 645 |
"""
|
| 646 |
-
gif_path = os.path.join(os.path.dirname(__file__), "assets", "wrdler.gif")
|
| 647 |
-
gif_data = None
|
| 648 |
-
if os.path.exists(gif_path):
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
else:
|
| 653 |
-
|
| 654 |
|
| 655 |
st.markdown(
|
| 656 |
f'''
|
|
@@ -675,7 +675,7 @@ def show_spinner(message: str = "Loading..."):
|
|
| 675 |
</style>
|
| 676 |
<div class="bw-spinner-overlay">
|
| 677 |
<div class="modal-spinner-inner" style="display:flex; flex-direction:column; align-items:center;">
|
| 678 |
-
<div class="bw-spinner-img stImage"
|
| 679 |
<div class="bw-spinner-msg">{message}</div>
|
| 680 |
</div>
|
| 681 |
</div>
|
|
|
|
| 641 |
def show_spinner(message: str = "Loading..."):
|
| 642 |
"""
|
| 643 |
Show a full-page overlay with a wrdler.gif spinner and optional message.
|
| 644 |
+
Expects static/wrdler.gif to exist.
|
| 645 |
"""
|
| 646 |
+
# gif_path = os.path.join(os.path.dirname(__file__), "assets", "wrdler.gif")
|
| 647 |
+
# gif_data = None
|
| 648 |
+
# if os.path.exists(gif_path):
|
| 649 |
+
# with open(gif_path, "rb") as f:
|
| 650 |
+
# gif_data = base64.b64encode(f.read()).decode("utf-8")
|
| 651 |
+
# img_tag = f'<img src="data:image/gif;base64,{gif_data}" alt="Loading..." width="192" height="192" />'
|
| 652 |
+
# else:
|
| 653 |
+
# img_tag = '<div style="width:80px;height:80px;background:#eee;border-radius:16px;"></div>'
|
| 654 |
|
| 655 |
st.markdown(
|
| 656 |
f'''
|
|
|
|
| 675 |
</style>
|
| 676 |
<div class="bw-spinner-overlay">
|
| 677 |
<div class="modal-spinner-inner" style="display:flex; flex-direction:column; align-items:center;">
|
| 678 |
+
<div class="bw-spinner-img stImage"><img src="/app/static/wrdler.gif" alt="Loading..." width="192" height="192" /></div>
|
| 679 |
<div class="bw-spinner-msg">{message}</div>
|
| 680 |
</div>
|
| 681 |
</div>
|