Spaces:
Paused
Paused
Replace with 3in logo and fix centering on all devices
Browse files- Update logo path to use 3in par-ity project horizontal logo.png
- Add HTML wrapper with text-align center for proper centering
- Enhance CSS with flexbox centering for cross-device compatibility
- Apply margin auto and display block for perfect alignment
- Ensure logo is centered on both desktop and mobile
- app/streamlit_app.py +18 -11
app/streamlit_app.py
CHANGED
|
@@ -627,19 +627,22 @@ def main():
|
|
| 627 |
|
| 628 |
/* Logo styling for better centering and responsiveness */
|
| 629 |
.stImage > img {
|
| 630 |
-
display: block;
|
| 631 |
-
margin
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
}
|
| 636 |
|
| 637 |
/* Ensure logo container is centered with minimal spacing */
|
| 638 |
.stImage {
|
| 639 |
-
text-align: center;
|
| 640 |
-
width: 100
|
| 641 |
-
margin: 0 !important;
|
| 642 |
padding: 0 !important;
|
|
|
|
|
|
|
|
|
|
| 643 |
}
|
| 644 |
|
| 645 |
/* Remove all default Streamlit spacing around logo */
|
|
@@ -754,12 +757,15 @@ def main():
|
|
| 754 |
""", unsafe_allow_html=True)
|
| 755 |
|
| 756 |
# Centered logo at the top - minimal spacing
|
|
|
|
| 757 |
try:
|
| 758 |
# Try multiple possible paths for the logo file
|
| 759 |
logo_paths = [
|
| 760 |
-
"par-ity project horizontal logo.png", #
|
| 761 |
-
"
|
| 762 |
-
"
|
|
|
|
|
|
|
| 763 |
]
|
| 764 |
|
| 765 |
logo_loaded = False
|
|
@@ -773,6 +779,7 @@ def main():
|
|
| 773 |
st.markdown('<div class="main-header"><h1>⛳ Par-ity Project</h1></div>', unsafe_allow_html=True)
|
| 774 |
except Exception as e:
|
| 775 |
st.markdown('<div class="main-header"><h1>⛳ Par-ity Project</h1></div>', unsafe_allow_html=True)
|
|
|
|
| 776 |
|
| 777 |
# Initialize session state for step-based flow
|
| 778 |
if 'current_step' not in st.session_state:
|
|
|
|
| 627 |
|
| 628 |
/* Logo styling for better centering and responsiveness */
|
| 629 |
.stImage > img {
|
| 630 |
+
display: block !important;
|
| 631 |
+
margin: 0 auto !important;
|
| 632 |
+
max-width: 100% !important;
|
| 633 |
+
height: auto !important;
|
| 634 |
+
text-align: center !important;
|
| 635 |
}
|
| 636 |
|
| 637 |
/* Ensure logo container is centered with minimal spacing */
|
| 638 |
.stImage {
|
| 639 |
+
text-align: center !important;
|
| 640 |
+
width: 100% !important;
|
| 641 |
+
margin: 0 auto !important;
|
| 642 |
padding: 0 !important;
|
| 643 |
+
display: flex !important;
|
| 644 |
+
justify-content: center !important;
|
| 645 |
+
align-items: center !important;
|
| 646 |
}
|
| 647 |
|
| 648 |
/* Remove all default Streamlit spacing around logo */
|
|
|
|
| 757 |
""", unsafe_allow_html=True)
|
| 758 |
|
| 759 |
# Centered logo at the top - minimal spacing
|
| 760 |
+
st.markdown('<div style="text-align: center; width: 100%;">', unsafe_allow_html=True)
|
| 761 |
try:
|
| 762 |
# Try multiple possible paths for the logo file
|
| 763 |
logo_paths = [
|
| 764 |
+
"3in par-ity project horizontal logo.png", # New 3-inch logo
|
| 765 |
+
"par-ity project horizontal logo.png", # Fallback to original
|
| 766 |
+
"app/3in par-ity project horizontal logo.png", # Original path for local development
|
| 767 |
+
"app/par-ity project horizontal logo.png", # Fallback original path
|
| 768 |
+
"./3in par-ity project horizontal logo.png" # Explicit current directory
|
| 769 |
]
|
| 770 |
|
| 771 |
logo_loaded = False
|
|
|
|
| 779 |
st.markdown('<div class="main-header"><h1>⛳ Par-ity Project</h1></div>', unsafe_allow_html=True)
|
| 780 |
except Exception as e:
|
| 781 |
st.markdown('<div class="main-header"><h1>⛳ Par-ity Project</h1></div>', unsafe_allow_html=True)
|
| 782 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
| 783 |
|
| 784 |
# Initialize session state for step-based flow
|
| 785 |
if 'current_step' not in st.session_state:
|