Update app.py
Browse files
app.py
CHANGED
@@ -2,21 +2,9 @@ import streamlit as st
|
|
2 |
|
3 |
import time
|
4 |
|
5 |
-
# --- Custom CSS ---
|
6 |
-
# !!! IMPORTANT !!!
|
7 |
-
# 1. YOU MUST VERIFY AND ADJUST THE SELECTORS BELOW USING YOUR BROWSER'S INSPECTOR.
|
8 |
-
# 2. THE HEADER_HEIGHT MUST ACCURATELY REFLECT YOUR HEADER'S ACTUAL HEIGHT.
|
9 |
-
|
10 |
-
# Use the developer tools to find your header's actual height.
|
11 |
# Inspect the header element, go to the "Computed" tab in styles, and find its height.
|
12 |
HEADER_HEIGHT = "61px" # EXAMPLE: Adjust this (e.g., "56px", "4rem")
|
13 |
-
|
14 |
-
# ---- SELECTOR FOR THE HEADER ----
|
15 |
-
# Try this first (common for recent Streamlit versions):
|
16 |
HEADER_SELECTOR = 'header[data-testid="stHeader"]'
|
17 |
-
# If that doesn't work, inspect and find the correct one.
|
18 |
-
# It might be just 'header', or a div with a specific class.
|
19 |
-
# Example if using a class: HEADER_SELECTOR = 'div.my-custom-looking-header-class'
|
20 |
|
21 |
# ---- SELECTOR FOR THE MAIN CONTENT AREA THAT NEEDS PADDING ----
|
22 |
# This targets the first direct div child of the stAppViewContainer,
|
@@ -75,15 +63,6 @@ st.write(f"The header should be sticky. This content section has a top padding o
|
|
75 |
st.info(f"Header Selector Used: `{HEADER_SELECTOR}`")
|
76 |
st.info(f"Main Content Selector Used: `{MAIN_CONTENT_SELECTOR}`")
|
77 |
|
78 |
-
|
79 |
-
if st.button("Run Process (for status widget)"):
|
80 |
-
with st.spinner("Processing..."):
|
81 |
-
time.sleep(2)
|
82 |
-
st.success("Process finished!")
|
83 |
-
|
84 |
-
for i in range(60):
|
85 |
-
st.write(f"Scrollable line of content {i + 1}.")
|
86 |
-
|
87 |
# --- SHARED ON ALL PAGES ---
|
88 |
#st.logo(image="images/menu_book_60dp_75FBFD.png")
|
89 |
#st.sidebar.title("SBS V2.0 mapper")
|
|
|
2 |
|
3 |
import time
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
# Inspect the header element, go to the "Computed" tab in styles, and find its height.
|
6 |
HEADER_HEIGHT = "61px" # EXAMPLE: Adjust this (e.g., "56px", "4rem")
|
|
|
|
|
|
|
7 |
HEADER_SELECTOR = 'header[data-testid="stHeader"]'
|
|
|
|
|
|
|
8 |
|
9 |
# ---- SELECTOR FOR THE MAIN CONTENT AREA THAT NEEDS PADDING ----
|
10 |
# This targets the first direct div child of the stAppViewContainer,
|
|
|
63 |
st.info(f"Header Selector Used: `{HEADER_SELECTOR}`")
|
64 |
st.info(f"Main Content Selector Used: `{MAIN_CONTENT_SELECTOR}`")
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
# --- SHARED ON ALL PAGES ---
|
67 |
#st.logo(image="images/menu_book_60dp_75FBFD.png")
|
68 |
#st.sidebar.title("SBS V2.0 mapper")
|