Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
updated home page with show stat leaders button
  • Loading branch information
Kudzmat authored Oct 16, 2024
1 parent 1064606 commit b5cfd6b
Showing 1 changed file with 11 additions and 33 deletions.
44 changes: 11 additions & 33 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,38 +89,16 @@ <h4 class="mt-3" style="color: #b4513e;">{{ player2 }}</h4>
</div>

<!-- NBA Stat Leaders Table -->
<div class="row mt-5">
<div class="col-12">
<h2><b>NBA Stat Leaders</b></h2>
<table class="table table-striped table-bordered table-responsive">
<thead>
<tr>
<th scope="col">Player Profile</th>
<th>Player Name</th>
<th scope="col">Category</th>
<th>Numbers</th>
</tr>
</thead>
<tbody>
{% for category, data in league_leaders.items %}
<tr>
<td>
<div class="d-flex align-items-center">
<a href="{% url 'nba_stats:player_details' player_full_name=data.0 player_id=data.4 %}">
<img src="{{ data.2 }}" style="background-color: {{ data.3 }}" class="rounded-circle img-fluid w-25" alt="Player Image">
</a>
</div>
</td>
<td><h5 class="ml-3" style="color: #b4513e;"><b>{{ data.0 }}</b></h5></td>
<td><h5 class="ml-3" style="color: #b4513e;">{{ category }}</h5></td>
<td><h5 class="ml-3" style="color: #b4513e;">{{ data.1 }}</h5></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="row mt-5" id="league-leaders">
<div class="col-12">
<h2><b>NBA Stat Leaders</b></h2>
<button class="btn btn-outline-success"
hx-get="{% url 'update_league_leaders' %}"
hx-target="#league-leaders"
hx-swap="outerHTML"
hx-trigger="click">
Show NBA Stat Leaders
</button>
</div>
</div>
{% endblock %}


0 comments on commit b5cfd6b

Please sign in to comment.