Jon Solow commited on
Commit
04676e0
·
1 Parent(s): 71f25bb

Add colors for outcome of players

Browse files
src/pages/80_Maximum_Roster_Strategy.py CHANGED
@@ -31,11 +31,20 @@ def load_data():
31
 
32
  def get_player_grid_div(player_series: pd.Series) -> str:
33
  player_notes = player_series["Hold Condition"]
 
 
 
 
 
 
 
 
 
34
  if isinstance(player_weekly_note := player_series["Article Notes"], str):
35
  player_notes += "<br><br>" + player_weekly_note
36
  return f"""
37
  <details class="mrs-grid-player content">
38
- <summary>
39
  {player_series["Formatted"]}
40
  </summary>
41
  <p>
 
31
 
32
  def get_player_grid_div(player_series: pd.Series) -> str:
33
  player_notes = player_series["Hold Condition"]
34
+ if (outcome := player_series["Outcome"]) == "Drop":
35
+ player_class = "drop-player"
36
+ elif outcome == "Light Hold":
37
+ player_class = "light-hold-player"
38
+ elif outcome == "Hold":
39
+ player_class = "hold-player"
40
+ else:
41
+ player_class = "undetermined-player"
42
+
43
  if isinstance(player_weekly_note := player_series["Article Notes"], str):
44
  player_notes += "<br><br>" + player_weekly_note
45
  return f"""
46
  <details class="mrs-grid-player content">
47
+ <summary class="{player_class}">
48
  {player_series["Formatted"]}
49
  </summary>
50
  <p>
src/style.css CHANGED
@@ -44,6 +44,17 @@ div[data-testid="stVerticalBlock"] {
44
  border: 2px solid brown;
45
  }
46
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  .playerslot {
49
  border-left: 1px solid white;
 
44
  border: 2px solid brown;
45
  }
46
 
47
+ .drop-player {
48
+ color: red;
49
+ }
50
+
51
+ .light-hold-player {
52
+ color: yellow;
53
+ }
54
+
55
+ .hold-player {
56
+ color: green;
57
+ }
58
 
59
  .playerslot {
60
  border-left: 1px solid white;