Spaces:
Running
Running
James McCool
commited on
Commit
Β·
b858a5a
1
Parent(s):
cd4b2ab
Refactor mobile layout in app.py to enhance salary display by adjusting column alignment and improving HTML formatting. This change ensures consistent presentation of per player salary and leftover amounts across different screen sizes.
Browse files
app.py
CHANGED
@@ -1034,27 +1034,39 @@ with tab4:
|
|
1034 |
})
|
1035 |
summary_row = summary_row[['Salary', 'Median', 'Own%']].head(10)
|
1036 |
|
|
|
1037 |
if screen_width < 700:
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1041 |
else:
|
1042 |
-
col1
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
unsafe_allow_html=True)
|
1058 |
|
1059 |
with col3:
|
1060 |
if total_salary <= 50000:
|
|
|
1034 |
})
|
1035 |
summary_row = summary_row[['Salary', 'Median', 'Own%']].head(10)
|
1036 |
|
1037 |
+
col1, col2, col3 = st.columns([2, 1, 3])
|
1038 |
if screen_width < 700:
|
1039 |
+
with col1:
|
1040 |
+
if (10 - len(filled_lineup)) > 0:
|
1041 |
+
st.markdown(f"""
|
1042 |
+
<div style='text-align: right; vertical-align: top; margin-top: 0; padding-top: 0;''>
|
1043 |
+
<b>π° Per Player:</b> ${round((50000 - total_salary) / (10 - len(filled_lineup)), 0)}
|
1044 |
+
</div>
|
1045 |
+
""",
|
1046 |
+
unsafe_allow_html=True)
|
1047 |
+
else:
|
1048 |
+
st.markdown(f"""
|
1049 |
+
<div style='text-align: right; vertical-align: top; margin-top: 0; padding-top: 0;''>
|
1050 |
+
<b>π° Leftover:</b> ${round(50000 - total_salary, 0)}
|
1051 |
+
</div>
|
1052 |
+
""",
|
1053 |
+
unsafe_allow_html=True)
|
1054 |
else:
|
1055 |
+
with col1:
|
1056 |
+
if (10 - len(filled_lineup)) > 0:
|
1057 |
+
st.markdown(f"""
|
1058 |
+
<div style='text-align: left; vertical-align: top; margin-top: 0; padding-top: 0;''>
|
1059 |
+
<b>π° Per Player:</b> ${round((50000 - total_salary) / (10 - len(filled_lineup)), 0)}
|
1060 |
+
</div>
|
1061 |
+
""",
|
1062 |
+
unsafe_allow_html=True)
|
1063 |
+
else:
|
1064 |
+
st.markdown(f"""
|
1065 |
+
<div style='text-align: left; vertical-align: top; margin-top: 0; padding-top: 0;''>
|
1066 |
+
<b>π° Leftover:</b> ${round(50000 - total_salary, 0)}
|
1067 |
+
</div>
|
1068 |
+
""",
|
1069 |
+
unsafe_allow_html=True)
|
|
|
1070 |
|
1071 |
with col3:
|
1072 |
if total_salary <= 50000:
|