Spaces:
Running

test / index.html
Dragonraiser's picture
Create coach dashboard page. - Initial Deployment
921f715 verified
Raw History Blame Contribute Delete
26 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Coach Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.sidebar {
transition: all 0.3s ease;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
position: absolute;
z-index: 50;
height: 100vh;
}
.sidebar.open {
transform: translateX(0);
}
}
.stat-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
transform: rotate(-90deg);
transform-origin: 50% 50%;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Mobile menu button -->
<div class="md:hidden fixed top-4 left-4 z-50">
<button id="menuToggle" class="text-white bg-indigo-600 p-2 rounded-md focus:outline-none">
<i class="fas fa-bars text-xl"></i>
</button>
</div>
<!-- Sidebar -->
<div id="sidebar" class="sidebar gradient-bg text-white w-64 space-y-6 py-7 px-2 fixed inset-y-0 left-0">
<div class="flex items-center space-x-2 px-4">
<i class="fas fa-running text-2xl"></i>
<span class="text-2xl font-extrabold">CoachPro</span>
</div>
<nav>
<a href="#" class="flex items-center space-x-2 py-3 px-4 bg-indigo-700 rounded-md">
<i class="fas fa-tachometer-alt"></i>
<span>Dashboard</span>
</a>
<a href="#" class="flex items-center space-x-2 py-3 px-4 hover:bg-indigo-600 rounded-md transition">
<i class="fas fa-users"></i>
<span>My Athletes</span>
</a>
<a href="#" class="flex items-center space-x-2 py-3 px-4 hover:bg-indigo-600 rounded-md transition">
<i class="fas fa-calendar-alt"></i>
<span>Training Plans</span>
</a>
<a href="#" class="flex items-center space-x-2 py-3 px-4 hover:bg-indigo-600 rounded-md transition">
<i class="fas fa-chart-line"></i>
<span>Performance</span>
</a>
<a href="#" class="flex items-center space-x-2 py-3 px-4 hover:bg-indigo-600 rounded-md transition">
<i class="fas fa-comments"></i>
<span>Messages</span>
<span class="bg-red-500 text-white text-xs px-2 py-1 rounded-full">3</span>
</a>
<a href="#" class="flex items-center space-x-2 py-3 px-4 hover:bg-indigo-600 rounded-md transition">
<i class="fas fa-cog"></i>
<span>Settings</span>
</a>
</nav>
<div class="absolute bottom-0 left-0 right-0 p-4">
<div class="flex items-center space-x-4 p-3 bg-indigo-700 rounded-lg">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Coach" class="w-10 h-10 rounded-full">
<div>
<p class="font-semibold">Coach Michael</p>
<p class="text-xs text-indigo-200">michael@coachpro.com</p>
</div>
<button class="ml-auto text-indigo-200 hover:text-white">
<i class="fas fa-sign-out-alt"></i>
</button>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden md:ml-64">
<!-- Top Navigation -->
<header class="bg-white shadow-sm">
<div class="flex items-center justify-between px-6 py-4">
<h1 class="text-2xl font-bold text-gray-800">Dashboard Overview</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-600 hover:text-gray-800">
<i class="fas fa-bell text-xl"></i>
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
</button>
</div>
<div class="relative">
<button id="searchToggle" class="text-gray-600 hover:text-gray-800">
<i class="fas fa-search text-xl"></i>
</button>
<div id="searchBar" class="hidden absolute right-0 mt-2 w-64 bg-white rounded-md shadow-lg p-2">
<input type="text" placeholder="Search..." class="w-full px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
</div>
</div>
</div>
</header>
<!-- Main Content Area -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="stat-card bg-white rounded-xl shadow-md p-6 transition duration-300">
<div class="flex items-center">
<div class="p-3 rounded-full bg-indigo-100 text-indigo-600">
<i class="fas fa-users text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Active Athletes</p>
<p class="text-2xl font-semibold text-gray-800">24</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i class="fas fa-arrow-up mr-1"></i>
<span>12% from last month</span>
</div>
</div>
</div>
<div class="stat-card bg-white rounded-xl shadow-md p-6 transition duration-300">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600">
<i class="fas fa-calendar-check text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Sessions Today</p>
<p class="text-2xl font-semibold text-gray-800">8</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-red-500">
<i class="fas fa-arrow-down mr-1"></i>
<span>2 less than yesterday</span>
</div>
</div>
</div>
<div class="stat-card bg-white rounded-xl shadow-md p-6 transition duration-300">
<div class="flex items-center">
<div class="p-3 rounded-full bg-yellow-100 text-yellow-600">
<i class="fas fa-trophy text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Goals Achieved</p>
<p class="text-2xl font-semibold text-gray-800">16</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i class="fas fa-arrow-up mr-1"></i>
<span>4 this week</span>
</div>
</div>
</div>
<div class="stat-card bg-white rounded-xl shadow-md p-6 transition duration-300">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100 text-purple-600">
<i class="fas fa-comment-dots text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Unread Messages</p>
<p class="text-2xl font-semibold text-gray-800">5</p>
</div>
</div>
<div class="mt-4">
<button class="text-sm text-indigo-600 hover:text-indigo-800 font-medium">
View Messages
</button>
</div>
</div>
</div>
<!-- Charts and Activity -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<!-- Performance Chart -->
<div class="bg-white rounded-xl shadow-md p-6 lg:col-span-2">
<div class="flex items-center justify-between mb-6">
<h2 class="text-lg font-semibold text-gray-800">Athlete Performance</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 text-sm bg-indigo-100 text-indigo-600 rounded-md">Week</button>
<button class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-md">Month</button>
<button class="px-3 py-1 text-sm text-gray-600 hover:bg-gray-100 rounded-md">Year</button>
</div>
</div>
<div class="h-64">
<canvas id="performanceChart"></canvas>
</div>
</div>
<!-- Progress -->
<div class="bg-white rounded-xl shadow-md p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Training Progress</h2>
<div class="space-y-6">
<div class="flex items-center">
<div class="relative w-16 h-16">
<svg class="w-full h-full" viewBox="0 0 36 36">
<circle cx="18" cy="18" r="16" fill="none" stroke="#e6e6e6" stroke-width="2"></circle>
<circle id="progressRing1" cx="18" cy="18" r="16" fill="none" stroke="#4f46e5" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="35"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center">
<span class="text-sm font-bold text-gray-800">65%</span>
</div>
</div>
<div class="ml-4">
<p class="font-medium text-gray-800">Strength Program</p>
<p class="text-sm text-gray-500">12/18 sessions completed</p>
</div>
</div>
<div class="flex items-center">
<div class="relative w-16 h-16">
<svg class="w-full h-full" viewBox="0 0 36 36">
<circle cx="18" cy="18" r="16" fill="none" stroke="#e6e6e6" stroke-width="2"></circle>
<circle id="progressRing2" cx="18" cy="18" r="16" fill="none" stroke="#10b981" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="15"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center">
<span class="text-sm font-bold text-gray-800">85%</span>
</div>
</div>
<div class="ml-4">
<p class="font-medium text-gray-800">Endurance Training</p>
<p class="text-sm text-gray-500">17/20 sessions completed</p>
</div>
</div>
<div class="flex items-center">
<div class="relative w-16 h-16">
<svg class="w-full h-full" viewBox="0 0 36 36">
<circle cx="18" cy="18" r="16" fill="none" stroke="#e6e6e6" stroke-width="2"></circle>
<circle id="progressRing3" cx="18" cy="18" r="16" fill="none" stroke="#f59e0b" stroke-width="2" stroke-dasharray="100" stroke-dashoffset="70"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center">
<span class="text-sm font-bold text-gray-800">30%</span>
</div>
</div>
<div class="ml-4">
<p class="font-medium text-gray-800">Skill Development</p>
<p class="text-sm text-gray-500">3/10 sessions completed</p>
</div>
</div>
</div>
</div>
</div>
<!-- Recent Activity and Upcoming Sessions -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<!-- Recent Activity -->
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex items-center justify-between mb-6">
<h2 class="text-lg font-semibold text-gray-800">Recent Activity</h2>
<button class="text-sm text-indigo-600 hover:text-indigo-800 font-medium">View All</button>
</div>
<div class="space-y-4">
<div class="flex items-start">
<div class="p-2 bg-indigo-100 text-indigo-600 rounded-full">
<i class="fas fa-check"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-800">Sarah completed Strength Session #5</p>
<p class="text-xs text-gray-500">2 hours ago</p>
</div>
</div>
<div class="flex items-start">
<div class="p-2 bg-green-100 text-green-600 rounded-full">
<i class="fas fa-running"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-800">New PR for John - 225lbs Bench Press</p>
<p class="text-xs text-gray-500">5 hours ago</p>
</div>
</div>
<div class="flex items-start">
<div class="p-2 bg-blue-100 text-blue-600 rounded-full">
<i class="fas fa-calendar-plus"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-800">New athlete added - Michael</p>
<p class="text-xs text-gray-500">Yesterday</p>
</div>
</div>
<div class="flex items-start">
<div class="p-2 bg-purple-100 text-purple-600 rounded-full">
<i class="fas fa-comment"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-800">Emily sent you a message</p>
<p class="text-xs text-gray-500">Yesterday</p>
</div>
</div>
</div>
</div>
<!-- Upcoming Sessions -->
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex items-center justify-between mb-6">
<h2 class="text-lg font-semibold text-gray-800">Upcoming Sessions</h2>
<button class="text-sm text-indigo-600 hover:text-indigo-800 font-medium">View Calendar</button>
</div>
<div class="space-y-4">
<div class="flex items-center p-3 bg-indigo-50 rounded-lg">
<div class="p-2 bg-indigo-100 text-indigo-600 rounded-lg">
<i class="fas fa-dumbbell"></i>
</div>
<div class="ml-3 flex-1">
<p class="font-medium text-gray-800">Strength Training</p>
<p class="text-sm text-gray-500">With Sarah - 9:00 AM</p>
</div>
<button class="p-2 text-indigo-600 hover:bg-indigo-100 rounded-full">
<i class="fas fa-ellipsis-v"></i>
</button>
</div>
<div class="flex items-center p-3 bg-green-50 rounded-lg">
<div class="p-2 bg-green-100 text-green-600 rounded-lg">
<i class="fas fa-running"></i>
</div>
<div class="ml-3 flex-1">
<p class="font-medium text-gray-800">Speed Drills</p>
<p class="text-sm text-gray-500">With Alex - 11:30 AM</p>
</div>
<button class="p-2 text-green-600 hover:bg-green-100 rounded-full">
<i class="fas fa-ellipsis-v"></i>
</button>
</div>
<div class="flex items-center p-3 bg-yellow-50 rounded-lg">
<div class="p-2 bg-yellow-100 text-yellow-600 rounded-lg">
<i class="fas fa-swimmer"></i>
</div>
<div class="ml-3 flex-1">
<p class="font-medium text-gray-800">Swim Technique</p>
<p class="text-sm text-gray-500">With Emma - 3:00 PM</p>
</div>
<button class="p-2 text-yellow-600 hover:bg-yellow-100 rounded-full">
<i class="fas fa-ellipsis-v"></i>
</button>
</div>
<div class="flex items-center p-3 bg-purple-50 rounded-lg">
<div class="p-2 bg-purple-100 text-purple-600 rounded-lg">
<i class="fas fa-users"></i>
</div>
<div class="ml-3 flex-1">
<p class="font-medium text-gray-800">Group Session</p>
<p class="text-sm text-gray-500">Team Training - 6:00 PM</p>
</div>
<button class="p-2 text-purple-600 hover:bg-purple-100 rounded-full">
<i class="fas fa-ellipsis-v"></i>
</button>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Mobile menu toggle
const menuToggle = document.getElementById('menuToggle');
const sidebar = document.getElementById('sidebar');
menuToggle.addEventListener('click', () => {
sidebar.classList.toggle('open');
});
// Search toggle
const searchToggle = document.getElementById('searchToggle');
const searchBar = document.getElementById('searchBar');
searchToggle.addEventListener('click', () => {
searchBar.classList.toggle('hidden');
});
// Performance Chart
const ctx = document.getElementById('performanceChart').getContext('2d');
const performanceChart = new Chart(ctx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [
{
label: 'Strength',
data: [65, 59, 70, 72, 75, 78, 80],
borderColor: '#4f46e5',
backgroundColor: 'rgba(79, 70, 229, 0.05)',
tension: 0.4,
fill: true
},
{
label: 'Endurance',
data: [55, 60, 65, 70, 68, 72, 75],
borderColor: '#10b981',
backgroundColor: 'rgba(16, 185, 129, 0.05)',
tension: 0.4,
fill: true
},
{
label: 'Flexibility',
data: [40, 45, 50, 55, 60, 58, 65],
borderColor: '#f59e0b',
backgroundColor: 'rgba(245, 158, 11, 0.05)',
tension: 0.4,
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
},
},
scales: {
y: {
beginAtZero: true,
grid: {
drawBorder: false
}
},
x: {
grid: {
display: false
}
}
}
}
});
// Animate progress rings
function animateProgressRing(ringId, percent) {
const circle = document.getElementById(ringId);
const radius = circle.r.baseVal.value;
const circumference = 2 * Math.PI * radius;
const offset = circumference - (percent / 100) * circumference;
circle.style.strokeDasharray = circumference;
circle.style.strokeDashoffset = circumference;
setTimeout(() => {
circle.style.strokeDashoffset = offset;
}, 100);
}
// Initialize progress rings
document.addEventListener('DOMContentLoaded', () => {
animateProgressRing('progressRing1', 65);
animateProgressRing('progressRing2', 85);
animateProgressRing('progressRing3', 30);
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Dragonraiser/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>