8 Commits

Author SHA1 Message Date
206f7d6fb3 Merge branch 'frontend' of https://gitea.7o7.cx/roberteam/lewangoalski into frontend 2025-06-03 09:10:08 +02:00
df0e47c610 base page style 2025-06-03 09:09:59 +02:00
3b9aa8150b feat: new last_goal_for endpoint, simple_select_all improvements
also introduces sample usage for the new endpoint in lewy_routes
2025-06-03 02:38:13 +02:00
bc557b35af header style and font changes 2025-06-03 02:01:19 +02:00
4987dc4cf7 . 2025-06-02 00:34:03 +02:00
48825185b8 begining of history section 2025-06-02 00:32:27 +02:00
42c60f9db5 style poland-mode 2025-06-01 17:55:19 +02:00
504702700c Responsive navigation menu 2025-06-01 00:06:10 +02:00
18 changed files with 906 additions and 142 deletions

View File

@@ -67,6 +67,7 @@ def setup():
app.add_url_rule('/mecze', view_func=lewy_routes.mecze)
app.add_url_rule('/statystyki', view_func=lewy_routes.statystyki)
app.add_url_rule('/toggle_dark_mode', view_func=lewy_routes.toggle_dark_mode)
app.add_url_rule('/historia', view_func=lewy_routes.historia)
# API:
app.add_url_rule('/api/', view_func=lewy_api.api_greeting)

View File

@@ -105,6 +105,20 @@ def debugger_halt(r):
breakpoint()
return 200, "ok", []
def last_goal_for(sportowiec: str = "MVC8zHZD"):
"""
Pobierz klub, dla którego sportowiec (domyślnie Robert) oddał ostatni gol.
:returns: Klub, lub None
:rtype: kluby | None
"""
sportowiec = getDb().simple_select_all("sportowcy", zewnetrzne_id_zawodnika=sportowiec)
if sportowiec != []:
return sportowiec[0].ostatni_gol_dla
return None
def lookup(data, request):
"""
Obsługuje zapytania zwrócone do /api/v1/...

View File

@@ -6,6 +6,7 @@ from sqlalchemy.orm import Mapped, mapped_column, DeclarativeBase, Session, rela
from typing import List
import time
import toml
import traceback
global db
@@ -167,18 +168,40 @@ class baza():
try:
return_val = func(self, *args, **kwargs)
except:
print( "\033[91m"
f"Wystąpił błąd podczas wykonywania zapytania SQL:"
"\033[0m"
"\n"
f"{traceback.format_exc()}")
self.session.rollback()
self.session.close()
self.refresh_session()
return return_val
return wrapper
def str_to_column(self, string: str):
"""
Zamienia tekstowy zapis "tabela.kolumna"
na obiekt modelu bazy (ze zmiennej self.entities).
Zwraca None jeśli takowego nie znajdzie.
Zamiennik dla niepożądanego eval().
:param string: Zapis tekstowy
:type string: str
"""
table_str = string[:string.find('.')]
column_str = string[string.find('.') + 1:]
if hasattr(self.entities[table_str], column_str):
return getattr(self.entities[table_str], column_str)
return None
@exit_gracefully
def simple_select_all(self, entity_type, **kwargs):
"""
Użycie:
simple_select_all(ldb.sportowcy, zewnetrzne_id_zawodnika="MVC8zHZD")
simple_select_all("sportowcy", id_zawodnika=1)
simple_select_all("kluby", ..., LIMIT=5, ORDER_BY="kluby.skrocona_nazwa")
https://stackoverflow.com/a/75316945
Did they make it harder to query dynamically on purpose? ~Frank 19.11.2023
@@ -187,18 +210,45 @@ class baza():
if not isinstance(entity_type, str):
entity_type = entity_type.__name__
# Save special arguments received with kwargs,
# that are meant for SQL operations to special_args,
# and delete from the rest, that will be passed
# directly to filter_by().
# They will not be passed as search query, but serve
# as an additional search parameter.
special_keywords = ("ORDER_BY", "ORDER_BY_DESC", "LIMIT")
special_args = {}
for arg in special_keywords:
if arg in kwargs:
special_args[arg] = kwargs[arg]
del kwargs[arg]
print(f"[{round(time.time())}] SELECT")
results = (
self.session.
query(self.entities[entity_type]).
filter_by(**kwargs).
all()
filter_by(**kwargs)
)
print(f"[{round(time.time())}] SELECT RESULTS: {results}")
if "ORDER_BY" in special_args:
column = self.str_to_column(special_args["ORDER_BY"])
if column is not None:
results = results.order_by(column)
return results
if "ORDER_BY_DESC" in special_args:
column = self.str_to_column(special_args["ORDER_BY_DESC"])
if column is not None:
results = results.order_by(column.desc())
if "LIMIT" in special_args:
results = results.limit(special_args["LIMIT"])
results_objs = results.all()
print(f"[{round(time.time())}] SELECT RESULTS: {results_objs}")
return results_objs
@exit_gracefully
def simple_insert_one(self, entity_type, **kwargs):

