import streamlit as st # Set page config st.set_page_config(page_title="Experimental Solution", layout="wide") # Use JavaScript to create and maintain a sticky header js_code = """ """ # Inject the JavaScript st.components.v1.html(js_code, height=0) # Add a small spacer for header st.markdown("
", unsafe_allow_html=True) # Regular Streamlit content st.title("My Application") st.header("Section 1", anchor="section1") st.write("This is section 1 content") for i in range(10): st.write(f"Content line {i}") st.header("Section 2", anchor="section2") st.write("This is section 2 content") for i in range(10): st.write(f"Content line {i}") st.header("Section 3", anchor="section3") st.write("This is section 3 content") for i in range(10): st.write(f"Content line {i}") # --- SHARED ON ALL PAGES --- 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") # --- PAGE SETUP --- type_text_page = st.Page( page="pages/type_text.py", title="DEMO (work in progress)", icon=":material/keyboard:", default=True,) # --- NAVIGATION SETUP --- pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS #pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS pg.run()