Hug0endob commited on
Commit
b4e0b5f
·
verified ·
1 Parent(s): 8621d05

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +16 -0
streamlit_app.py CHANGED
@@ -17,6 +17,22 @@ from dotenv import load_dotenv
17
 
18
  load_dotenv()
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  # ----------------------------------------------------------------------
21
  # Configuration & constants
22
  # ----------------------------------------------------------------------
 
17
 
18
  load_dotenv()
19
 
20
+ # -------------------------------------------------
21
+ # Sticky‑video CSS – makes the sidebar video float
22
+ # -------------------------------------------------
23
+ sticky_css = """
24
+ <style>
25
+ [data-testid="stSidebar"] video {
26
+ position: sticky; /* stay fixed while scrolling */
27
+ top: 1rem; /* distance from top of viewport */
28
+ max-height: 30vh; /* limit height to 30 % of viewport */
29
+ width: 100%; /* fill sidebar width */
30
+ border-radius: 4px; /* optional rounded corners */
31
+ }
32
+ </style>
33
+ """
34
+ st.markdown(sticky_css, unsafe_allow_html=True)
35
+
36
  # ----------------------------------------------------------------------
37
  # Configuration & constants
38
  # ----------------------------------------------------------------------