fixture / index.html
Ivanovivan0's picture
when clicking on the card it should show information of the match: like this: <section id="matchDetail" class="mb-12 hidden"> <button id="backToMatches" class="mb-4 flex items-center text-blue-600 hover:text-blue-800"> <i class="fas fa-arrow-left mr-2"></i> Back to Matches </button> <div class="bg-white rounded-xl shadow-lg overflow-hidden"> <div id="matchHeader" class="p-4 bg-blue-900 text-white"> <!-- Match header will be populated by JavaScript --> </div> <div class="p-6"> <div class="flex justify-center items-center mb-6"> <div class="text-center w-1/3"> <div class="text-2xl font-bold" id="homeTeamName">Home Team</div> <div class="text-sm text-gray-600" id="homeTeamCoach">Coach: Unknown</div> </div> <div class="text-center mx-4"> <div class="text-5xl font-bold bg-gray-100 px-8 py-4 rounded-lg" id="matchScore">0 - 0</div> <div class="text-sm mt-2" id="matchStatus">Full Time</div> </div> <div class="text-center w-1/3"> <div class="text-2xl font-bold" id="awayTeamName">Away Team</div> <div class="text-sm text-gray-600" id="awayTeamCoach">Coach: Unknown</div> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <h4 class="font-semibold mb-2 text-lg">Match Events</h4> <div class="bg-gray-50 p-4 rounded-lg"> <ul class="space-y-3" id="matchEvents"> <!-- Match events will be populated by JavaScript --> </ul> </div> </div> <div> <h4 class="font-semibold mb-2 text-lg">Match Statistics</h4> <div class="bg-gray-50 p-4 rounded-lg"> <div class="space-y-4"> <div> <div class="flex justify-between mb-1"> <span class="text-sm font-medium" id="possessionHome">Home: 50%</span> <span class="text-sm font-medium">Possession</span> <span class="text-sm font-medium" id="possessionAway">Away: 50%</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-blue-600 h-2.5 rounded-full" style="width: 50%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span class="text-sm font-medium" id="shotsHome">Home: 0</span> <span class="text-sm font-medium">Shots</span> <span class="text-sm font-medium" id="shotsAway">Away: 0</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-blue-600 h-2.5 rounded-full" style="width: 50%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span class="text-sm font-medium" id="shotsOnTargetHome">Home: 0</span> <span class="text-sm font-medium">Shots on Target</span> <span class="text-sm font-medium" id="shotsOnTargetAway">Away: 0</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-blue-600 h-2.5 rounded-full" style="width: 50%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span class="text-sm font-medium" id="cornersHome">Home: 0</span> <span class="text-sm font-medium">Corners</span> <span class="text-sm font-medium" id="cornersAway">Away: 0</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-blue-600 h-2.5 rounded-full" style="width: 50%"></div> </div> </div> <div> <div class="flex justify-between mb-1"> <span class="text-sm font-medium" id="foulsHome">Home: 0</span> <span class="text-sm font-medium">Fouls</span> <span class="text-sm font-medium" id="foulsAway">Away: 0</span> </div> <div class="w-full bg-gray-200 rounded-full h-2.5"> <div class="bg-blue-600 h-2.5 rounded-full" style="width: 50%"></div> </div> </div> </div> </div> </div> </div> </div> <div class="p-6 bg-gray-50 border-t border-gray-200"> <h4 class="font-semibold mb-4 text-lg">Lineups</h4> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <h5 class="font-medium mb-2" id="homeLineupTitle">Home Team</h5> <div class="bg-white p-4 rounded-lg shadow"> <ul class="space-y-2" id="homeLineup"> <!-- Home team lineup will be populated by JavaScript --> </ul> </div> </div> <div> <h5 class="font-medium mb-2" id="awayLineupTitle">Away Team</h5> <div class="bg-white p-4 rounded-lg shadow"> <ul class="space-y-2" id="awayLineup"> <!-- Away team lineup will be populated by JavaScript --> </ul> </div> </div> </div> </div> </div> </section> My card: import { Fixture } from '@/types/Fixture'; import React from 'react'; import '/resources/js/pages/custom.css'; interface MatchCardProps { fixture: Fixture; match_week: number; } export const MatchCardList: React.FC<MatchCardProps> = ({ fixture, match_week }) => { const date = new Date(fixture.match_date); const formattedDate = date.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric', }); const formattedTime = date.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', }); const matchTime = date.getTime(); const now = Date.now(); const isLive = matchTime <= now && now <= matchTime + 2 * 60 * 60 * 1000; const handleMatchClick = () => { const matchDetail = document.getElementById('matchDetail'); const matches = document.getElementById('matches'); if (matchDetail && matches) { matchDetail.classList.remove('hidden'); matches.classList.add('hidden'); } // Populate match detail const setText = (id: string, text: string) => { const el = document.getElementById(id); if (el) el.textContent = text; }; setText('homeTeamName', fixture.home_club.name); setText('awayTeamName', fixture.away_club.name); setText('homeTeamCoach', `Coach: ${fixture.home_club.head_coach ?? 'Unknown'}`); setText('awayTeamCoach', `Coach: ${fixture.away_club.head_coach ?? 'Unknown'}`); setText('matchScore', `${fixture.home_score} - ${fixture.away_score}`); setText('matchStatus', fixture.status); setText('matchWeekTitle', `Matchweek ${match_week} - Premier League`); }; return ( <div className="mb-1 cursor-pointer rounded-lg bg-white" onClick={handleMatchClick}> <div className="tab-content active"> <div className="border-b border-gray-200 last:border-b-0"> <div className="match-card rounded-b-lg bg-white p-4 transition duration-300"> <div className="mb-3 flex items-center justify-between"> <span className="text-sm text-gray-500"> {formattedDate} . {formattedTime} {isLive && ( <span className="ml-2 inline-flex items-center rounded-full bg-red-500 px-2 py-1 text-xs text-white">LIVE</span> )} <span className="ml-2 inline-flex items-center rounded-full bg-gray-400 px-2 py-1 text-xs text-white"> {new Date(fixture.match_date).getTime() < Date.now() ? 'Finished' : 'Upcoming'} </span> </span> </div> <div className="flex items-center justify-between text-gray-800"> <div className="flex w-1/3 items-center justify-end"> <span className="mr-3 text-right font-medium">{fixture.home_club.name}</span> <img src={fixture.home_club.crest_image || '/default-club-crest.png'} alt={fixture.home_club.name} className="team-logo h-8 w-8 rounded-full" /> </div> <div className="rounded-lg bg-gray-100 px-4 py-2 text-center"> <div className="text-2xl font-bold"> {fixture.home_score} - {fixture.away_score} </div> <div className="text-xs text-gray-500">{fixture.status}</div> </div> <div className="flex w-1/3 items-center justify-start"> <img src={fixture.away_club.crest_image || '/default-club-crest.png'} alt={fixture.away_club.name} className="team-logo h-8 w-8 rounded-full" /> <span className="ml-3 text-left font-medium">{fixture.away_club.name}</span> </div> </div> <div className="mt-4 flex justify-center space-x-4"> <span className="text-sm font-medium text-purple-900 hover:underline"> <i className="fas fa-info-circle mr-1"></i> Match Details </span> <span className="text-sm font-medium text-purple-900 hover:underline"> <i className="fas fa-chart-line mr-1"></i> Stats </span> </div> </div> </div> </div> </div> ); }; export default MatchCardList; to show in index: import Footer from '@/components/Footer'; import AppLayout from '@/layouts/app-layout'; import { BreadcrumbItem } from '@/types'; import { Fixture } from '@/types/Fixture'; import { Standing } from '@/types/Standing'; import '@fortawesome/fontawesome-free/css/all.min.css'; import { Head, router } from '@inertiajs/react'; import TopTeamStanding from '../standings/TopTeamStanding'; import MatchCardList from './MatchCardList'; import MatchFeatures from './MatchFeatures'; import '/resources/js/pages/custom.css'; interface Props { fixtures: Fixture[]; standing: Standing[]; match_week: number; max_week: number; } const breadcrumbs: BreadcrumbItem[] = [ { title: 'Fixtures', href: '/fixtures', }, ]; function Index({ fixtures, standing, match_week, max_week }: Props) { const currentWeek = Number(match_week); const handlePrevious = () => { if (currentWeek > 1) { router.get(route('fixtures.index'), { match_week: currentWeek - 1 }); } }; const handleNext = () => { if (currentWeek < max_week) { router.get(route('fixtures.index'), { match_week: currentWeek + 1 }); } }; const minDate = new Date(Math.min(...fixtures.map((f) => new Date(f.match_date).getTime()))).toLocaleDateString('en-US', { month: 'short', day: 'numeric', }); const maxDate = new Date(Math.max(...fixtures.map((f) => new Date(f.match_date).getTime()))).toLocaleDateString('en-US', { // Sat month: 'short', // Feb day: 'numeric', year: 'numeric', }); return ( <AppLayout breadcrumbs={breadcrumbs}> <Head title="Fixtures" /> <div className="gradient-bg py-12 text-start text-white"> <div className="container mx-auto px-4"> <h1 className="mb-4 text-4xl font-bold md:text-5xl">Premier League Matches</h1> <p className="mb-6 max-w-2xl text-xl">Follow all the action from the 2024/25 Premier League season</p> <div className="flex flex-col items-start justify-between space-y-4 md:flex-row md:items-center md:space-y-0"> <div className="flex items-center space-x-2"> <button onClick={handlePrevious} className="bg-opacity-20 hover:bg-opacity-30 cursor-pointer rounded-full bg-white p-2 hover:bg-gray-400" > <i className="fa-solid fa-chevron-left text-black"></i> </button> <span className="font-medium">Matchweek {currentWeek}</span> <button onClick={handleNext} disabled={currentWeek === max_week} className={`rounded-full p-2 transition ${ currentWeek === max_week ? 'bg-gray-300 text-gray-500' : 'cursor-pointer bg-white text-black hover:bg-gray-400' }`} > <i className="fa-solid fa-chevron-right" /> </button> <span className="ml-4 text-sm">{minDate === maxDate ? minDate : `${minDate} - ${maxDate}`}</span> </div> </div> </div> </div> {/* Match Tabs */} <div className="container mx-auto px-4 py-8"> <div className="mb-8 rounded-lg bg-white shadow-md"> <div className="gradient-bg flex rounded-t-lg border-b border-gray-200"> <button className="tab-btn active px-6 py-4 font-medium text-white">All Matches</button> {/* <button className="tab-btn px-6 py-4 font-medium text-white">Live Now</button> */} <button className="tab-btn px-6 py-4 font-medium text-white">Upcoming</button> <button className="tab-btn px-6 py-4 font-medium text-white">Results</button> </div> {/* Match contents */} <div className="container"> {fixtures.map((fixture) => ( <MatchCardList key={fixture.id} fixture={fixture} match_week={match_week} /> ))} </div> </div> {/* Feature */} <div className="mb-8 rounded-lg bg-white shadow-md"> <div className="gradient-bg rounded-t-lg p-4 text-white"> <h2 className="flex items-center text-xl font-bold"> <i className="fas fa-table mr-2"></i> Featured Match: Manchester City vs Chelsea </h2> </div> {/* Table */} <div className="container"> <MatchFeatures /> </div> </div> {/* Standing */} <div className="mb-8 rounded-lg bg-white shadow-md"> <div className="gradient-bg rounded-t-lg p-4 text-white"> <h2 className="flex items-center text-xl font-bold"> <i className="fas fa-table mr-2"></i> Matchweek {currentWeek} Standings </h2> </div> {/* Table */} <div className="container"> <TopTeamStanding standing={standing} /> </div> </div> </div> <Footer /> </AppLayout> ); } export default Index; - Initial Deployment
d0c7ef9 verified
Raw History Blame Contribute Delete
33.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Premier League Fixtures</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<style>
.gradient-bg {
background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}
.team-logo {
object-fit: contain;
border: 1px solid #e5e7eb;
}
.tab-btn {
transition: all 0.3s ease;
position: relative;
}
.tab-btn.active:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background-color: #ffffff;
}
.tab-btn:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.progress-bar {
background-color: #e5e7eb;
}
.progress-fill {
background-color: #2563eb;
height: 10px;
border-radius: 5px;
}
</style>
</head>
<body class="bg-gray-100">
<div id="app">
<!-- Header Section -->
<div class="gradient-bg py-12 text-start text-white">
<div class="container mx-auto px-4">
<h1 class="mb-4 text-4xl font-bold md:text-5xl">Premier League Matches</h1>
<p class="mb-6 max-w-2xl text-xl">Follow all the action from the 2024/25 Premier League season</p>
<div class="flex flex-col items-start justify-between space-y-4 md:flex-row md:items-center md:space-y-0">
<div class="flex items-center space-x-2">
<button class="bg-opacity-20 hover:bg-opacity-30 cursor-pointer rounded-full bg-white p-2 hover:bg-gray-400">
<i class="fa-solid fa-chevron-left text-black"></i>
</button>
<span class="font-medium">Matchweek 1</span>
<button class="rounded-full p-2 cursor-pointer bg-white text-black hover:bg-gray-400">
<i class="fa-solid fa-chevron-right"></i>
</button>
<span class="ml-4 text-sm">Aug 12 - Aug 14, 2024</span>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div id="matches" class="container mx-auto px-4 py-8">
<!-- Match Tabs -->
<div class="mb-8 rounded-lg bg-white shadow-md">
<div class="gradient-bg flex rounded-t-lg border-b border-gray-200">
<button class="tab-btn active px-6 py-4 font-medium text-white">All Matches</button>
<button class="tab-btn px-6 py-4 font-medium text-white">Upcoming</button>
<button class="tab-btn px-6 py-4 font-medium text-white">Results</button>
</div>
<!-- Match Cards -->
<div class="container">
<!-- Match Card 1 -->
<div class="mb-1 cursor-pointer rounded-lg bg-white" onclick="showMatchDetails('1')">
<div class="tab-content active">
<div class="border-b border-gray-200 last:border-b-0">
<div class="match-card rounded-b-lg bg-white p-4 transition duration-300">
<div class="mb-3 flex items-center justify-between">
<span class="text-sm text-gray-500">
Fri, Aug 12 . 8:00 PM
<span class="ml-2 inline-flex items-center rounded-full bg-gray-400 px-2 py-1 text-xs text-white">
Finished
</span>
</span>
</div>
<div class="flex items-center justify-between text-gray-800">
<div class="flex w-1/3 items-center justify-end">
<span class="mr-3 text-right font-medium">Arsenal</span>
<img src="https://resources.premierleague.com/premierleague/badges/25/t3.png" alt="Arsenal" class="team-logo h-8 w-8 rounded-full" />
</div>
<div class="rounded-lg bg-gray-100 px-4 py-2 text-center">
<div class="text-2xl font-bold">
2 - 1
</div>
<div class="text-xs text-gray-500">FT</div>
</div>
<div class="flex w-1/3 items-center justify-start">
<img src="https://resources.premierleague.com/premierleague/badges/25/t14.png" alt="Liverpool" class="team-logo h-8 w-8 rounded-full" />
<span class="ml-3 text-left font-medium">Liverpool</span>
</div>
</div>
<div class="mt-4 flex justify-center space-x-4">
<span class="text-sm font-medium text-purple-900 hover:underline">
<i class="fas fa-info-circle mr-1"></i> Match Details
</span>
<span class="text-sm font-medium text-purple-900 hover:underline">
<i class="fas fa-chart-line mr-1"></i> Stats
</span>
</div>
</div>
</div>
</div>
</div>
<!-- Match Card 2 -->
<div class="mb-1 cursor-pointer rounded-lg bg-white" onclick="showMatchDetails('2')">
<div class="tab-content active">
<div class="border-b border-gray-200 last:border-b-0">
<div class="match-card rounded-b-lg bg-white p-4 transition duration-300">
<div class="mb-3 flex items-center justify-between">
<span class="text-sm text-gray-500">
Sat, Aug 13 . 12:30 PM
<span class="ml-2 inline-flex items-center rounded-full bg-red-500 px-2 py-1 text-xs text-white">LIVE</span>
</span>
</div>
<div class="flex items-center justify-between text-gray-800">
<div class="flex w-1/3 items-center justify-end">
<span class="mr-3 text-right font-medium">Chelsea</span>
<img src="https://resources.premierleague.com/premierleague/badges/25/t8.png" alt="Chelsea" class="team-logo h-8 w-8 rounded-full" />
</div>
<div class="rounded-lg bg-gray-100 px-4 py-2 text-center">
<div class="text-2xl font-bold">
1 - 1
</div>
<div class="text-xs text-gray-500">56'</div>
</div>
<div class="flex w-1/3 items-center justify-start">
<img src="https://resources.premierleague.com/premierleague/badges/25/t11.png" alt="Man City" class="team-logo h-8 w-8 rounded-full" />
<span class="ml-3 text-left font-medium">Man City</span>
</div>
</div>
<div class="mt-4 flex justify-center space-x-4">
<span class="text-sm font-medium text-purple-900 hover:underline">
<i class="fas fa-info-circle mr-1"></i> Match Details
</span>
<span class="text-sm font-medium text-purple-900 hover:underline">
<i class="fas fa-chart-line mr-1"></i> Stats
</span>
</div>
</div>
</div>
</div>
</div>
<!-- Match Card 3 -->
<div class="mb-1 cursor-pointer rounded-lg bg-white" onclick="showMatchDetails('3')">
<div class="tab-content active">
<div class="border-b border-gray-200 last:border-b-0">
<div class="match-card rounded-b-lg bg-white p-4 transition duration-300">
<div class="mb-3 flex items-center justify-between">
<span class="text-sm text-gray-500">
Sun, Aug 14 . 4:30 PM
<span class="ml-2 inline-flex items-center rounded-full bg-gray-400 px-2 py-1 text-xs text-white">
Upcoming
</span>
</span>
</div>
<div class="flex items-center justify-between text-gray-800">
<div class="flex w-1/3 items-center justify-end">
<span class="mr-3 text-right font-medium">Man United</span>
<img src="https://resources.premierleague.com/premierleague/badges/25/t1.png" alt="Man United" class="team-logo h-8 w-8 rounded-full" />
</div>
<div class="rounded-lg bg-gray-100 px-4 py-2 text-center">
<div class="text-2xl font-bold">
0 - 0
</div>
<div class="text-xs text-gray-500">Not Started</div>
</div>
<div class="flex w-1/3 items-center justify-start">
<img src="https://resources.premierleague.com/premierleague/badges/25/t6.png" alt="Tottenham" class="team-logo h-8 w-8 rounded-full" />
<span class="ml-3 text-left font-medium">Tottenham</span>
</div>
</div>
<div class="mt-4 flex justify-center space-x-4">
<span class="text-sm font-medium text-purple-900 hover:underline">
<i class="fas fa-info-circle mr-1"></i> Match Details
</span>
<span class="text-sm font-medium text-purple-900 hover:underline">
<i class="fas fa-chart-line mr-1"></i> Stats
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Feature Match -->
<div class="mb-8 rounded-lg bg-white shadow-md">
<div class="gradient-bg rounded-t-lg p-4 text-white">
<h2 class="flex items-center text-xl font-bold">
<i class="fas fa-table mr-2"></i>
Featured Match: Manchester City vs Chelsea
</h2>
</div>
<!-- Feature Match Content -->
</div>
<!-- Standings -->
<div class="mb-8 rounded-lg bg-white shadow-md">
<div class="gradient-bg rounded-t-lg p-4 text-white">
<h2 class="flex items-center text-xl font-bold">
<i class="fas fa-table mr-2"></i>
Matchweek 1 Standings
</h2>
</div>
<!-- Standings Table -->
</div>
</div>
<!-- Match Details Section (Hidden by default) -->
<section id="matchDetail" class="container mx-auto px-4 py-8 hidden">
<button id="backToMatches" class="mb-4 flex items-center text-blue-600 hover:text-blue-800" onclick="hideMatchDetails()">
<i class="fas fa-arrow-left mr-2"></i> Back to Matches
</button>
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<div id="matchHeader" class="p-4 bg-blue-900 text-white">
<h2 id="matchWeekTitle" class="text-xl font-bold">Matchweek 1 - Premier League</h2>
<p id="matchDate" class="text-sm">Sat, Aug 12, 2024 • 17:30</p>
</div>
<div class="p-6">
<div class="flex justify-center items-center mb-6">
<div class="text-center w-1/3">
<div class="text-2xl font-bold" id="homeTeamName">Home Team</div>
<div class="text-sm text-gray-600" id="homeTeamCoach">Coach: Unknown</div>
</div>
<div class="text-center mx-4">
<div class="text-5xl font-bold bg-gray-100 px-8 py-4 rounded-lg" id="matchScore">0 - 0</div>
<div class="text-sm mt-2" id="matchStatus">Full Time</div>
</div>
<div class="text-center w-1/3">
<div class="text-2xl font-bold" id="awayTeamName">Away Team</div>
<div class="text-sm text-gray-600" id="awayTeamCoach">Coach: Unknown</div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h4 class="font-semibold mb-2 text-lg">Match Events</h4>
<div class="bg-gray-50 p-4 rounded-lg">
<ul class="space-y-3" id="matchEvents">
<li class="flex items-center">
<div class="w-8 text-center font-medium text-gray-500">12'</div>
<div class="flex-1 px-4">
<span class="font-medium text-red-600">⚽ Goal</span> Saka (Assist: Odegaard)
</div>
<div>
<img src="https://resources.premierleague.com/premierleague/badges/25/t3.png" alt="ARS" class="h-5">
</div>
</li>
<li class="flex items-center bg-gray-100 rounded px-2 py-1">
<div class="w-8 text-center font-medium text-gray-500">28'</div>
<div class="flex-1 px-4">
<span class="font-medium text-blue-600">🟨 Yellow Card</span> Salah
</div>
<div>
<img src="https://resources.premierleague.com/premierleague/badges/25/t14.png" alt="LIV" class="h-5">
</div>
</li>
<li class="flex items-center">
<div class="w-8 text-center font-medium text-gray-500">45'</div>
<div class="flex-1 px-4">
<span class="font-medium text-purple-600">🔄 Substitution</span> Martinelli ⬆️ Trossard ⬇️
</div>
<div>
<img src="https://resources.premierleague.com/premierleague/badges/25/t3.png" alt="ARS" class="h-5">
</div>
</li>
<li class="flex items-center bg-gray-100 rounded px-2 py-1">
<div class="w-8 text-center font-medium text-gray-500">67'</div>
<div class="flex-1 px-4">
<span class="font-medium text-red-600">⚽ Goal</span> Nunez
</div>
<div>
<img src="https://resources.premierleague.com/premierleague/badges/25/t14.png" alt="LIV" class="h-5">
</div>
</li>
<li class="flex items-center">
<div class="w-8 text-center font-medium text-gray-500">89'</div>
<div class="flex-1 px-4">
<span class="font-medium text-red-600">⚽ Goal</span> Havertz (Penalty)
</div>
<div>
<img src="https://resources.premierleague.com/premierleague/badges/25/t3.png" alt="ARS" class="h-5">
</div>
</li>
</ul>
</div>
</div>
<div>
<h4 class="font-semibold mb-2 text-lg">Match Statistics</h4>
<div class="bg-gray-50 p-4 rounded-lg">
<div class="space-y-4">
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium" id="possessionHome">Home: 57%</span>
<span class="text-sm font-medium">Possession</span>
<span class="text-sm font-medium" id="possessionAway">Away: 43%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 57%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium" id="shotsHome">Home: 14</span>
<span class="text-sm font-medium">Shots</span>
<span class="text-sm font-medium" id="shotsAway">Away: 8</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 64%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium" id="shotsOnTargetHome">Home: 6</span>
<span class="text-sm font-medium">Shots on Target</span>
<span class="text-sm font-medium" id="shotsOnTargetAway">Away: 4</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 60%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium" id="cornersHome">Home: 5</span>
<span class="text-sm font-medium">Corners</span>
<span class="text-sm font-medium" id="cornersAway">Away: 3</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 63%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium" id="foulsHome">Home: 12</span>
<span class="text-sm font-medium">Fouls</span>
<span class="text-sm font-medium" id="foulsAway">Away: 15</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 44%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="p-6 bg-gray-50 border-t border-gray-200">
<h4 class="font-semibold mb-4 text-lg">Lineups</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h5 class="font-medium mb-2" id="homeLineupTitle">Arsenal</h5>
<div class="bg-white p-4 rounded-lg shadow">
<ul class="space-y-2" id="homeLineup">
<li class="flex items-center">1. Aaron Ramsdale (GK)</li>
<li class="flex items-center">4. Ben White</li>
<li class="flex items-center">2. William Saliba</li>
<li class="flex items-center">6. Gabriel Magalhães</li>
<li class="flex items-center">3. Oleksandr Zinchenko</li>
<li class="flex items-center">5. Thomas Partey</li>
<li class="flex items-center">8. Martin Ødegaard (C)</li>
<li class="flex items-center">41. Declan Rice</li>
<li class="flex items-center">7. Bukayo Saka</li>
<li class="flex items-center">19. Leandro Trossard</li>
<li class="flex items-center">14. Eddie Nketiah</li>
</ul>
<h6 class="font-medium mt-4 text-gray-700">Substitutes</h6>
<ul class="space-y-1 text-sm mt-1">
<li>30. Matt Turner</li>
<li>16. Rob Holding</li>
<li>15. Jakub Kiwior</li>
<li>29. Kai Havertz</li>
</ul>
</div>
</div>
<div>
<h5 class="font-medium mb-2" id="awayLineupTitle">Liverpool</h5>
<div class="bg-white p-4 rounded-lg shadow">
<ul class="space-y-2" id="awayLineup">
<li class="flex items-center">1. Alisson (GK)</li>
<li class="flex items-center">66. Trent Alexander-Arnold</li>
<li class="flex items-center">5. Ibrahima Konaté</li>
<li class="flex items-center">4. Virgil van Dijk (C)</li>
<li class="flex items-center">26. Andrew Robertson</li>
<li class="flex items-center">3. Fabinho</li>
<li class="flex items-center">14. Jordan Henderson</li>
<li class="flex items-center">17. Curtis Jones</li>
<li class="flex items-center">11. Mohamed Salah</li>
<li class="flex items-center">20. Diogo Jota</li>
<li class="flex items-center">27. Darwin Núñez</li>
</ul>
<h6 class="font-medium mt-4 text-gray-700">Substitutes</h6>
<ul class="space-y-1 text-sm mt-1">
<li>13. Adrián</li>
<li>2. Joe Gomez</li>
<li>7. James Milner</li>
<li>19. Harvey Elliott</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="text-center">
<p>© 2024 Premier League. All rights reserved.</p>
</div>
</div>
</footer>
</div>
<script>
// Match data (would normally come from an API)
const matches = {
'1': {
homeTeam: 'Arsenal',
awayTeam: 'Liverpool',
score: '2 - 1',
status: 'FT',
date: 'Fri, Aug 12, 2024 • 20:00',
homeCoach: 'Mikel Arteta',
awayCoach: 'Jürgen Klopp',
possessionHome: '57%',
possessionAway: '43%',
shotsHome: '14',
shotsAway: '8',
shotsOnTargetHome: '6',
shotsOnTargetAway: '4',
cornersHome: '5',
cornersAway: '3',
foulsHome: '12',
foulsAway: '15'
},
'2': {
homeTeam: 'Chelsea',
awayTeam: 'Manchester City',
score: '1 - 1',
status: 'Live (56\')',
date: 'Sat, Aug 13, 2024 • 12:30',
homeCoach: 'Mauricio Pochettino',
awayCoach: 'Pep Guardiola',
possessionHome: '42%',
possessionAway: '58%',
shotsHome: '9',
shotsAway: '13',
shotsOnTargetHome: '4',
shotsOnTargetAway: '6',
cornersHome: '2',
cornersAway: '5',
foulsHome: '14',
foulsAway: '8'
},
'3': {
homeTeam: 'Manchester United',
awayTeam: 'Tottenham',
score: '0 - 0',
status: 'Not Started',
date: 'Sun, Aug 14, 2024 • 16:30',
homeCoach: 'Erik ten Hag',
awayCoach: 'Ange Postecoglou',
possessionHome: '0%',
possessionAway: '0%',
shotsHome: '0',
shotsAway: '0',
shotsOnTargetHome: '0',
shotsOnTargetAway: '0',
cornersHome: '0',
cornersAway: '0',
foulsHome: '0',
foulsAway: '0'
}
};
function showMatchDetails(matchId) {
const match = matches[matchId];
// Update match details
document.getElementById('homeTeamName').textContent = match.homeTeam;
document.getElementById('awayTeamName').textContent = match.awayTeam;
document.getElementById('homeTeamCoach').textContent = `Coach: ${match.homeCoach}`;
document.getElementById('awayTeamCoach').textContent = `Coach: ${match.awayCoach}`;
document.getElementById('matchScore').textContent = match.score;
document.getElementById('matchStatus').textContent = match.status;
document.getElementById('matchDate').textContent = match.date;
document.getElementById('matchWeekTitle').textContent = `Matchweek 1 - Premier League`;
// Update statistics
document.getElementById('possessionHome').textContent = `${match.homeTeam}: ${match.possessionHome}`;
document.getElementById('possessionAway').textContent = `${match.awayTeam}: ${match.possessionAway}`;
document.getElementById('shotsHome').textContent = `${match.homeTeam}: ${match.shotsHome}`;
document.getElementById('shotsAway').textContent = `${match.awayTeam}: ${match.shotsAway}`;
document.getElementById('shotsOnTargetHome').textContent = `${match.homeTeam}: ${match.shotsOnTargetHome}`;
document.getElementById('shotsOnTargetAway').textContent = `${match.awayTeam}: ${match.shotsOnTargetAway}`;
document.getElementById('cornersHome').textContent = `${match.homeTeam}: ${match.cornersHome}`;
document.getElementById('cornersAway').textContent = `${match.awayTeam}: ${match.cornersAway}`;
document.getElementById('foulsHome').textContent = `${match.homeTeam}: ${match.foulsHome}`;
document.getElementById('foulsAway').textContent = `${match.awayTeam}: ${match.foulsAway}`;
// Update lineup titles
document.getElementById('homeLineupTitle').textContent = match.homeTeam;
document.getElementById('awayLineupTitle').textContent = match.awayTeam;
// Show match details and hide matches list
document.getElementById('matchDetail').classList.remove('hidden');
document.getElementById('matches').classList.add('hidden');
}
function hideMatchDetails() {
document.getElementById('matchDetail').classList.add('hidden');
document.getElementById('matches').classList.remove('hidden');
}
</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=Ivanovivan0/fixture" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>