import streamlit as st #from streamlit_navigation_bar import st_navbar def page1(): st.write("This is the home page") pages = [ st.Page(page1, icon=":material/home:", title="Home"), #st.Page(page2, icon=":material/filter:", title="Filter"), #st.Page(page3, icon=":material/settings:", title="Settings"), #st.Page(page4, icon=":material/map:", title="Map"), ] current_page = st.navigation(pages=pages, position="hidden") st.set_page_config(layout="wide") num_cols = max(len(pages) + 1, 8) columns = st.columns(num_cols, vertical_alignment="bottom") columns[0].write("**My App Name**") for col, page in zip(columns[1:], pages): col.page_link(page, icon=page.icon) st.title(f"{current_page.icon} {current_page.title}") current_page.run() # --- 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)