Fixes to file structure
This commit is contained in:
147
public/views/pages/clubs-page.hbs
Normal file
147
public/views/pages/clubs-page.hbs
Normal file
@@ -0,0 +1,147 @@
|
||||
<div id="club-page-body" class="page-container">
|
||||
|
||||
<!-- Container on Top containing Club Information -->
|
||||
<div id="club-header-container" class="information-container">
|
||||
<img id="generated-page-header-logo" src="{{club.crest}}" alt="{{club.name}} Logo">
|
||||
<h1 id="generated-page-header-title">{{club.name}}</h1>
|
||||
<img id="generated-page-header-flag" src="{{club.area.club_flag}}" alt="{{club.name}} Flag">
|
||||
|
||||
{{#if user}}
|
||||
{{#if isFav}}
|
||||
<img id="club-favorite-button" src="/img/club-page/favorited.png" alt="Favorite Button">
|
||||
{{else}}
|
||||
<img id="club-favorite-button" src="/img/club-page/unfavorited.png" alt="Favorite Button">
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
<img id="club-favorite-button" src="/img/club-page/cant-favorite.png" title="Please Sign In to Save a Favorite Club!">
|
||||
{{/if}}
|
||||
|
||||
<!-- Hidden input fields -->
|
||||
<input type="hidden" id="userID" value="{{user.userid}}">
|
||||
<input type="hidden" id="teamID" value="{{club.club_id}}">
|
||||
<input type="hidden" id="teamName" value="{{club.name}}">
|
||||
<input type="hidden" id="teamLogo" value="{{club.crest}}">
|
||||
</div>
|
||||
|
||||
<div id="club-page-contents-container" class="page-content-container">
|
||||
|
||||
<!-- Container on Left Side containing Club Information -->
|
||||
<div id="club-information-container" class="page-content-container">
|
||||
|
||||
<!-- Container for Club History Information -->
|
||||
<div id="club-history-container" class="content-container">
|
||||
|
||||
<div id="club-information-table-header">
|
||||
<h2>Information</h2>
|
||||
</div>
|
||||
|
||||
<div id="club-information-table-container" class="card-container">
|
||||
<table id="club-information-table">
|
||||
<tbody>
|
||||
<!-- Club Address Container -->
|
||||
<tr>
|
||||
<td>
|
||||
<span style="font-weight: bold;">Club Address:</span><br>
|
||||
{{club.address}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Club Foundation Container -->
|
||||
<tr>
|
||||
<td>
|
||||
<span style="font-weight: bold;">Founded</span><br>
|
||||
{{club.founded}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Manager Information Table -->
|
||||
<tr>
|
||||
<td>
|
||||
<span style="font-weight: bold;">Manager</span><br>
|
||||
<span>Name: {{club.coach.name}}</span><br>
|
||||
<span>Nationality: {{club.coach.nationality}}</span><br>
|
||||
<span>DOB: {{club.coach.dateOfBirth}}</span><br>
|
||||
<span>Contract Start: {{club.coach.contract.start}}</span><br>
|
||||
<span>Contract End: {{club.coach.contract.until}}</span><br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- End of Club History Table Container -->
|
||||
</div> <!-- End of Club History Container -->
|
||||
|
||||
<!-- Container to Display Club's Current Competitions -->
|
||||
<div id="club-competitions-container" class="content-container">
|
||||
|
||||
<div id="club-competitions-table-header">
|
||||
<h2>Competitions</h2>
|
||||
</div>
|
||||
|
||||
<div id="club-competitions-table-container" class="card-container">
|
||||
<table id="club-competitions-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each club.runningCompetitions}}
|
||||
<tr>
|
||||
<td><img id="competition-logo" src="{{emblem}}"></td>
|
||||
<td>{{name}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- End of Club Competitions Table Container -->
|
||||
</div> <!-- End of Club Competitions Container -->
|
||||
|
||||
</div> <!-- End of Club Information Container (Left 20%) -->
|
||||
|
||||
<!-- Container on Right Side containing Club Stats -->
|
||||
<div id="club-stats-and-players-container" class="page-section-container">
|
||||
|
||||
<!-- Club Player Container -->
|
||||
<div id="club-players-container" class="content-container">
|
||||
|
||||
<div id="club-players-table-header" class="content-container">
|
||||
<h2>Players</h2>
|
||||
</div>
|
||||
|
||||
<div id="club-players-table-container" class="card-container">
|
||||
<table id="club-players-table" class="alternating-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>DOB</th>
|
||||
<th>Nationality</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each club.squad}}
|
||||
<tr>
|
||||
<td>{{name}}</td>
|
||||
<td>{{position}}</td>
|
||||
<td>{{dateOfBirth}}</td>
|
||||
<td>{{nationality}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- End of Club Players Table Container -->
|
||||
</div> <!-- End of Club Players Container -->
|
||||
|
||||
</div> <!-- End of Club Stats Container -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
36
public/views/pages/home.hbs
Normal file
36
public/views/pages/home.hbs
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="container mt-5" id="page-container">
|
||||
<div id="league-cards-container" class="page-section-container">
|
||||
<div class="row g-3" id="card-row">
|
||||
<!-- 🇬🇧 Premier League -->
|
||||
<a href="#" onclick="redirectToLeaguePage('2021')" class="card-link" id="league-card">
|
||||
{{> homepage/league-card leagueName="Premier League" logo="./img/homepage/premier-league/icon.png" title="./img/homepage/premier-league/title.png" }}
|
||||
</a>
|
||||
|
||||
<!-- 🇪🇸 La Liga -->
|
||||
<a href="#" onclick="redirectToLeaguePage('2014')" class="card-link" id="league-card">
|
||||
{{> homepage/league-card leagueName="La Liga" logo="./img/homepage/la-liga/icon.png" title="./img/homepage/la-liga/title.png" }}
|
||||
</a>
|
||||
|
||||
<!-- 🇩🇪 Bundesliga -->
|
||||
<a href="#" onclick="redirectToLeaguePage('2002')" class="card-link" id="league-card">
|
||||
{{> homepage/league-card leagueName="Bundesliga" logo="./img/homepage/bundesliga/icon.png" title="./img/homepage/bundesliga/title.png" }}
|
||||
</a>
|
||||
|
||||
<!-- 🇮🇹 Serie A -->
|
||||
<a href="#" onclick="redirectToLeaguePage('2019')" class="card-link" id="league-card">
|
||||
{{> homepage/league-card leagueName="Serie A" logo="./img/homepage/serie-a/icon.png" title="./img/homepage/serie-a/title.png"}}
|
||||
</a>
|
||||
|
||||
<!-- 🇫🇷 Ligue 1 -->
|
||||
<a href="#" onclick="redirectToLeaguePage('2015')" class="card-link" id="league-card">
|
||||
{{> homepage/league-card leagueName="Ligue 1" logo="./img/homepage/ligue-1/icon.png" title="./img/homepage/ligue-1/title.png" }}
|
||||
</a>
|
||||
|
||||
<!-- 🇧🇷 Brasileirao -->
|
||||
<a href="#" onclick="redirectToLeaguePage('2013')" class="card-link" id="league-card">
|
||||
{{> homepage/league-card leagueName="Brasileirao" logo="./img/homepage/brasileirao/icon.png" title="./img/homepage/brasileirao/title.png" }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
90
public/views/pages/leagues-page.hbs
Normal file
90
public/views/pages/leagues-page.hbs
Normal file
@@ -0,0 +1,90 @@
|
||||
<div id="league-page-body" class="page-container">
|
||||
|
||||
<!-- Container for all league information (logo, name, country, etc. ) <- top 100px -->
|
||||
<div id="league-header-container" class="information-container">
|
||||
<img id="generated-page-header-logo" src="{{league.competition.league_emblem}}" alt="{{league.competition.league_name}} Emblem">
|
||||
<h1 id="generated-page-header-title">{{league.competition.league_name}}</h2>
|
||||
<img id="generated-page-header-flag" src="{{league.area.league_flag}}" alt="{{league.competition.league_name}} Flag">
|
||||
</div>
|
||||
|
||||
<!-- Container to display all stats for league <- bottom rest of the container -->
|
||||
<div id="table-and-top-scorers-containers" class="page-content-container">
|
||||
|
||||
<!-- Container to display league table <- split 50% -->
|
||||
<div id="league-table-container" class="content-container">
|
||||
|
||||
<!-- Put header above table container -->
|
||||
<div id="league-table-header-container" class="header-container">
|
||||
<h2>Table</h2>
|
||||
</div>
|
||||
|
||||
<!-- Container containing all league table stats -->
|
||||
<div id="league-table-stats-container" class="card-container">
|
||||
<table id="league-standings-table" class="alternating-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th>Club</th>
|
||||
<th>GP</th>
|
||||
<th>W</th>
|
||||
<th>L</th>
|
||||
<th>D</th>
|
||||
<th>GD</th>
|
||||
<th>Pts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each league.standings}}
|
||||
<tr>
|
||||
<td>{{table.league_position}}</td>
|
||||
<td id="league-table-club-logo-column"><img id="league-table-club-logo" clubID="{{table.team_id}}" src="{{table.team_crest}}" alt="{{table.team_name}} Crest"></td>
|
||||
<td><span id="league-table-club-name-column" clubID="{{table.team_id}}">{{table.team_name}}</span></td>
|
||||
<td>{{games_played}}</td>
|
||||
<td>{{wins}}</td>
|
||||
<td>{{losses}}</td>
|
||||
<td>{{draws}}</td>
|
||||
<td id="league-table-goal-difference-column">{{goal_difference}}</td>
|
||||
<td id="league-table-points-column">{{points}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Container to display top scorers for league <- Split 50% -->
|
||||
<div id="league-top-scorers-container" class="content-container">
|
||||
|
||||
<div id="league-top-scorers-header-container" class="header-container">
|
||||
<h2>Top Scorers</h2>
|
||||
</div>
|
||||
|
||||
<div id="league-top-scorers-stats-container" class="card-container">
|
||||
<table id="league-top-scorers-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Goals</th>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Club</th>
|
||||
<th>GP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each topScorers.scorers}}
|
||||
<tr id="top-scorers-row">
|
||||
<td id="league-top-scorers-goals-column">{{goals}}</td>
|
||||
<td><img id="league-top-scorers-logo" clubID="{{team.team_id}}" src="{{team.team_crest}}" alt="{{table.team_name}} Crest"></img></td>
|
||||
<td id="league-top-scorers-player-name-column">{{player.player_name}}</td>
|
||||
<td id="league-top-scorers-club-name-column" clubID="{{team.team_id}}">{{team.team_name}}</td>
|
||||
<td>{{games_played}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user