Test2
This commit is contained in:
42
FlaskWebProject/FlaskWebProject/templates/base.html
Normal file
42
FlaskWebProject/FlaskWebProject/templates/base.html
Normal 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>
|
||||
23
FlaskWebProject/FlaskWebProject/templates/matches.html
Normal file
23
FlaskWebProject/FlaskWebProject/templates/matches.html
Normal 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 %}
|
||||
12
FlaskWebProject/FlaskWebProject/templates/stats.html
Normal file
12
FlaskWebProject/FlaskWebProject/templates/stats.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user