georad commited on
Commit
11227be
·
verified ·
1 Parent(s): d96c3ec

Update pages/type_text.py

Browse files
Files changed (1) hide show
  1. pages/type_text.py +27 -0
pages/type_text.py CHANGED
@@ -9,6 +9,33 @@ import time
9
  import os
10
  os.getenv("HF_TOKEN")
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  #hide_streamlit_style = """
13
  # <style>
14
  # div[data-testid="stHeader"] {
 
9
  import os
10
  os.getenv("HF_TOKEN")
11
 
12
+ from streamlit_scroll_navigation import scroll_navbar
13
+
14
+ # Anchor IDs and icons
15
+ anchor_ids = ["About", "Features", "Settings", "Pricing", "Contact"]
16
+ anchor_icons = ["info-circle", "lightbulb", "gear", "tag", "envelope"]
17
+
18
+ # 1. as sidebar menu
19
+ #with st.sidebar:
20
+ # st.subheader("Example 1")
21
+ # scroll_navbar(
22
+ # anchor_ids,
23
+ # anchor_labels=None, # Use anchor_ids as labels
24
+ # anchor_icons=anchor_icons)
25
+
26
+ # 2. horizontal menu
27
+ st.subheader("Example 2")
28
+ scroll_navbar(
29
+ anchor_ids,
30
+ key = "navbar2",
31
+ anchor_icons=anchor_icons,
32
+ orientation="horizontal")
33
+
34
+ # Dummy page setup
35
+ for anchor_id in anchor_ids:
36
+ st.subheader(anchor_id,anchor=anchor_id)
37
+ st.write("content " * 100)
38
+
39
  #hide_streamlit_style = """
40
  # <style>
41
  # div[data-testid="stHeader"] {