File size: 1,279 Bytes
d8f56b1 f49123b d8d4d1d b16fcde 7d62d73 b16fcde 057e688 1a098ab 7aac04d 1a098ab 057e688 9835c7c eae44be 2d0df46 be4f344 2d0df46 057e688 ddf963a b16fcde 057e688 b16fcde d8d4d1d eae44be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
import streamlit as st
#from streamlit_navigation_bar import st_navbar
header = st.container()
header.title("Here is a sticky header")
header.write("""<div class='fixed-header'/>""", unsafe_allow_html=True)
### Custom CSS for the sticky header
st.markdown(
"""
<style>
div[data-testid="stVerticalBlock"] div:has(div.fixed-header) {
position: sticky;
top: 2.875rem;
background-color: white;
z-index: 999;
}
.fixed-header {
border-bottom: 1px solid black;
}
</style>
""",
unsafe_allow_html=True
)
# --- 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="SBS V2.0 mapper",
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()
#page = st_navbar(pages=["SBS V2.0 mapper"], selected="SBS V2.0 mapper", key="app_page_navbar")
#st.write(page) |