Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -688,12 +688,12 @@ def side():
|
|
| 688 |
|
| 689 |
st.sidebar.header("TrustVault®")
|
| 690 |
image_files = [
|
| 691 |
-
("Stability", "Bucket_STABILITY.png"),
|
| 692 |
-
("Development", "Bucket_DEVELOPMENT.png"),
|
| 693 |
-
("Relationship", "Bucket_RELATIONSHIP.png"),
|
| 694 |
-
("Benefit", "Bucket_BENEFIT.png"),
|
| 695 |
-
("Vision", "Bucket_VISION.png"),
|
| 696 |
-
("Competence", "Bucket_COMPETENCE.png"),
|
| 697 |
]
|
| 698 |
|
| 699 |
# CSS for Layout and Hover Effect
|
|
@@ -703,21 +703,14 @@ def side():
|
|
| 703 |
.image-container {
|
| 704 |
display: flex;
|
| 705 |
justify-content: center;
|
| 706 |
-
gap:
|
| 707 |
-
margin-bottom: 10px;
|
| 708 |
}
|
| 709 |
.image-wrapper {
|
| 710 |
text-align: center;
|
| 711 |
}
|
| 712 |
-
.image-wrapper button {
|
| 713 |
-
background-color: transparent;
|
| 714 |
-
border: none;
|
| 715 |
-
padding: 0;
|
| 716 |
-
margin: 0;
|
| 717 |
-
}
|
| 718 |
.image-wrapper img {
|
| 719 |
-
width:
|
| 720 |
-
height:
|
| 721 |
object-fit: contain;
|
| 722 |
cursor: pointer;
|
| 723 |
transition: transform 0.3s;
|
|
@@ -725,15 +718,6 @@ def side():
|
|
| 725 |
.image-wrapper img:hover {
|
| 726 |
transform: scale(1.1);
|
| 727 |
}
|
| 728 |
-
.small-button {
|
| 729 |
-
font-size: 12px;
|
| 730 |
-
padding: 5px 10px;
|
| 731 |
-
}
|
| 732 |
-
.show-button-container {
|
| 733 |
-
display: flex;
|
| 734 |
-
justify-content: flex-end;
|
| 735 |
-
margin-top: -10px;
|
| 736 |
-
}
|
| 737 |
</style>
|
| 738 |
""",
|
| 739 |
unsafe_allow_html=True,
|
|
@@ -817,13 +801,14 @@ def side():
|
|
| 817 |
st.write("No TrustBuilders found.")
|
| 818 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 819 |
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
|
| 823 |
-
|
|
|
|
| 824 |
# Display clickable image as a button
|
| 825 |
if st.button(label="", key=f"filter_{bucket}", help=f"Filter by {bucket}"):
|
| 826 |
-
|
| 827 |
st.markdown(
|
| 828 |
f"""
|
| 829 |
<div class="image-wrapper">
|
|
@@ -832,9 +817,11 @@ def side():
|
|
| 832 |
""",
|
| 833 |
unsafe_allow_html=True,
|
| 834 |
)
|
| 835 |
-
|
| 836 |
st.warning(f"Image not found: {img_path}")
|
| 837 |
-
|
|
|
|
|
|
|
| 838 |
|
| 839 |
# Save TrustBuilders Section
|
| 840 |
st.subheader("Save TrustBuilders®")
|
|
|
|
| 688 |
|
| 689 |
st.sidebar.header("TrustVault®")
|
| 690 |
image_files = [
|
| 691 |
+
("Stability", os.path.join(IMAGE_DIR, "Bucket_STABILITY.png")),
|
| 692 |
+
("Development", os.path.join(IMAGE_DIR, "Bucket_DEVELOPMENT.png")),
|
| 693 |
+
("Relationship", os.path.join(IMAGE_DIR, "Bucket_RELATIONSHIP.png")),
|
| 694 |
+
("Benefit", os.path.join(IMAGE_DIR, "Bucket_BENEFIT.png")),
|
| 695 |
+
("Vision", os.path.join(IMAGE_DIR, "Bucket_VISION.png")),
|
| 696 |
+
("Competence", os.path.join(IMAGE_DIR, "Bucket_COMPETENCE.png")),
|
| 697 |
]
|
| 698 |
|
| 699 |
# CSS for Layout and Hover Effect
|
|
|
|
| 703 |
.image-container {
|
| 704 |
display: flex;
|
| 705 |
justify-content: center;
|
| 706 |
+
gap: 20px;
|
|
|
|
| 707 |
}
|
| 708 |
.image-wrapper {
|
| 709 |
text-align: center;
|
| 710 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 711 |
.image-wrapper img {
|
| 712 |
+
width: 80px;
|
| 713 |
+
height: 80px;
|
| 714 |
object-fit: contain;
|
| 715 |
cursor: pointer;
|
| 716 |
transition: transform 0.3s;
|
|
|
|
| 718 |
.image-wrapper img:hover {
|
| 719 |
transform: scale(1.1);
|
| 720 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 721 |
</style>
|
| 722 |
""",
|
| 723 |
unsafe_allow_html=True,
|
|
|
|
| 801 |
st.write("No TrustBuilders found.")
|
| 802 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 803 |
|
| 804 |
+
st.write("Choose the Trust Bucket® by clicking an image:")
|
| 805 |
+
st.markdown('<div class="image-container">', unsafe_allow_html=True)
|
| 806 |
+
for bucket, img_path in image_files:
|
| 807 |
+
try:
|
| 808 |
+
if os.path.exists(img_path):
|
| 809 |
# Display clickable image as a button
|
| 810 |
if st.button(label="", key=f"filter_{bucket}", help=f"Filter by {bucket}"):
|
| 811 |
+
st.write(f"You clicked on {bucket} bucket!")
|
| 812 |
st.markdown(
|
| 813 |
f"""
|
| 814 |
<div class="image-wrapper">
|
|
|
|
| 817 |
""",
|
| 818 |
unsafe_allow_html=True,
|
| 819 |
)
|
| 820 |
+
else:
|
| 821 |
st.warning(f"Image not found: {img_path}")
|
| 822 |
+
except Exception as e:
|
| 823 |
+
st.error(f"Error loading image {img_path}: {e}")
|
| 824 |
+
st.markdown("</div>", unsafe_allow_html=True)
|
| 825 |
|
| 826 |
# Save TrustBuilders Section
|
| 827 |
st.subheader("Save TrustBuilders®")
|