From dd8d1ca12b0394ca0706e8b7760f42e7254f11b1 Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Wed, 21 Feb 2024 01:30:00 -0500 Subject: [PATCH 1/4] fix: adjust pre and final state --- app/static/styles.css | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/app/static/styles.css b/app/static/styles.css index 0048fb2..157d909 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -10,7 +10,7 @@ h1 { margin-top: 15px; margin-bottom: 25px; color: #f2f2f2; - font-size: 2em; + font-size: 2.2em; } .scoreboard { @@ -26,7 +26,7 @@ h1 { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 1%; width: 16%; - max-width: 300px; + max-width: 350px; position: relative; margin-left: 1%; margin-right: 1%; @@ -52,7 +52,7 @@ h1 { } .team-name { - font-size: 90%; + font-size: 0.95rem; font-weight: bold; } @@ -64,7 +64,7 @@ h1 { } .team-score { - font-size: 130%; + font-size: 1.35rem; font-weight: bold; margin-left: auto; } @@ -83,7 +83,7 @@ h1 { } .team-sog { - font-size: 65%; + font-size: 0.75rem; color: #ddd; } @@ -125,12 +125,12 @@ h1 { background-color: #444; padding: 1.5%; border-radius: 5px; - font-size: 0.65rem; + font-size: 0.7rem; color: #fff; font-weight: bolder; z-index: 1; width: auto; - height: 10%; + height: 7%; display: flex; justify-content: space-evenly; align-items: center; @@ -150,12 +150,15 @@ h1 { background-color: #444; padding: 1.5%; border-radius: 5px; - font-size: 65%; + font-size: 0.7rem; color: #ddd; z-index: 1; font-weight: bold; width: auto; - height: 7.5%; + height: 7%; + display: flex; + justify-content: space-evenly; + align-items: center; } .live-state { From fe7449537bcdc579e4bd31ec7d69755adfef0da3 Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Wed, 21 Feb 2024 18:34:26 -0500 Subject: [PATCH 2/4] fix: minor header adjustments --- app/static/styles.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/static/styles.css b/app/static/styles.css index 157d909..48223ce 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -7,8 +7,8 @@ body { h1 { text-align: center; - margin-top: 15px; - margin-bottom: 25px; + margin-top: 0.8%; + margin-bottom: 1.5%; color: #f2f2f2; font-size: 2.2em; } @@ -52,7 +52,7 @@ h1 { } .team-name { - font-size: 0.95rem; + font-size: 1rem; font-weight: bold; } @@ -70,7 +70,7 @@ h1 { } .team-record { - font-size: 0.75rem; + font-size: 0.8rem; font-weight: bold; margin-left: auto; } @@ -125,7 +125,7 @@ h1 { background-color: #444; padding: 1.5%; border-radius: 5px; - font-size: 0.7rem; + font-size: 0.75rem; color: #fff; font-weight: bolder; z-index: 1; From 07ff5ac055eb787d0af8e544d3a9a9708e54d17a Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Wed, 21 Feb 2024 18:40:21 -0500 Subject: [PATCH 3/4] feat: Push the games that are in intermission to the bottom, but retain their sort --- app/scoreboard/process_data.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/scoreboard/process_data.py b/app/scoreboard/process_data.py index aab6253..dc35993 100644 --- a/app/scoreboard/process_data.py +++ b/app/scoreboard/process_data.py @@ -76,7 +76,7 @@ def get_game_outcome(game, game_state): def calculate_game_priority(game): # Return 0 if game is in certain states - if game["gameState"] in ["FINAL", "OFF", "PRE", "FUT"] or game["clock"]["inIntermission"]: + if game["gameState"] in ["FINAL", "OFF", "PRE", "FUT"]: return 0 # Get standings for home and away teams @@ -121,6 +121,10 @@ def calculate_game_priority(game): # Calculate the final priority final_priority = int(base_priority + time_priority - matchup_adjustment + score_total) + # Pushes the games that are in intermission to the bottom, but retains their sort + if game["clock"]["inIntermission"]: + return (final_priority - 2000) + return final_priority def get_team_standings(team_name): From 4da3c2dfdd45dcf1fe96571a789d3902416ae44e Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Wed, 21 Feb 2024 23:42:41 -0500 Subject: [PATCH 4/4] fix: live game adjustments --- app/static/styles.css | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/static/styles.css b/app/static/styles.css index 48223ce..b234ca6 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -168,12 +168,12 @@ h1 { background-color: #0b6e31; padding: 1.5%; border-radius: 5px; - font-size: 80%; + font-size: 0.72rem; color: #fff; font-weight: bolder; z-index: 1; - width: 7.2%; - height: 7.5%; + width: 7%; + height: 7%; display: flex; justify-content: space-evenly; align-items: center; @@ -182,23 +182,23 @@ h1 { .live-time { position: absolute; top: 4%; - left: 16%; + left: 15%; background-color: #444; padding: 1.5%; border-radius: 5px; - font-size: 80%; + font-size: 0.75rem; color: #ddd; z-index: 1; display: flex; justify-content: space-evenly; align-items: center; width: 10%; - height: 7.5%; + height: 7%; } .live-state-intermission { position: absolute; - top: 5%; + top: 4%; left: 4%; background-color: #444; padding: 1.5%; @@ -207,8 +207,8 @@ h1 { color: #fff; font-weight: bolder; z-index: 1; - width: 13%; - height: 7.5%; + width: 11%; + height: 8.5%; display: flex; justify-content: space-evenly; align-items: center; @@ -216,16 +216,16 @@ h1 { .live-time-intermission { position: absolute; - top: 5%; - left: 21.5%; + top: 4%; + left: 19%; background-color: #444; padding: 1.5%; border-radius: 5px; - font-size: 80%; + font-size: 0.75rem; color: #ddd; z-index: 1; - width: 12.5%; - height: 7.5%; + width: 10%; + height: 8.5%; display: flex; justify-content: space-evenly; align-items: center;