diff --git a/main_controller.py b/main_controller.py index 095d7be..51612e2 100644 --- a/main_controller.py +++ b/main_controller.py @@ -30,9 +30,10 @@ def update_loop(): states_to_send = {} game_times = iter(master_games_dic.copy().keys()) for game_time in game_times: - this_game, state = master_games_dic[game_time] + this_game, state, discrim_string = master_games_dic[game_time] test_string = this_game.gamestate_display_full() - + print(discrim_string) + state["leagueoruser"] = discrim_string state["display_inning"] = this_game.inning #games need to be initialized with the following keys in state: state["outs"] = this_game.outs #away_name state["pitcher"] = this_game.get_pitcher().name #home_name @@ -123,5 +124,6 @@ def update_loop(): global last_update last_update = states_to_send + socketio.emit("states_update", states_to_send) time.sleep(6) diff --git a/static/game.html b/static/game.html index 1e1dc91..633fa17 100644 --- a/static/game.html +++ b/static/game.html @@ -46,4 +46,5 @@
\ No newline at end of file diff --git a/static/games_page.css b/static/games_page.css index c13017f..88a9030 100644 --- a/static/games_page.css +++ b/static/games_page.css @@ -190,6 +190,18 @@ h2 { padding: 5px; } +.leagueoruser { + font-size: 10pt; + text-align: right; + height: max-content; + padding: 5px; +} + +.footer { + display: flex; + justify-content: space-between; +} + .outs { display: flex; justify-content: space-between; @@ -250,6 +262,8 @@ h2 { margin-top: 10px; } + + .update_emoji, .update_text { display: inline } diff --git a/static/loader.js b/static/loader.js index 2d7f93b..7ca2d83 100644 --- a/static/loader.js +++ b/static/loader.js @@ -103,6 +103,8 @@ $(document).ready(function (){ $('#updateTarget .update_text').html(gamestate.update_text); $('#updateTarget .batting').html((gamestate.display_top_of_inning ? gamestate.away_name : gamestate.home_name) + " batting."); + console.log(gamestate.leagueoruser) + $('#updateTarget .leagueoruser').html(gamestate.leagueoruser); gamediv.id = ""; }; diff --git a/templates/index.html b/templates/index.html index 117828e..6cfbb63 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,8 +7,8 @@