Styling added to cards
This commit is contained in:
@@ -1,11 +1,18 @@
|
|||||||
#game-card {
|
#game-card {
|
||||||
|
|
||||||
display: inline-block; /* Display cards as inline-block to allow them to sit next to each other */
|
display: inline-block; /* Display cards as inline-block to allow them to sit next to each other */
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 6px;
|
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;
|
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 */
|
transition: transform 0.4s ease; /* Add transition for smooth effect */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +40,7 @@
|
|||||||
flex: 30%;
|
flex: 30%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: 10px;
|
margin: 0px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Center the time in game */
|
/* Center the time in game */
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
.scoreboard-container {
|
.scoreboard-container {
|
||||||
overflow-x: auto; /* Enable horizontal scrolling */
|
overflow-x: auto; /* Enable horizontal scrolling */
|
||||||
white-space: nowrap; /* Prevent cards from wrapping to the next line */
|
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 {
|
.league-container {
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ const convert_time = (req, res, next) => {
|
|||||||
if (match.minute === "FINISHED") {
|
if (match.minute === "FINISHED") {
|
||||||
match.minute = "FT";
|
match.minute = "FT";
|
||||||
}
|
}
|
||||||
|
else if (match.minute === "TIMED") {
|
||||||
|
match.minute = "TM";
|
||||||
|
}
|
||||||
return match;
|
return match;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const fetchMatchesData = async (req, res, next) => {
|
|||||||
const yesterday = yesterdayUnformatted.format('YYYY-MM-DD');
|
const yesterday = yesterdayUnformatted.format('YYYY-MM-DD');
|
||||||
|
|
||||||
// Array of years to fetch matches data
|
// 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
|
// Array to store all matches data
|
||||||
let allMatches = [];
|
let allMatches = [];
|
||||||
@@ -21,7 +21,7 @@ const fetchMatchesData = async (req, res, next) => {
|
|||||||
// Loop through each year and fetch matches data
|
// Loop through each year and fetch matches data
|
||||||
for (const league_id of league_ids) {
|
for (const league_id of league_ids) {
|
||||||
const response = await axios({
|
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',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
dateFrom: yesterday, // Set dateFrom to yesterday's date
|
dateFrom: yesterday, // Set dateFrom to yesterday's date
|
||||||
|
|||||||
Reference in New Issue
Block a user