Update app.py
Browse files
app.py
CHANGED
|
@@ -44,14 +44,22 @@ st.markdown("""
|
|
| 44 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 45 |
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 46 |
animation: slideInUp 0.5s ease-in-out;
|
| 47 |
-
border: none;
|
| 48 |
-
cursor: pointer;
|
| 49 |
}
|
| 50 |
.team-card:hover {
|
| 51 |
transform: scale(1.1) rotate(2deg);
|
| 52 |
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
|
| 53 |
background: linear-gradient(45deg, #e74c3c, #f1c40f);
|
| 54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
.stats-container {
|
| 56 |
background: rgba(255, 255, 255, 0.1);
|
| 57 |
border-radius: 15px;
|
|
@@ -136,35 +144,21 @@ st.markdown('<div class="team-container">', unsafe_allow_html=True)
|
|
| 136 |
row1 = st.columns(5)
|
| 137 |
for i, t in enumerate(teams[:5]):
|
| 138 |
with row1[i]:
|
| 139 |
-
#
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
<button class="team-card" type="submit" name="team_button" value="{t}">
|
| 143 |
-
{t}
|
| 144 |
-
</button>
|
| 145 |
-
</form>
|
| 146 |
-
"""
|
| 147 |
-
st.markdown(button_html, unsafe_allow_html=True)
|
| 148 |
-
# Check if this button was clicked
|
| 149 |
-
if st.session_state.get('team_button') == t:
|
| 150 |
st.session_state['selected_team'] = t
|
|
|
|
| 151 |
|
| 152 |
# Second row (5 teams)
|
| 153 |
row2 = st.columns(5)
|
| 154 |
for i, t in enumerate(teams[5:10]):
|
| 155 |
with row2[i]:
|
| 156 |
-
#
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
<button class="team-card" type="submit" name="team_button" value="{t}">
|
| 160 |
-
{t}
|
| 161 |
-
</button>
|
| 162 |
-
</form>
|
| 163 |
-
"""
|
| 164 |
-
st.markdown(button_html, unsafe_allow_html=True)
|
| 165 |
-
# Check if this button was clicked
|
| 166 |
-
if st.session_state.get('team_button') == t:
|
| 167 |
st.session_state['selected_team'] = t
|
|
|
|
| 168 |
|
| 169 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 170 |
|
|
|
|
| 44 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 45 |
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 46 |
animation: slideInUp 0.5s ease-in-out;
|
|
|
|
|
|
|
| 47 |
}
|
| 48 |
.team-card:hover {
|
| 49 |
transform: scale(1.1) rotate(2deg);
|
| 50 |
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
|
| 51 |
background: linear-gradient(45deg, #e74c3c, #f1c40f);
|
| 52 |
}
|
| 53 |
+
.team-button {
|
| 54 |
+
background: none;
|
| 55 |
+
border: none;
|
| 56 |
+
color: white;
|
| 57 |
+
font-size: 1.2rem;
|
| 58 |
+
font-weight: bold;
|
| 59 |
+
width: 100%;
|
| 60 |
+
height: 100%;
|
| 61 |
+
cursor: pointer;
|
| 62 |
+
}
|
| 63 |
.stats-container {
|
| 64 |
background: rgba(255, 255, 255, 0.1);
|
| 65 |
border-radius: 15px;
|
|
|
|
| 144 |
row1 = st.columns(5)
|
| 145 |
for i, t in enumerate(teams[:5]):
|
| 146 |
with row1[i]:
|
| 147 |
+
# Wrap the button in a styled div with the team-card class
|
| 148 |
+
st.markdown(f'<div class="team-card">', unsafe_allow_html=True)
|
| 149 |
+
if st.button(t, key=f"team_{t}_row1", help=f"Select {t}"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
st.session_state['selected_team'] = t
|
| 151 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
| 152 |
|
| 153 |
# Second row (5 teams)
|
| 154 |
row2 = st.columns(5)
|
| 155 |
for i, t in enumerate(teams[5:10]):
|
| 156 |
with row2[i]:
|
| 157 |
+
# Wrap the button in a styled div with the team-card class
|
| 158 |
+
st.markdown(f'<div class="team-card">', unsafe_allow_html=True)
|
| 159 |
+
if st.button(t, key=f"team_{t}_row2", help=f"Select {t}"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
st.session_state['selected_team'] = t
|
| 161 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
| 162 |
|
| 163 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 164 |
|