Spaces:
Running
on
T4
Running
on
T4
sidebar fixed
Browse files- pages/Semantic_Search.py +21 -8
pages/Semantic_Search.py
CHANGED
@@ -51,21 +51,34 @@ st.markdown("""
|
|
51 |
""", unsafe_allow_html=True)
|
52 |
st.markdown("""
|
53 |
<style>
|
54 |
-
/* Make
|
55 |
-
[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 |
-
[data-testid="stAppViewContainer"] >
|
68 |
-
margin-left: 16rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
</style>
|
71 |
""", unsafe_allow_html=True)
|
|
|
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: 999;
|
62 |
+
background-color: #0e1117;
|
63 |
+
border-right: 1px solid #333;
|
64 |
}
|
65 |
|
66 |
+
/* Prevent main content from being hidden behind fixed sidebar */
|
67 |
+
div[data-testid="stAppViewContainer"] > div:nth-child(1) {
|
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)
|