Spaces:
Sleeping
Sleeping
some css styles changes
Browse files- src/ui/app.py +28 -21
src/ui/app.py
CHANGED
|
@@ -147,28 +147,35 @@ st.markdown(f"""
|
|
| 147 |
border-radius: 8px;
|
| 148 |
}}
|
| 149 |
|
| 150 |
-
/* фиксация
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
/*
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
}}
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
[data-testid="stSidebarCollapseButton"] {{
|
| 171 |
-
display: none !important;
|
| 172 |
}}
|
| 173 |
}}
|
| 174 |
/* ------------------------ */
|
|
|
|
| 147 |
border-radius: 8px;
|
| 148 |
}}
|
| 149 |
|
| 150 |
+
/* фиксация сайдбара */
|
| 151 |
+
/* оставляем "пустую" оболочку сайдбара */
|
| 152 |
+
[data-testid="stSidebar"] {{
|
| 153 |
+
min-width: 300px !important;
|
| 154 |
+
max-width: 300px !important;
|
| 155 |
+
flex-shrink: 0 !important;
|
| 156 |
+
}}
|
| 157 |
+
|
| 158 |
+
/* а вот содержимое фиксируем намертво */
|
| 159 |
+
[data-testid="stSidebarContent"] {{
|
| 160 |
+
position: fixed !important;
|
| 161 |
+
top: 0 !important;
|
| 162 |
+
left: 0 !important;
|
| 163 |
+
width: 300px !important; /* Должно совпадать с шириной оболочки */
|
| 164 |
+
height: 100vh !important;
|
| 165 |
+
overflow-y: auto !important;
|
| 166 |
+
z-index: 10000 !important;
|
| 167 |
+
background-color: #f0f2f6;
|
| 168 |
+
}}
|
| 169 |
+
|
| 170 |
+
/* на мобильных убираем фиксацию, иначе сломается */
|
| 171 |
+
@media (max-width: 768px) {{
|
| 172 |
+
[data-testid="stSidebarContent"] {{
|
| 173 |
+
position: relative !important;
|
| 174 |
+
width: 100% !important;
|
| 175 |
+
height: auto !important;
|
| 176 |
}}
|
| 177 |
+
[data-testid="stSidebar"] {{
|
| 178 |
+
min-width: 100% !important;
|
|
|
|
|
|
|
| 179 |
}}
|
| 180 |
}}
|
| 181 |
/* ------------------------ */
|