|
import streamlit as st |
|
|
|
|
|
st.set_page_config(page_title="Fixed Status Widget Approach 2", layout="wide") |
|
|
|
|
|
st.markdown(""" |
|
<style> |
|
/* Very specific targeting of the status widget */ |
|
div[data-testid="stStatusWidget"], |
|
div:has(> div[data-testid="stStatusWidget"]) { |
|
position: fixed !important; |
|
top: 5px !important; |
|
right: 5px !important; |
|
z-index: 1000000 !important; |
|
background-color: white !important; |
|
border-radius: 4px !important; |
|
box-shadow: 0 0 10px rgba(0,0,0,0.15) !important; |
|
} |
|
|
|
/* Ensure the status button stays visible */ |
|
button[kind="formSubmit"] { |
|
visibility: visible !important; |
|
display: inline-flex !important; |
|
} |
|
</style> |
|
""", unsafe_allow_html=True) |
|
|
|
|
|
st.title("App with Fixed Status Widget") |
|
st.write("Scroll down to test if the status widget stays fixed") |
|
|
|
|
|
for i in range(30): |
|
st.write(f"Testing content line {i}") |
|
if i % 10 == 0: |
|
st.markdown("### Section Break") |
|
|
|
|
|
|
|
st.logo(image="images/menu_book_60dp_75FBFD.png") |
|
st.sidebar.title("SBS V2.0 mapper") |
|
st.sidebar.subheader("(work in progress)") |
|
st.sidebar.text("Demo by JA-RAD") |
|
|
|
|
|
type_text_page = st.Page( |
|
page="pages/type_text.py", |
|
title="DEMO (work in progress)", |
|
icon=":material/keyboard:", |
|
default=True,) |
|
|
|
|
|
pg = st.navigation(pages=[type_text_page]) |
|
|
|
pg.run() |