Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
sidebar fixed
Browse files- pages/Semantic_Search.py +21 -22
pages/Semantic_Search.py
CHANGED
|
@@ -49,28 +49,27 @@ st.markdown("""
|
|
| 49 |
}
|
| 50 |
</style>
|
| 51 |
""", unsafe_allow_html=True)
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
# """, unsafe_allow_html=True)
|
| 74 |
|
| 75 |
#ps = PorterStemmer()
|
| 76 |
|
|
|
|
| 49 |
}
|
| 50 |
</style>
|
| 51 |
""", unsafe_allow_html=True)
|
| 52 |
+
st.markdown("""
|
| 53 |
+
<style>
|
| 54 |
+
/* Fix the entire sidebar so it stays when main content scrolls */
|
| 55 |
+
section[data-testid="stSidebar"] {
|
| 56 |
+
position: fixed;
|
| 57 |
+
top: 0;
|
| 58 |
+
left: 0;
|
| 59 |
+
height: 100vh;
|
| 60 |
+
overflow-y: auto;
|
| 61 |
+
z-index: 100;
|
| 62 |
+
background-color: #f0f2f6; /* or your theme's sidebar color */
|
| 63 |
+
padding-top: 1rem;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
/* Prevent main content from hiding behind sidebar */
|
| 67 |
+
div[data-testid="stAppViewContainer"] > div:first-child {
|
| 68 |
+
margin-left: 21rem; /* Match actual sidebar width */
|
| 69 |
+
}
|
| 70 |
+
</style>
|
| 71 |
+
""", unsafe_allow_html=True)
|
| 72 |
+
|
|
|
|
| 73 |
|
| 74 |
#ps = PorterStemmer()
|
| 75 |
|