hoopstats-tracker / stats.html
cometryai's picture
import React, { useState, useEffect } from ‘react’;
c8fe9c8 verified
Raw History Blame Contribute Delete
13.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Player Stats - HoopStats Tracker</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-8">
<div class="max-w-6xl mx-auto">
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8">
<h1 class="text-3xl font-bold text-white mb-4 md:mb-0">Player Statistics</h1>
<div class="flex gap-4 w-full md:w-auto">
<select class="bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 text-white focus:ring-2 focus:ring-primary-500 focus:outline-none transition w-full md:w-64">
<option>All Players</option>
<option selected>Shai Gilgeous-Alexander</option>
<option>LeBron James</option>
<option>Stephen Curry</option>
</select>
<select class="bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 text-white focus:ring-2 focus:ring-primary-500 focus:outline-none transition w-full md:w-48">
<option>Last 10 Games</option>
<option selected>Season</option>
<option>Last 5 Games</option>
<option>Custom Range</option>
</select>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<!-- Summary Cards -->
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-semibold text-white">PRA Average</h2>
<div class="bg-primary-500/20 p-2 rounded-lg">
<i data-feather="activity" class="text-primary-500"></i>
</div>
</div>
<div class="text-4xl font-bold text-primary-500 mb-2">49.2</div>
<div class="text-sm text-gray-400">+2.4 from last 10 games</div>
</div>
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-semibold text-white">Points</h2>
<div class="bg-yellow-500/20 p-2 rounded-lg">
<i data-feather="target" class="text-yellow-500"></i>
</div>
</div>
<div class="text-4xl font-bold text-yellow-500 mb-2">31.5</div>
<div class="text-sm text-gray-400">+1.8 from last 10 games</div>
</div>
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-semibold text-white">Rebounds + Assists</h2>
<div class="bg-purple-500/20 p-2 rounded-lg">
<i data-feather="award" class="text-purple-500"></i>
</div>
</div>
<div class="text-4xl font-bold text-purple-500 mb-2">17.7</div>
<div class="text-sm text-gray-400">+0.6 from last 10 games</div>
</div>
</div>
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700 mb-8">
<h2 class="text-2xl font-bold text-white mb-6">Recent Performance</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-700">
<thead>
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Date</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Opponent</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Result</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Points</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Rebounds</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">Assists</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">PRA</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-700">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-300">May 12</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-white font-medium">@ DAL</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">W 112-108</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-400">34</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-purple-400">8</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">12</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-cyan-400 font-bold">54</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-300">May 10</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-white font-medium">vs DAL</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-red-400">L 98-105</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-400">28</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-purple-400">5</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">7</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-cyan-400 font-bold">40</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-300">May 8</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-white font-medium">@ LAC</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">W 118-110</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-400">31</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-purple-400">7</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">9</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-cyan-400 font-bold">47</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-300">May 6</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-white font-medium">vs LAC</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">W 105-100</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-400">29</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-purple-400">6</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">8</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-cyan-400 font-bold">43</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-300">May 4</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-white font-medium">@ PHX</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-red-400">L 112-120</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-400">33</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-purple-400">5</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-400">7</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-cyan-400 font-bold">45</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<h2 class="text-2xl font-bold text-white mb-6">Opponent Breakdown</h2>
<div class="space-y-4">
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-300">Dallas Mavericks</span>
<span class="text-sm font-bold text-cyan-400">51.2 PRA</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2.5">
<div class="bg-cyan-500 h-2.5 rounded-full" style="width: 85%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-300">LA Clippers</span>
<span class="text-sm font-bold text-cyan-400">47.5 PRA</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2.5">
<div class="bg-cyan-500 h-2.5 rounded-full" style="width: 79%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-300">Phoenix Suns</span>
<span class="text-sm font-bold text-cyan-400">45.0 PRA</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-2.5">
<div class="bg-cyan-500 h-2.5 rounded-full" style="width: 75%"></div>
</div>
</div>
</div>
</div>
<div class="bg-gray-800 rounded-xl p-6 border border-gray-700">
<h2 class="text-2xl font-bold text-white mb-6">Home vs Away</h2>
<div class="flex justify-between items-center mb-4">
<div>
<div class="text-sm text-gray-400">Home Games</div>
<div class="text-2xl font-bold text-white">48.5 PRA</div>
</div>
<div class="w-24 h-24">
<!-- This would be replaced with a chart in a real implementation -->
<div class="rounded-full bg-cyan-900/30 border-8 border-cyan-500 w-full h-full flex items-center justify-center">
<span class="text-xl font-bold text-white">32</span>
</div>
</div>
</div>
<div class="flex justify-between items-center">
<div>
<div class="text-sm text-gray-400">Away Games</div>
<div class="text-2xl font-bold text-white">49.8 PRA</div>
</div>
<div class="w-24 h-24">
<!-- This would be replaced with a chart in a real implementation -->
<div class="rounded-full bg-purple-900/30 border-8 border-purple-500 w-full h-full flex items-center justify-center">
<span class="text-xl font-bold text-white">28</span>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
</script>
</body>
</html>