Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,17 +39,12 @@ st.set_page_config(page_title="ST_GeoMech_UCS", page_icon="logo.png", layout="wi
|
|
| 39 |
# This is the new CSS block for the sticky header and message box
|
| 40 |
st.markdown("""
|
| 41 |
<style>
|
| 42 |
-
/* Add a light gray background to the main app container */
|
| 43 |
-
.stApp {
|
| 44 |
-
background-color: #f0f2f6;
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
/* CSS to make the header sticky */
|
| 48 |
.fixed-header-container {
|
| 49 |
position: sticky;
|
| 50 |
top: 0;
|
| 51 |
z-index: 1000;
|
| 52 |
-
background-color: #f0f2f6; /*
|
| 53 |
padding: 10px 0;
|
| 54 |
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
| 55 |
}
|
|
@@ -438,6 +433,11 @@ st.sidebar.markdown(f"""
|
|
| 438 |
""", unsafe_allow_html=True
|
| 439 |
)
|
| 440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 441 |
# =========================
|
| 442 |
# The main sticky container is defined here, before the app logic
|
| 443 |
# This ensures it's rendered at the top of the page regardless of state.
|
|
|
|
| 39 |
# This is the new CSS block for the sticky header and message box
|
| 40 |
st.markdown("""
|
| 41 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
/* CSS to make the header sticky */
|
| 43 |
.fixed-header-container {
|
| 44 |
position: sticky;
|
| 45 |
top: 0;
|
| 46 |
z-index: 1000;
|
| 47 |
+
background-color: #f0f2f6; /* Adjust to match your app's background color */
|
| 48 |
padding: 10px 0;
|
| 49 |
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
| 50 |
}
|
|
|
|
| 433 |
""", unsafe_allow_html=True
|
| 434 |
)
|
| 435 |
|
| 436 |
+
# =========================
|
| 437 |
+
# Reusable Sticky Header Function
|
| 438 |
+
# This function is now removed, replaced by the fixed-header-container
|
| 439 |
+
# =========================
|
| 440 |
+
|
| 441 |
# =========================
|
| 442 |
# The main sticky container is defined here, before the app logic
|
| 443 |
# This ensures it's rendered at the top of the page regardless of state.
|