Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,6 +114,33 @@ st.markdown("""
|
|
| 114 |
</style>
|
| 115 |
""", unsafe_allow_html=True)
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
| 118 |
|
| 119 |
# Streamlit app layout
|
|
|
|
| 114 |
</style>
|
| 115 |
""", unsafe_allow_html=True)
|
| 116 |
|
| 117 |
+
# Custom CSS for a green checkbox
|
| 118 |
+
st.markdown("""
|
| 119 |
+
<style>
|
| 120 |
+
.green-checkbox {
|
| 121 |
+
display: inline-block;
|
| 122 |
+
color: green;
|
| 123 |
+
margin: 0 4px 0 0;
|
| 124 |
+
font-size: 20px;
|
| 125 |
+
font-weight: bold;
|
| 126 |
+
}
|
| 127 |
+
.attribute-label {
|
| 128 |
+
display: inline;
|
| 129 |
+
font-size: 16px;
|
| 130 |
+
}
|
| 131 |
+
</style>
|
| 132 |
+
""", unsafe_allow_html=True)
|
| 133 |
+
|
| 134 |
+
# Function to display a green checkbox for "True" attributes
|
| 135 |
+
def display_attribute(label, is_true):
|
| 136 |
+
if is_true:
|
| 137 |
+
st.markdown(f'<span class="green-checkbox">✔</span><span class="attribute-label">{label}</span>', unsafe_allow_html=True)
|
| 138 |
+
else:
|
| 139 |
+
st.markdown(f'<span class="attribute-label">{label}</span>', unsafe_allow_html=True)
|
| 140 |
+
|
| 141 |
+
# Example usage within the app
|
| 142 |
+
display_attribute("Cyber Approved", True) # This will display a green checkbox
|
| 143 |
+
display_attribute("Accessibility Approved", False) # This will display just the label without a checkbox
|
| 144 |
|
| 145 |
|
| 146 |
# Streamlit app layout
|