Links added to each team in live score cards
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
overflow: hidden; /* Hide the overflowing skewed content */
|
overflow: hidden; /* Hide the overflowing skewed content */
|
||||||
transform: skewX(-20deg); /* Skew the banner to create a triangular side */
|
transform: skewX(-20deg); /* Skew the banner to create a triangular side */
|
||||||
transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transition for smooth transformation and box-shadow */
|
transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transition for smooth transformation and box-shadow */
|
||||||
cursor: pointer; /* Change cursor to pointer on hover */
|
|
||||||
|
|
||||||
transition: transform 0.4s ease; /* Add transition for smooth effect */
|
transition: transform 0.4s ease; /* Add transition for smooth effect */
|
||||||
}
|
}
|
||||||
@@ -61,11 +60,17 @@
|
|||||||
|
|
||||||
/* Container for each team in card's information */
|
/* Container for each team in card's information */
|
||||||
.team {
|
.team {
|
||||||
display: flex; /* Keeps all items in a row */
|
|
||||||
align-items: center; /* Center items vertically */
|
align-items: center; /* Center items vertically */
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.team a {
|
||||||
|
color: black;
|
||||||
|
display: flex;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.team p {
|
.team p {
|
||||||
margin: 0; /* Remove default margin */
|
margin: 0; /* Remove default margin */
|
||||||
|
|||||||
@@ -35,10 +35,12 @@ const fetchMatchesData = async (req, res, next) => {
|
|||||||
// Extract relevant data from the API response
|
// Extract relevant data from the API response
|
||||||
const matches = response.data.matches.map(match => ({
|
const matches = response.data.matches.map(match => ({
|
||||||
homeTeam: {
|
homeTeam: {
|
||||||
|
teamID: match.homeTeam.id,
|
||||||
name: match.homeTeam.tla,
|
name: match.homeTeam.tla,
|
||||||
crest: match.homeTeam.crest,
|
crest: match.homeTeam.crest,
|
||||||
},
|
},
|
||||||
awayTeam: {
|
awayTeam: {
|
||||||
|
teamID: match.awayTeam.id,
|
||||||
name: match.awayTeam.tla,
|
name: match.awayTeam.tla,
|
||||||
crest: match.awayTeam.crest,
|
crest: match.awayTeam.crest,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,15 +6,19 @@
|
|||||||
|
|
||||||
<!-- Team 1 Name with Score -->
|
<!-- Team 1 Name with Score -->
|
||||||
<div class="team">
|
<div class="team">
|
||||||
<img src="{{ homeTeam.crest }}" alt="{{ homeTeam.name }} Crest">
|
<a href="/club/{{homeTeam.teamID}}">
|
||||||
<p id="team-name">{{ homeTeam.name }}</p> <!-- {{team1.name}} -->
|
<img src="{{ homeTeam.crest }}" alt="{{ homeTeam.name }} Crest">
|
||||||
<p id="team-score">{{ score.homeScore }}</p>
|
<p id="team-name">{{ homeTeam.name }}</p> <!-- {{team1.name}} -->
|
||||||
|
<p id="team-score">{{ score.homeScore }}</p>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- Team 2 Name with Score -->
|
<!-- Team 2 Name with Score -->
|
||||||
<div class="team">
|
<div class="team">
|
||||||
<img src="{{ awayTeam.crest }}" alt="{{ awayTeam.name }} Crest">
|
<a href="/club/{{awayTeam.teamID}}">
|
||||||
<p id="team-name">{{ awayTeam.name }}</p> <!-- {{team1.name}} -->
|
<img src="{{ awayTeam.crest }}" alt="{{ awayTeam.name }} Crest">
|
||||||
<p id="team-score">{{ score.awayScore }}</p>
|
<p id="team-name">{{ awayTeam.name }}</p> <!-- {{team1.name}} -->
|
||||||
|
<p id="team-score">{{ score.awayScore }}</p>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user