From a6e5e541fc496cb92193f67ec7f0599aab19030b Mon Sep 17 00:00:00 2001 From: Sakimori Date: Thu, 31 Dec 2020 20:40:52 -0500 Subject: [PATCH 1/2] cleaned up a print function, added check for same league --- main_controller.py | 1 - static/loader.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/main_controller.py b/main_controller.py index 78b78ae..0904c7b 100644 --- a/main_controller.py +++ b/main_controller.py @@ -32,7 +32,6 @@ def update_loop(): for game_time in game_times: 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: #is_league, bool diff --git a/static/loader.js b/static/loader.js index 5b68f62..b723104 100644 --- a/static/loader.js +++ b/static/loader.js @@ -15,7 +15,7 @@ $(document).ready(function (){ //get all leagues leagues = [] for (var key in json) { - if (json[key].is_league) { + if (json[key].is_league && !leagues.includes(json[key].leagueoruser)) { leagues.push(json[key].leagueoruser) } } From 7c8c3247375d33876f07c360f4d4fccd888725fa Mon Sep 17 00:00:00 2001 From: Sakimori Date: Thu, 31 Dec 2020 22:32:31 -0500 Subject: [PATCH 2/2] configured a single-column mobile layout display --- static/games_page.css | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/static/games_page.css b/static/games_page.css index ca1b85b..dbbaf2e 100644 --- a/static/games_page.css +++ b/static/games_page.css @@ -308,3 +308,63 @@ h2 { .base_2 { margin-bottom: -25% } + +@media only screen and (max-device-width: 800px) { + .container { + display: grid; + grid-template-columns: repeat(1, minmax(700px, 90%)); + grid-template-rows: 400px; + grid-gap: 50px 30px; /*space between rows, then columns*/ + align-items: center; + justify-items: center; + grid-auto-rows: 400px; + grid-auto-flow: row; + position: absolute; + left: 50%; + transform: translate(-50%, 0); + } + + .emptyslot { + border: none; + border-radius: 15px; + align-self: stretch; + justify-self: stretch; + text-align: center; + color: white; + flex: 1; + } + + .batting { + font-size: 15pt; + text-align: left; + height: max-content; + padding: 5px; + } + + .leagueoruser { + font-size: 15pt; + text-align: right; + height: max-content; + padding: 5px; + } + + .team_name, .score { + font-size: 23px + } + + .players { + font-size: 20px; + grid-area: players; + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + height: 100%; + padding-right: 50px; + } + + .update_emoji, .update_text { + display: inline; + font-size: 20px; + } +} \ No newline at end of file