File size: 1,484 Bytes
d8f56b1 f49123b d8d4d1d 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 53 54 55 56 57 58 |
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) |