This commit is contained in:
Pc
2025-04-08 22:19:54 +02:00
parent 670f995df5
commit acb68496fd
7 changed files with 164 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Lewandowski Stats{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<nav>
<a href="/">🏠 Strona główna</a> |
<a href="/mecze">📅 Mecze</a> |
<a href="/statystyki">📊 Statystyki</a> |
<button id="theme-toggle" onclick="toggleTheme()">🌙 / 🌞</button>
</nav>
<header>
<img src="{{ url_for('static', filename='lewandowski.jpg') }}" alt="Robert Lewandowski" style="width: 200px; height: auto; border-radius: 50%;">
<h1>Statystyki Roberta Lewandowskiego</h1>
</header>
<main>
{% block content %}{% endblock %}
</main>
<script>
function toggleTheme() {
const currentMode = document.body.classList.contains('dark-mode') ? 'dark' : 'light';
const newMode = currentMode === 'light' ? 'dark' : 'light';
document.body.classList.toggle('dark-mode');
localStorage.setItem('theme', newMode);
}
window.onload = function () {
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'dark') {
document.body.classList.add('dark-mode');
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,23 @@
{% extends 'base.html' %}
{% block title %}Historia meczów{% endblock %}
{% block content %}
<h2>Historia ostatnich meczów</h2>
<table>
<tr>
<th>Data</th>
<th>Przeciwnik</th>
<th>Gole</th>
<th>Asysty</th>
<th>Minuty</th>
</tr>
{% for match in matches %}
<tr>
<td>{{ match.date }}</td>
<td>{{ match.opponent }}</td>
<td>{{ match.goals }}</td>
<td>{{ match.assists }}</td>
<td>{{ match.minutes }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}Statystyki{% endblock %}
{% block content %}
<h2>Statystyki Roberta Lewandowskiego</h2>
<ul>
<li>Gole: {{ stats.goals }}</li>
<li>Asysty: {{ stats.assists }}</li>
<li>Mecze: {{ stats.matches }}</li>
</ul>
{% endblock %}