James McCool commited on
Commit
ec05986
Β·
1 Parent(s): cf1b155

Refactor salary display in app.py to use HTML for improved formatting and alignment. This change enhances visual clarity by presenting salary and median values in a more structured manner, contributing to a better user experience in the lineup summary.

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -1035,13 +1035,23 @@ with tab4:
1035
  with col3:
1036
  if total_salary <= 50000:
1037
  st.markdown(
1038
- f"**πŸ’° Salary:** `${round(total_salary, 0)}` &nbsp; "
1039
- f"**πŸ”₯ Median:** `{round(total_median, 2)}` &nbsp; "
 
 
 
 
 
1040
  )
1041
  else:
1042
  st.markdown(
1043
- f"**❌ Salary:** `${round(total_salary, 0)}` &nbsp; "
1044
- f"**πŸ”₯ Median:** `{round(total_median, 2)}` &nbsp; "
 
 
 
 
 
1045
  )
1046
 
1047
  # Optionally, add a button to clear the lineup
 
1035
  with col3:
1036
  if total_salary <= 50000:
1037
  st.markdown(
1038
+ f"""
1039
+ <div style='text-align: right'>
1040
+ <b>πŸ’° Salary:</b> ${round(total_salary, 0)} &nbsp;
1041
+ <b>πŸ”₯ Median:</b> {round(total_median, 2)} &nbsp;
1042
+ </div>
1043
+ """,
1044
+ unsafe_allow_html=True
1045
  )
1046
  else:
1047
  st.markdown(
1048
+ f"""
1049
+ <div style='text-align: right'>
1050
+ <b>❌ Salary:</b> ${round(total_salary, 0)} &nbsp;
1051
+ <b>πŸ”₯ Median:</b> {round(total_median, 2)} &nbsp;
1052
+ </div>
1053
+ """,
1054
+ unsafe_allow_html=True
1055
  )
1056
 
1057
  # Optionally, add a button to clear the lineup