diff --git a/ProjectSourceCode/src/resources/css/scoreboard-header/game-card.css b/ProjectSourceCode/src/resources/css/scoreboard-header/game-card.css index 972d147..d6363cc 100644 --- a/ProjectSourceCode/src/resources/css/scoreboard-header/game-card.css +++ b/ProjectSourceCode/src/resources/css/scoreboard-header/game-card.css @@ -1,10 +1,17 @@ #game-card { + display: inline-block; /* Display cards as inline-block to allow them to sit next to each other */ border: 1px solid #ccc; border-radius: 4px; padding: 6px; - margin: 5px 2.5px; /* Distance between cards and container */ + margin: 6px 0px; /* Distance between cards and container */ + margin-left: 5px; min-width: 150px; + + color: white; + background-color: rgb(67, 66, 66); + border: 2px solid rgb(52, 52, 52); + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); transition: transform 0.4s ease; /* Add transition for smooth effect */ } @@ -33,7 +40,7 @@ flex: 30%; display: flex; align-items: center; - margin-left: 10px; + margin: 0px 15px; } /* Center the time in game */ diff --git a/ProjectSourceCode/src/resources/css/scoreboard-header/scoreboard.css b/ProjectSourceCode/src/resources/css/scoreboard-header/scoreboard.css index a732689..77e5ac9 100644 --- a/ProjectSourceCode/src/resources/css/scoreboard-header/scoreboard.css +++ b/ProjectSourceCode/src/resources/css/scoreboard-header/scoreboard.css @@ -1,9 +1,13 @@ .scoreboard-container { overflow-x: auto; /* Enable horizontal scrolling */ white-space: nowrap; /* Prevent cards from wrapping to the next line */ - border: 1px solid rgb(227, 225, 225); + + background-color: rgb(98, 97, 97); + + /* Inner box shadow */ + box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5); } .league-container { - display: inline-block; /* Change display property to inline-block to prevent stretching */ + display: inline-block; /* Change display property to inline-block to prevent stretching */ } diff --git a/ProjectSourceCode/src/resources/js/scoreboard-header/convert-time.js b/ProjectSourceCode/src/resources/js/scoreboard-header/convert-time.js index 1ac0895..7b826df 100644 --- a/ProjectSourceCode/src/resources/js/scoreboard-header/convert-time.js +++ b/ProjectSourceCode/src/resources/js/scoreboard-header/convert-time.js @@ -9,6 +9,9 @@ const convert_time = (req, res, next) => { if (match.minute === "FINISHED") { match.minute = "FT"; } + else if (match.minute === "TIMED") { + match.minute = "TM"; + } return match; }); diff --git a/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js b/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js index 11ece5d..08b01db 100644 --- a/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js +++ b/ProjectSourceCode/src/resources/js/scoreboard-header/current-match-routes.js @@ -13,7 +13,7 @@ const fetchMatchesData = async (req, res, next) => { const yesterday = yesterdayUnformatted.format('YYYY-MM-DD'); // Array of years to fetch matches data - const league_ids = [2021, 2002, 2014, 2019, 2015, 2013]; + const league_ids = [2021]; /* Readd , 2002, 2014, 2019, 2015, 2013 */ // Array to store all matches data let allMatches = []; @@ -21,7 +21,7 @@ const fetchMatchesData = async (req, res, next) => { // Loop through each year and fetch matches data for (const league_id of league_ids) { const response = await axios({ - url: `http://api.football-data.org/v4/competitions/${league_id}/matches`, + url: `http://api.football-data.org/v4/competitions/2021/matches`, /* Resinsert ${league_id} for 2021 */ method: 'GET', params: { dateFrom: yesterday, // Set dateFrom to yesterday's date