James McCool commited on
Commit
cd4b2ab
Β·
1 Parent(s): 124a409

Refactor HTML styling in app.py for salary display to improve alignment and visual consistency. Adjusted vertical alignment and margin properties for better presentation of player salary and leftover amounts in the lineup summary.

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1043,14 +1043,14 @@ with tab4:
1043
  with col1:
1044
  if (10 - len(filled_lineup)) > 0:
1045
  st.markdown(f"""
1046
- <div style='text-align: left'>
1047
  <b>πŸ’° Per Player:</b> ${round((50000 - total_salary) / (10 - len(filled_lineup)), 0)} &nbsp;
1048
  </div>
1049
  """,
1050
  unsafe_allow_html=True)
1051
  else:
1052
  st.markdown(f"""
1053
- <div style='text-align: left'>
1054
  <b>πŸ’° Leftover:</b> ${round(50000 - total_salary, 0)} &nbsp;
1055
  </div>
1056
  """,
@@ -1060,7 +1060,7 @@ with tab4:
1060
  if total_salary <= 50000:
1061
  st.markdown(
1062
  f"""
1063
- <div style='text-align: right'>
1064
  <b>πŸ’° Salary:</b> ${round(total_salary, 0)} &nbsp;
1065
  <b>πŸ”₯ Median:</b> {round(total_median, 2)} &nbsp;
1066
  </div>
@@ -1070,7 +1070,7 @@ with tab4:
1070
  else:
1071
  st.markdown(
1072
  f"""
1073
- <div style='text-align: right'>
1074
  <b>❌ Salary:</b> ${round(total_salary, 0)} &nbsp;
1075
  <b>πŸ”₯ Median:</b> {round(total_median, 2)} &nbsp;
1076
  </div>
 
1043
  with col1:
1044
  if (10 - len(filled_lineup)) > 0:
1045
  st.markdown(f"""
1046
+ <div style='text-align: left; vertical-align: top; margin-top: 0; padding-top: 0;''>
1047
  <b>πŸ’° Per Player:</b> ${round((50000 - total_salary) / (10 - len(filled_lineup)), 0)} &nbsp;
1048
  </div>
1049
  """,
1050
  unsafe_allow_html=True)
1051
  else:
1052
  st.markdown(f"""
1053
+ <div style='text-align: left; vertical-align: top; margin-top: 0; padding-top: 0;''>
1054
  <b>πŸ’° Leftover:</b> ${round(50000 - total_salary, 0)} &nbsp;
1055
  </div>
1056
  """,
 
1060
  if total_salary <= 50000:
1061
  st.markdown(
1062
  f"""
1063
+ <div style='text-align: right; vertical-align: top; margin-top: 0; padding-top: 0;''>
1064
  <b>πŸ’° Salary:</b> ${round(total_salary, 0)} &nbsp;
1065
  <b>πŸ”₯ Median:</b> {round(total_median, 2)} &nbsp;
1066
  </div>
 
1070
  else:
1071
  st.markdown(
1072
  f"""
1073
+ <div style='text-align: right; vertical-align: top; margin-top: 0; padding-top: 0;''>
1074
  <b>❌ Salary:</b> ${round(total_salary, 0)} &nbsp;
1075
  <b>πŸ”₯ Median:</b> {round(total_median, 2)} &nbsp;
1076
  </div>