Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
sidebar fixed
Browse files- pages/Semantic_Search.py +3 -18
pages/Semantic_Search.py
CHANGED
|
@@ -51,34 +51,19 @@ st.markdown("""
|
|
| 51 |
""", unsafe_allow_html=True)
|
| 52 |
st.markdown("""
|
| 53 |
<style>
|
| 54 |
-
/* Make sidebar fixed */
|
| 55 |
section[data-testid="stSidebar"] {
|
| 56 |
position: fixed;
|
| 57 |
top: 0;
|
| 58 |
left: 0;
|
| 59 |
height: 100vh;
|
| 60 |
overflow-y: auto;
|
| 61 |
-
z-index:
|
| 62 |
background-color: #0e1117;
|
| 63 |
border-right: 1px solid #333;
|
| 64 |
}
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
margin-left: 16rem; /* Adjust if your sidebar is wider */
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
/* Optional: keep header pinned too */
|
| 72 |
-
header[data-testid="stHeader"] {
|
| 73 |
-
position: fixed;
|
| 74 |
-
top: 0;
|
| 75 |
-
width: 100%;
|
| 76 |
-
z-index: 998;
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
/* Compensate top spacing for header if fixed */
|
| 80 |
-
.main {
|
| 81 |
-
padding-top: 4rem;
|
| 82 |
}
|
| 83 |
</style>
|
| 84 |
""", unsafe_allow_html=True)
|
|
|
|
| 51 |
""", unsafe_allow_html=True)
|
| 52 |
st.markdown("""
|
| 53 |
<style>
|
|
|
|
| 54 |
section[data-testid="stSidebar"] {
|
| 55 |
position: fixed;
|
| 56 |
top: 0;
|
| 57 |
left: 0;
|
| 58 |
height: 100vh;
|
| 59 |
overflow-y: auto;
|
| 60 |
+
z-index: 100;
|
| 61 |
background-color: #0e1117;
|
| 62 |
border-right: 1px solid #333;
|
| 63 |
}
|
| 64 |
|
| 65 |
+
div[data-testid="stAppViewContainer"] > div:first-child {
|
| 66 |
+
margin-left: 320px; /* Adjust to match your sidebar width */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
</style>
|
| 69 |
""", unsafe_allow_html=True)
|