forked from lucaspatenaude/ScoreSpot
club homepage complete
This commit is contained in:
@@ -4,6 +4,30 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#club-page-body {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
#club-crest {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#club-area-flag-row {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#club-area-flag {
|
||||
width : 150px;
|
||||
}
|
||||
|
||||
#club-players-container {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
#top-scorers-container {
|
||||
padding : 30px
|
||||
}
|
||||
|
||||
#club-information-container {
|
||||
height: 100px;
|
||||
width: fit-content;
|
||||
@@ -31,8 +55,9 @@
|
||||
}
|
||||
|
||||
#club-logo {
|
||||
margin: 0px 30px;
|
||||
margin: 0px 20px;
|
||||
transform: skewX(20deg); /* Skew the banner to create a triangular side */
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
#club-title {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
}
|
||||
|
||||
/* Table that holds all the standing information */
|
||||
#standings-table
|
||||
#standings-table, .table
|
||||
{
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
@@ -43,7 +43,8 @@
|
||||
/* Data in Row Style */
|
||||
td
|
||||
{
|
||||
padding: 5px;
|
||||
padding: 15px;
|
||||
|
||||
}
|
||||
|
||||
/* Every Odd Row in Table Style */
|
||||
|
||||
@@ -7,7 +7,7 @@ const fetchLeagueScorerData = async (req, res, next) => {
|
||||
const leagueID = req.params.leagueID;
|
||||
|
||||
// Make GET request to the API endpoint using the league ID
|
||||
const response = await axios.get(`http://api.football-data.org/v4/competitions/${leagueID}/scorers?season&limit=20`, {
|
||||
const response = await axios.get(`http://api.football-data.org/v4/teams/${teamID}/scorers?limit=5`, {
|
||||
headers: {
|
||||
'X-Auth-Token': '0aa1ed31245d4a36b1ef5a79150324b3', // Add your API key here
|
||||
},
|
||||
@@ -19,17 +19,9 @@ const fetchLeagueScorerData = async (req, res, next) => {
|
||||
// Attach the data to res.locals
|
||||
res.locals.topScorers = {
|
||||
scorers: scorerData.scorers.map(player => ({
|
||||
player: {
|
||||
player_id: player.player.id,
|
||||
player_name: player.player.name,
|
||||
},
|
||||
team: {
|
||||
team_id: player.player.id,
|
||||
team_name: player.team.name,
|
||||
team_crest: player.team.crest,
|
||||
},
|
||||
games_played: player.playedMatches,
|
||||
goals: player.goals,
|
||||
playerID: scorer.player.id,
|
||||
playerName: scorer.player.name,
|
||||
goals: scorer.numberOfGoals,
|
||||
}))
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user