View File

@@ -1,8 +1,13 @@
from flask import render_template, request, make_response
import lewy_api_v1
import lewy_db
import lewy_globals
def index():
dark_mode = request.cookies.get('darkMode', 'disabled')
# Przykładowe użycie endpointu last_goal_for():
# roberts_last_goals_club = lewy_api_v1.last_goal_for()
# print(roberts_last_goals_club.id_klubu)
stats = {
'goals': 38,
'assists': 12,
@@ -34,6 +39,14 @@ def statystyki():
}
return render_template('stats.html', stats=stats)
def historia():
selected_club = request.args.get("club","FC Barcelona")
history = [
{'club': 'FC Barcelona', 'goals': 22},
{'club': 'Bayern Monachium', 'goals': 132},
]
return render_template('history.html', history=history, selected_club=selected_club)
def toggle_dark_mode():
# Przełącz tryb i zapisz w ciasteczku
dark_mode = request.cookies.get('darkMode', 'disabled')

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

View File

@@ -1,44 +1,463 @@
* {
box-sizing: border-box;
}
@font-face {
font-family: 'Exo2SemiBold';
src: url('fonts/Exo2-SemiBold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Exo2ExtraBold';
src: url('fonts/Exo2-ExtraBold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
:root {
--barca-blue: #002147;
--barca-red: #A50044;
--barca-gold: #FDB913;
--polska-red-dark: #DC143C;
--polska-red: #E30B17;
--polska-white: #FFFFFF;
--polska-section-color: #05204A;
--section-color: #051839;
--pink-highlight: #E1317E;
--blue-highlight: #00B9BF;
--yellow-highlight: #FFD23F;
--border-radius: 5px;
}
/* Podstawowy styl */
body {
font-family: 'Arial', sans-serif;
font-family: 'Exo2ExtraBold', sans-serif;
margin: 0;
padding: 0;
background: #f7f7f7;
color: #222;
background-color: var(--section-color);
color: black;
transition: all 0s ease;
display: flex;
flex-direction: column;
align-items: center; /* Wyśrodkowanie elementów w poziomie */
justify-content: flex-start; /* Ustalamy początek na górze */
align-items: stretch;
/* Wyśrodkowanie elementów w poziomie */
justify-content: flex-start;
/* Ustalamy początek na górze */
min-height: 100vh;
}
/* Styl nawigacji */
nav {
background: #d32f2f;
padding: 0px;
display: flex;
justify-content: center; /* Wyśrodkowanie linków */
/* Header */
.header-content {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 20px 0;
background: var(--section-color);
color: white;
font-size: 15px;
z-index: -2;
position: relative;
/* box-shadow: 0px -5px 10px 2px rgba(0, 0, 0, 0.347); */
}
nav a, nav button {
color: white;
text-decoration: none;
.header-content h1 {
border-bottom: 10px solid var(--barca-red);
border-radius: 10px;
padding: 5px;
animation: header-content 500ms ease;
transform: skewX(-5deg);
}
.header-content-special {
font-size: 50px;
color: var(--barca-gold);
}
.profile-image {
width: 40%;
padding: 20px;
position: relative;
}
.profile-image-cover {
background: linear-gradient(185deg, transparent 40% 60%, var(--section-color) 85%, var(--section-color) 90%);
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.profile-image img {
width: 100%;
max-width: 600px;
animation: header-content 400ms ease;
background: linear-gradient(90deg, var(--barca-blue) 50%, var(--barca-red) 50% 100%);
border-radius: var(--border-radius);
transform: skewX(2deg) skewY(0deg);
}
@keyframes header-content {
0% {
opacity: 00%;
transform: skewX(30deg);
}
100% {
opacity: 100%;
}
}
header button {
border: none;
font-size: 16px;
cursor: pointer;
width: 100%;
height: 100%;
border-radius: var(--border-radius);
}
/* Styl nawigacji */
.navbar {
background: linear-gradient(to right, #002147, #A50044);
padding: 2.3rem 1rem;
height: 1.5rem;
position: sticky;
top: 0;
left: 0;
width: 100%;
z-index: 999;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.navbar ul {
display: flex;
align-items: center;
}
.logo {
display: flex;
align-items: center;
}
.logo-text {
font-size: 1.5rem;
font-weight: bold;
background: none;
color: var(--barca-gold);
}
.logo-icon {
font-size: 2.8em;
}
.logo-link {
text-decoration: none;
}
.nav-links {
display: flex;
gap: 0rem;
list-style: none;
height: 100%;
}
.nav-links li a {
display: block;
color: white;
/* dopasowane do .navbar padding */
font-weight: 500;
border: none;
cursor: pointer;
margin: 0 15px; /* Odstęp między elementami */
align-items: center;
text-decoration: none;
border-radius: var(--border-radius);
padding: 10px 20px;
height: 100%;
transition: 100ms ease;
position: relative;
}
.nav-links li a::before {
display: flex;
justify-content: center;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0%;
font-size: 25px;
transition: 100ms ease;
}
.nav-links li:hover a::before {
opacity: 100%;
transform: translateY(-20px);
}
.nav-links li:nth-child(1) a::before {
content: "🏠";
}
.nav-links li:nth-child(2) a::before {
content: "📅";
}
.nav-links li:nth-child(3) a::before {
content: "📊";
}
.nav-links li:nth-child(4) a::before {
content: "🏆";
}
.nav-links li {
display: block;
}
.nav-links li:has(button) {
padding: 20px;
}
.nav-links li button {
width: 1.5em;
height: 1.5em;
padding: 20px;
font-size: 30px;
border-radius: 50%;
padding: 0;
margin: 0;
background-color: var(--bg-color);
border: none;
}
.nav-links li button {
background-color: var(--barca-blue);
position: relative;
overflow: hidden;
box-shadow: 0px 0px 6px 1px #FDB913;
transition: 100ms ease;
}
.nav-links li button:hover {
transform: scale(1.1, 1.1);
}
.nav-links li button::after {
content: "";
display: block;
position: absolute;
top: 0;
right: -1px;
background-color: var(--barca-red);
width: 50%;
height: 100%;
}
.nav-links li button::before {
content: "";
background: url('FC_Barcelona.png');
background-size: contain;
z-index: 1;
display: block;
position: absolute;
top: 5px;
left: 5px;
width: 80%;
height: 80%;
}
.nav-links a:hover {
background-color: var(--barca-gold, #FDB913);
color: var(--barca-blue, #002147);
}
.hamburger {
display: none;
font-size: 2rem;
color: var(--barca-gold);
cursor: pointer;
}
@media (max-width: 768px) {
.nav-links {
display: none;
flex-direction: column;
background-color: var(--barca-blue);
position: absolute;
top: 2.5rem;
right: 0rem;
padding: 0rem;
gap: 0;
width: 200px;
}
.nav-links li {
width: 100%;
}
.nav-links li a,
.nav-links li button {
display: block;
width: 100%;
text-align: left;
padding: 1rem;
margin: 0;
border-radius: 0;
/* brak zaokrągleń w mobilnym menu */
}
.nav-links.show {
display: flex;
}
.hamburger {
display: block;
}
}
/* Wyśrodkowanie głównej zawartości */
main {
padding: 0px;
display: flex;
align-items: center;
flex-direction: column;
}
.main-index {
border-radius: var(--border-radius);
margin-top: 20px;
padding: 20px;
width: 80%;
max-width: 1200px;
background-color: rgba(255, 255, 255, 0.086);
color: white;
}
.about-section {
border-radius: var(--border-radius);
background-color: var(--barca-blue);
padding: 20px;
color: white;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
grid-template-areas:
"how how"
"- about-section-image"
"- about-section-image"
"- about-section-image";
}
.about-section article h3 {
background-color: var(--barca-gold);
color: black;
text-align: center;
border-radius: var(--border-radius);
padding: 10px;
}
.about-section article h4 {
background-color: #00B9BF;
width: fit-content;
padding: 10px;
color: black;
border-radius: (--border-radius)
}
.article__how-it-works {
grid-area: how;
}
.about-section article a {
display: block;
width: 100%;
max-width: 980px; /* Maksymalna szerokość treści */
text-align: center; /* Wyśrodkowanie tekstu */
color: var(--barca-gold);
text-align: center;
}
.about-section-image {
grid-area: about-section-image;
z-index: 0;
position: relative;
}
.about-section-image::after {
content: "";
display: block;
position: absolute;
right: 0;
bottom: 0;
width: 90%;
height: 90%;
z-index: -1;
background-color: #051839;
border-radius: 20px;
}
.about-section-image img {
width: 100%;
z-index: 3;
}
.general-stats-section {
border-radius: var(--border-radius);
display: flex;
flex-direction: column;
align-items: center;
}
.general-stats-section h2 {
width: 100%;
background-color: #002147;
padding: 20px;
text-align: center;
}
.general-stats-section .grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
height: 150px;
gap: 20px;
width: 100%;
}
.general-stats-section .grid article {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 100%;
font-size: 1.3em;
}
.general-stats-section .grid article:nth-child(1){background-color: var(--blue-highlight);}
.general-stats-section .grid article:nth-child(2){background-color: var(--yellow-highlight);}
.general-stats-section .grid article:nth-child(3){background-color: var(--pink-highlight);}
.general-stats-section .grid p
{
font-size: 40px;
}
.general-stats-section .grid h3, .general-stats-section .grid p
{
margin: 0;
padding: 0;
}
/* Styl dla tabeli */
@@ -48,7 +467,8 @@ table {
margin-top: 20px;
}
th, td {
th,
td {
padding: 10px;
border-bottom: 1px solid #ccc;
text-align: center;
@@ -60,79 +480,224 @@ th, td {
height: 100px;
border-radius: 50%;
display: block;
margin: 0 auto; /* Wyśrodkowanie obrazka */
margin: 0 auto;
/* Wyśrodkowanie obrazka */
}
/* Styl dla trybu ciemnego */
body.dark-mode {
background: #121212;
color: #e0e0e0;
.section__matches
{
background-color: white;
width: 80%;
border-radius: var(--border-radius);
max-width: 1000px;
}
.section__matches h2
{
margin: 0;
border-radius: var(--border-radius);
background-color: var(--barca-gold);
padding: 20px;
text-align: center;
}
.section__matches td:nth-child(1)
{
border-radius: 25px 0 0px 25px;
}
body.dark-mode nav {
background: #333;
.section__matches td:last-child
{
border-radius: 0 25px 25px 0;
}
.section__matches th
{
font-size: 1.3em;
color: var(--barca-red)
}
.section__matches tr
{
transition: 100ms ease;
}
.section__matches tr:hover:has(:not(th))
{
transform: scale(1.05,1.05);
background-color: #00B9BF;
}
body.dark-mode table {
color: #e0e0e0;
/* Styl dla trybu polskiego */
body.poland-mode {
background-color: var(--polska-section-color);
}
body.dark-mode h1 {
color: #eaeaea;
body.poland-mode .navbar {
background: linear-gradient(to bottom, #bd4148, #dc1414);
}
body.dark-mode header button {
background-color: #444;
color: #eaeaea;
body.poland-mode .logo {
color: var(--polska-white)
}
body.dark-mode header button:hover {
background-color: #666;
body.poland-mode .logo-text {
color: white;
}
body.dark-mode ul li {
background-color: #333;
body.poland-mode .nav-links li a {
color: white;
}
body.dark-mode ul li:hover {
background-color: #444;
body.poland-mode .nav-links li a:hover {
color: #220000;
background-color: white;
}
body.poland-mode .nav-links li button::before {
background: none;
}
body.poland-mode .nav-links li button {
background-color: red;
box-shadow: 0px 0px 6px 5px rgba(109, 0, 0, 0.219);
position: relative;
overflow: hidden;
}
body.poland-mode .nav-links li button::after {
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
background-color: white;
width: 100%;
height: 50%;
}
body.poland-mode .profile-image img {
width: 100%;
animation: header-content 300ms ease;
background: linear-gradient(rgba(255, 255, 255, 0.534) 50%, rgba(255, 0, 0, 0.551) 50% 100%);
border-radius: var(--border-radius);
}
body.poland-mode .header-content-special {
font-size: 50px;
color: red;
}
body.poland-mode .header-content {
background-color: var(--polska-section-color)
}
body.poland-mode .header-content h1 {
border-bottom-color: red;
}
body.poland-mode .profile-image-cover {
background: linear-gradient(185deg, transparent 40% 60%, var(--polska-section-color) 85%, var(--polska-section-color) 90%);
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
body.poland-mode .hamburger {
color: white;
}
@media (max-width: 768px) {
body.poland-mode .nav-links {
background-color: var(--polska-red);
/*Ale oczopląs*/
}
}
body.poland-mode .section-stats {
background: linear-gradient(to bottom, #bd4148, #dc1414);
}
body.poland-mode .section-stats h2 {
color: #220000
}
body.poland-mode .stat-box {
border-color: white;
}
body.poland-mode .stat-box h3 {
color: white;
}
/* Przyciski i elementy */
header button {
padding: 10px 15px;
border: none;
background-color: #007bff;
color: white;
font-size: 16px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s;
}
header button:hover {
background-color: #0056b3;
}
/* Style dla listy meczów */
ul {
list-style: none;
padding: 0;
display: flex;
flex-direction: column;
align-items: center; /* Wyśrodkowanie listy */
}
ul li {
background-color: #eaeaea;
.section-stats {
background: linear-gradient(135deg, #002147, #A50044);
color: white;
border-radius: 20px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
padding: 2rem 2rem;
max-width: 1000px;
margin: 0 auto;
margin-bottom: 10px;
padding: 10px;
border-radius: 5px;
transition: background-color 0.3s;
width: 90%; /* Szerokość li z marginesem */
max-width: 800px; /* Maksymalna szerokość elementu */
}
ul li:hover {
background-color: #d1d1d1;
.section-stats h2 {
font-size: 2rem;
margin-bottom: 1rem;
color: var(--barca-red);
}
.stats {
display: flex;
justify-content: space-around;
text-align: center;
margin-top: 2rem;
flex-wrap: wrap;
gap: 2rem;
}
.stat-box {
background-color: rgba(255, 255, 255, 0.1);
border: 2px solid var(--barca-gold);
color: white;
padding: 2rem;
border-radius: 15px;
width: 160px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
transition: transform 0.3s ease;
}
.stat-box:hover {
transform: scale(1.1, 1.1);
}
.stat-box h3 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
color: var(--barca-gold);
}
.stat-box p {
font-size: 1.1rem;
}
.choose-club button {
height: 50px;
width: 50px;
background-color: white;
border: none;
}
.choose-club button img {
height: 40px;
width: 40px;
}
.choose-club button img:hover {
height: 45px;
width: 45px;
background-color: #ffffff7e;
}

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -13,37 +14,53 @@
<meta property="og:image:height" content="143">
<meta property="og:image:width" content="100">
</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>
<header class="base-header">
<nav class="navbar">
<a class="logo-link" href="/"><div class="logo-text">Robert Lewandowski</div></a>
<ul class="nav-links">
<li><a href="/">Strona główna</a></li>
<li><a href="/mecze">Mecze</a></li>
<li><a href="/statystyki">Statystyki</a></li>
<li><a href="/historia">Osiągnięcia</a></li>
<li><button id="theme-toggle" onclick="toggleTheme()"></button></li>
</ul>
<div class="hamburger"></div>
</nav>
<header>
<div class="header-content">
<center><img src="{{ url_for('static', filename='lewandowski.jpg') }}" alt="Robert Lewandowski" class="profile-image"></center>
<h1>Statystyki Roberta Lewandowskiego</h1>
<div class="profile-image">
<img src="{{ url_for('static', filename='lewandowski_no_bg.png') }}" alt="Robert Lewandowski">
<div class="profile-image-cover"></div>
</div>
<h1>Statystyki <br><span class="header-content-special"> Roberta <br> Lewandowskiego</span></h1>
</div>
<div></div>
</header>
<main>
{% block content %}{% endblock %}
</main>
<script>
const hamburger = document.querySelector('.hamburger');
const navLinks = document.querySelector('.nav-links');
hamburger.addEventListener('click', () => {
navLinks.classList.toggle('show');
});
</script>
<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');
const currentMode = document.body.classList.contains('poland-mode') ? 'poland' : 'fcb';
const newMode = currentMode === 'fcb' ? 'poland' : 'fcb';
document.body.classList.toggle('poland-mode');
localStorage.setItem('theme', newMode);
}
window.onload = function () {
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'dark') {
document.body.classList.add('dark-mode');
if (savedTheme === 'poland') {
document.body.classList.add('poland-mode');
}
}
</script>
@@ -53,4 +70,5 @@
{% block footer %}{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,30 @@
{% extends "base.html" %}
{% block title %}Strona Główna{% endblock %}
{% block content %}
<section class="choose-club">
<a href="{{ url_for('historia', club='FC Barcelona') }}">
<button><img src="{{ url_for('static', filename='FC_Barcelona.png') }}"></button>
</a>
<a href="{{ url_for('historia', club='Bayern Monachium') }}">
<button><img src="{{ url_for('static', filename='FC_Bayern.png') }}"></button>
</a>
</section>
<!-- Wyświetlanie danych tylko dla wybranego klubu -->
{% for stats in history %}
{% if stats.club == selected_club %}
<section class="club-stats">
<h2>{{ stats.club }} - All time stats</h2>
<div class="stats">
Gole: {{ stats.goals }}
</div>
</section>
{% endif %}
{% endfor %}
{% endblock %}
{% block footer %}
{{ commit_in_html | safe }}
{% endblock %}

View File

@@ -3,13 +3,56 @@
{% block title %}Strona Główna{% endblock %}
{% block content %}
<h2>Witaj na stronie poświęconej statystykom Roberta Lewandowskiego!</h2>
<div class="main-index">
<h2>Witaj na stronie poświęconej <br> statystykom Roberta Lewandowskiego!</h2>
<p>Tu znajdziesz najnowsze informacje o meczach, golach, asystach i innych statystykach.</p>
<div>
<h3>Ogólne statystyki:</h3>
<p>Gole: {{ goals }}</p>
<p>Asysty: {{ assists }}</p>
<p>Liczba meczów: {{ matches }}</p>
<section class="about-section">
<article class="article__how-it-works">
<h3>Jak to działa?</h3>
<h4>Pobieranie statystyk</h4>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ratione harum minus hic, voluptate perspiciatis laborum? Alias maxime, voluptate reprehenderit iusto dolorem officiis porro voluptatibus repellat dicta doloribus, blanditiis similique accusantium.</p>
<h4>Porównywanie zawodników</h4>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Fuga, in perspiciatis. Sequi laborum et animi quas sit voluptatibus alias sed ad molestias nulla vel cum, consectetur commodi odio aliquam officia.</p>
</article>
<div class="about-section-image">
<img src="{{ url_for('static', filename='gigabuła.png') }}">
</div>
<article>
<h3>Mecze</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta ullam iusto ex? Quo amet officia aliquam odio sint harum nam eaque nihil ipsa quos aliquid, illum voluptatum, numquam, magnam omnis?</p>
<a href="/mecze">Zobacz mecze</a>
</article>
<article>
<h3>Statystyki</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus dolore tenetur nulla sint recusandae illo dolores aspernatur ducimus, omnis vitae ipsam neque animi voluptates eos porro, nihil iusto veniam commodi!</p>
<a href="/statystyki">Zobacz statystyki</a>
</article>
<article>
<h3>Osiągnięcia</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod dicta veritatis quibusdam eligendi corrupti. Expedita delectus assumenda ipsum illum molestias a voluptates, voluptas quia reprehenderit, quod non, eum veritatis tenetur!</p>
<a href="/historia">Zobacz osiągnięcia</a>
</article>
</section>
<section class="general-stats-section">
<h2>Ogólne statystyki:</h3>
<div class="grid">
<article>
<h3>Gole:</h3>
<p>{{ goals }}</p>
</article>
<article>
<h3>Asysty</h3>
<p>{{ assists }}</p>
</article>
<article>
<h3>Liczba meczów</h3>
<p>{{ matches }}</p>
</article>
</div>
</section>
</div>
{% endblock %}

View File

@@ -3,6 +3,7 @@
{% block title %}Lista meczów{% endblock %}
{% block content %}
<section class="section__matches">
<h2>📅 Mecze Roberta</h2>
<table>
<tr>
@@ -22,4 +23,5 @@
</tr>
{% endfor %}
</table>
</section>
{% endblock %}

View File

@@ -3,10 +3,38 @@
{% 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>
<section class="section-stats">
<h2>All time stats</h2>
<div class="stats">
<div class="stat-box">
<h3>{{ stats.goals }}</h3>
<p>Goals</p>
</div>
<div class="stat-box">
<h3>{{ stats.assists }}</h3>
<p>Assists</p>
</div>
<div class="stat-box">
<h3>{{ stats.matches }}</h3>
<p>Apps</p>
</div>
</div>
</section>
<section class="section-stats">
<h2>All time stats</h2>
<div class="stats">
<div class="stat-box">
<h3>{{ stats.goals }}</h3>
<p>Goals</p>
</div>
<div class="stat-box">
<h3>{{ stats.assists }}</h3>
<p>Assists</p>
</div>
<div class="stat-box">
<h3>{{ stats.matches }}</h3>
<p>Apps</p>
</div>
</div>
</section>
{% endblock %}