File size: 1,807 Bytes
d8f56b1
53dcb25
f9acfdd
 
 
 
 
 
 
 
 
 
 
 
97aea69
71977e3
f9acfdd
 
 
 
 
 
 
 
 
 
d98a4da
f9acfdd
 
 
 
34e2892
f9acfdd
 
 
 
34e2892
 
 
57dfc0c
9176e69
9f0fc30
 
 
057e688
b50938f
9038e9e
 
 
 
b47a09c
9038e9e
057e688
957d115
057e688
fe5cb7d
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
import streamlit as st 

# Set page config
st.set_page_config(page_title="Hybrid Solution", layout="wide")

# Create a custom HTML component just for the navigation
nav_html = """
<div style="position:fixed; top:0; left:0; width:100%; background-color:#262730; color:white; padding:10px; z-index:9999; text-align:center;">
    <h3 style="display:inline-block; margin:0 20px;">My App Navigation</h3>
    <a href="#section1" style="color:white; margin:0 10px;">Section 1</a>
    <a href="#section2" style="color:white; margin:0 10px;">Section 2</a>
    <a href="#section3" style="color:white; margin:0 10px;">Section 3</a>
</div>
<div style="height:50px;"></div>
"""

# Inject the navigation HTML
st.components.v1.html(nav_html, height=50)

# Regular Streamlit content with anchors
st.title("My Application")

st.header("Section 1", anchor="section1")
st.write("This is section 1 content")
for i in range(5):
    st.write(f"Content line {i}")

st.header("Section 2", anchor="section2")
st.write("This is section 2 content")
for i in range(5):
    st.write(f"Content line {i}")

st.header("Section 3", anchor="section3")
st.write("This is section 3 content")
for i in range(5):
    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()