static data for page
This commit is contained in:
@@ -2,13 +2,14 @@ from flask import render_template, request, make_response
|
||||
import lewy_api_v1
|
||||
import lewy_db
|
||||
import lewy_globals
|
||||
import json
|
||||
|
||||
def get_lewy_stats():
|
||||
return {
|
||||
'all_time_stats': {
|
||||
'goals': 589+78,
|
||||
'assists':154+21,
|
||||
'matches': 791+136,
|
||||
'goals': 589+85,
|
||||
'assists':154+35,
|
||||
'matches': 791+158,
|
||||
},
|
||||
'club_stats': {
|
||||
'goals': 589,
|
||||
@@ -16,9 +17,9 @@ def get_lewy_stats():
|
||||
'matches': 791,
|
||||
},
|
||||
'nation_stats': {
|
||||
'goals': 78,
|
||||
'assists': 21,
|
||||
'matches': 136,
|
||||
'goals': 85,
|
||||
'assists': 35,
|
||||
'matches': 158,
|
||||
},
|
||||
'international_cups': {
|
||||
'goals': 110,
|
||||
@@ -58,30 +59,12 @@ def index():
|
||||
|
||||
def mecze():
|
||||
# Możesz dostarczyć szczegóły dotyczące meczów
|
||||
selected_date = request.args.get("date", 2024)
|
||||
matches = [
|
||||
{'date': '2024-10-12', 'opponent': 'Real Madrid', 'goals': 2, 'assists': 1, 'minutes': 90},
|
||||
{'date': '2024-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2023-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2023-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2023-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2022-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2022-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2022-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2022-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2021-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2021-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2021-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2021-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2020-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2020-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2020-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2019-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2019-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
{'date': '2019-10-19', 'opponent': 'Valencia', 'goals': 1, 'assists': 0, 'minutes': 85},
|
||||
|
||||
]
|
||||
return render_template('matches.html', matches=matches)
|
||||
selected_date = request.args.get("date", '2024')
|
||||
with open("static/lewandowski_matches.json", "r") as file:
|
||||
data = json.load(file)
|
||||
matches = data["data"]
|
||||
|
||||
return render_template('matches.html', matches=matches, selected_date=selected_date)
|
||||
|
||||
def statystyki():
|
||||
dane=get_lewy_stats()
|
||||
@@ -114,13 +97,83 @@ def compare():
|
||||
selected_player = request.args.get("player","Leo Messi")
|
||||
lewy=get_lewy_stats()
|
||||
player2 = [
|
||||
{'name':'Leo Messi','goals': 34,'assists': 12},
|
||||
{'name':'Leo Messi','goals': 865,'assists': 384,'matches':1103},
|
||||
{'name':'Cristiano Ronaldo','goals': 937,'assists': 257,'matches':1280},
|
||||
{'name':'Kylian Mbappé','goals': 330,'assists': 187,'matches':436},
|
||||
{'name':'Zlatan Ibrahimović','goals': 573,'assists': 200,'matches':988},
|
||||
{'name':'Luis Suárez','goals': 511,'assists': 277,'matches':858},
|
||||
{'name':'Erling Haaland','goals': 276,'assists': 49,'matches':342},
|
||||
{'name':'Karim Benzema','goals': 438,'assists': 160,'matches':820},
|
||||
{'name':'Sergio Agüero','goals': 385,'assists': 118,'matches':685},
|
||||
]
|
||||
return render_template('compare.html',player2=player2, selected_player=selected_player,**lewy, )
|
||||
def trophies():
|
||||
trophy = [
|
||||
{'name': 'asdasd', 'year': 2023},
|
||||
{'name': 'ssss', 'sezon': '2022/2023'},
|
||||
{'name': 'Piłkarz Roku FIFA', 'year':'2021'},
|
||||
{'name': 'Piłkarz Roku FIFA', 'year':'2020'},
|
||||
{'name': 'UEFA Best Player in Europe', 'year':'2020'},
|
||||
{'name': 'Zdobywca Złotego Buta (Europe)', 'sezon':'2021/2022'},
|
||||
{'name': 'Zdobywca Złotego Buta (Europe)', 'sezon':'2020/2021'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2021'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2021'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2020'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2020'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2019'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2017'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2016'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2015'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2014'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2013'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2012'},
|
||||
{'name': 'Piłkarz roku', 'sezon':'2011'},
|
||||
{'name': 'Król strzelców', 'sezon':'2022/2023'},
|
||||
{'name': 'Król strzelców', 'sezon':'2021/2022'},
|
||||
{'name': 'Król strzelców', 'sezon':'2020/2021'},
|
||||
{'name': 'Król strzelców', 'sezon':'2019/2020'},
|
||||
{'name': 'Król strzelców', 'sezon':'2019/2020'},
|
||||
{'name': 'Król strzelców', 'sezon':'2018/2019'},
|
||||
{'name': 'Król strzelców', 'sezon':'2018/2019'},
|
||||
{'name': 'Król strzelców', 'sezon':'2017/2018'},
|
||||
{'name': 'Król strzelców', 'sezon':'2017/2018'},
|
||||
{'name': 'Król strzelców', 'sezon':'2016/2017'},
|
||||
{'name': 'Król strzelców', 'sezon':'2016/2017'},
|
||||
{'name': 'Król strzelców', 'sezon':'2015/2016'},
|
||||
{'name': 'Król strzelców', 'sezon':'2015/2016'},
|
||||
{'name': 'Król strzelców', 'sezon':'2013/2014'},
|
||||
{'name': 'Król strzelców', 'sezon':'2011/2012'},
|
||||
{'name': 'Król strzelców', 'sezon':'2009/2010'},
|
||||
{'name': 'Zdobywca Ligi Mistrzów', 'sezon':'2019/2020'},
|
||||
{'name': 'Zdobywca Klubowych Mistrzostw Świata', 'sezon':'2021'},
|
||||
{'name': 'Mistrz Hiszpanii', 'sezon':'2024/2025'},
|
||||
{'name': 'Mistrz Hiszpanii', 'sezon':'2022/2023'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2021/2022'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2020/2021'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2019/2020'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2018/2019'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2017/2018'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2016/2017'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2015/2016'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2014/2015'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2011/2012'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2010/2011'},
|
||||
{'name': 'Mistrz Niemiec', 'sezon':'2020/2021'},
|
||||
{'name': 'Zdobywca Superpucharu UEFA', 'sezon':'2020/2021'},
|
||||
{'name': 'Zdobywca Pucharu Niemiec', 'sezon':'2019/2020'},
|
||||
{'name': 'Zdobywca Pucharu Niemiec', 'sezon':'2018/2019'},
|
||||
{'name': 'Zdobywca Pucharu Niemiec', 'sezon':'2015/2016'},
|
||||
{'name': 'Zdobywca Pucharu Niemiec', 'sezon':'2011/2012'},
|
||||
{'name': 'Zdobywca Pucharu Hiszpanii', 'sezon':'2024/2025'},
|
||||
{'name': 'Zdobywca Superpucharu Niemiec', 'sezon':'2021/2022'},
|
||||
{'name': 'Zdobywca Superpucharu Niemiec', 'sezon':'2020/2021'},
|
||||
{'name': 'Zdobywca Superpucharu Niemiec', 'sezon':'2018/2019'},
|
||||
{'name': 'Zdobywca Superpucharu Niemiec', 'sezon':'2017/2018'},
|
||||
{'name': 'Zdobywca Superpucharu Niemiec', 'sezon':'2016/2017'},
|
||||
{'name': 'Zdobywca Superpucharu Niemiec', 'sezon':'2013/2014'},
|
||||
{'name': 'Zdobywca Superpucharu Hiszpanii', 'sezon':'2024/2025'},
|
||||
{'name': 'Zdobywca Superpucharu Hiszpanii', 'sezon':'2022/2023'},
|
||||
{'name': 'Mistrz Polski', 'sezon':'2009/2010'},
|
||||
{'name': 'Zdobywca Superpucharu Polski', 'sezon': '2009/2010'},
|
||||
{'name': 'Zdobywca Pucharu Polski', 'sezon': '2008/2009'},
|
||||
]
|
||||
return render_template('trophies.html',trophy=trophy)
|
||||
|
||||
|
||||
11421
FlaskWebProject/FlaskWebProject/static/lewandowski_matches.json
Normal file
11421
FlaskWebProject/FlaskWebProject/static/lewandowski_matches.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -716,6 +716,26 @@ body.poland-mode .general-stats-section .grid article:nth-child(2){background-co
|
||||
body.poland-mode .general-stats-section .grid article:nth-child(3){background-color: var(--barca-blue);}
|
||||
body.poland-mode .about-section-image::after{
|
||||
background:var(--polska-red-dark);
|
||||
}
|
||||
body.poland-mode .section__matches
|
||||
{
|
||||
background-color: white;
|
||||
}
|
||||
body.poland-mode .section__matches h2
|
||||
{
|
||||
background-color: var(--polska-red);
|
||||
color: white;
|
||||
}
|
||||
body.poland-mode .section__matches th
|
||||
{
|
||||
color: var(--barca-red)
|
||||
}
|
||||
body.poland-mode .section__matches tr:hover:has(:not(th))
|
||||
{
|
||||
background-color: #ff5959;
|
||||
}
|
||||
body.poland-mode select{
|
||||
background:var(--section-color);
|
||||
}
|
||||
/* Przyciski i elementy */
|
||||
|
||||
@@ -733,6 +753,13 @@ body.poland-mode .about-section-image::after{
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.section-stats h1{
|
||||
font-size: 34px;
|
||||
color: var(--barca-red);
|
||||
}
|
||||
body.poland-mode .section-stats h1{
|
||||
color: white;
|
||||
}
|
||||
.section-stats-center
|
||||
{
|
||||
display: grid;
|
||||
|
||||
@@ -6,13 +6,19 @@
|
||||
<select onchange="location = this.value;">
|
||||
<option disabled selected>Wybierz zawodnika</option>
|
||||
<option value="{{ url_for('compare', player='Leo Messi') }}">Leo Messi</option>
|
||||
<option value="{{ url_for('compare', player='Ronaldo') }}">Cristiano Ronaldo</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">Neymar</option>
|
||||
<option value="{{ url_for('compare', player='Cristiano Ronaldo') }}">Cristiano Ronaldo</option>
|
||||
<option value="{{ url_for('compare', player='Kylian Mbappé') }}">Kylian Mbappé</option>
|
||||
<option value="{{ url_for('compare', player='Zlatan Ibrahimović') }}">Zlatan Ibrahimović</option>
|
||||
<option value="{{ url_for('compare', player='Luis Suárez') }}">Luis Suárez</option>
|
||||
<option value="{{ url_for('compare', player='Erling Haaland') }}">Erling Haaland</option>
|
||||
<option value="{{ url_for('compare', player='Karim Benzema') }}">Karim Benzema</option>
|
||||
<option value="{{ url_for('compare', player='Sergio Agüero') }}">Sergio Agüero</option>
|
||||
</select>
|
||||
|
||||
{%for player in player2 %}
|
||||
{% if player.name == selected_player %}
|
||||
<section class="section-stats">
|
||||
<h1>Robert Lewandowski VS {{selected_player}}</h1>
|
||||
<h2>Gole</h2>
|
||||
<div class="stats">
|
||||
<div class="stat-box">
|
||||
@@ -41,7 +47,7 @@
|
||||
<h2>Wystąpienia</h2>
|
||||
<div class="stats">
|
||||
<div class="stat-box">
|
||||
<h3>{{ all_time_stats.assists }}</h3>
|
||||
<h3>{{ all_time_stats.matches }}</h3>
|
||||
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
@@ -50,17 +56,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Minuty zagrane</h2>
|
||||
<div class="stats">
|
||||
<div class="stat-box">
|
||||
<h3>{{ all_time_stats.assists }}</h3>
|
||||
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
<h3>{{ player.assists}}</h3>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor%}
|
||||
|
||||
@@ -10,27 +10,27 @@
|
||||
<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>
|
||||
<p>Tu znajdziesz najświeższe statystyki, aktualizowane zaraz po zakończeniu meczu Lewego</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>
|
||||
<p>Robert Lewandowski jest uznawany za jednego z najlepszych zawodników na świecie, zobacz jak wypada w porównaniu do innych czołowych zawodników i sprawdź czy zasługuje na miano jednego z najlepszych napastników świata.</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>
|
||||
<p>Nie oglądałeś ostatniego meczu Barcelony? Wypadło Ci coś i nie widziałeś najnowszego spotkania reprezentacji Polski? Wejdź i sprawdź jak poradził sobie Robert.</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>
|
||||
<p>Jesteś zainteresowany jak Robert radzi sobie na przestrzeni tylu lat gry? Jesteś ciekaw czy napastnik oprócz strzelania bramek lubi kolekcjonować kartki? Sprawdź u nas jak wygląda kariera Roberta Lewandowskiego na podstawie jego gry w kadrze Polski, klubach oraz Pucharach ligowych i międzynarodowych.</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="/club">Zobacz osiągnięcia</a>
|
||||
<h3>Trofea</h3>
|
||||
<p>Zastanawia Cie jakie było ostatnie trofeum Roberta? A może z kolegami sprawdzacie, który lepiej pamięta złote chwile w karierze naszego idola? Rozwiejcie wasze wątpliwości i zobaczcie wielką kolekcji zdobyczy pucharowych najlepszego polskiego zawodnika.</p>
|
||||
<a href="/club">Zobacz trofea</a>
|
||||
</article>
|
||||
</section>
|
||||
<!--
|
||||
@@ -57,5 +57,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<!--
|
||||
{{ commit_in_html | safe }}
|
||||
-->
|
||||
{% endblock %}
|
||||
@@ -3,36 +3,53 @@
|
||||
{% block title %}Lista meczów{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<select>
|
||||
<select onchange="location = this.value;">
|
||||
<option disabled selected>Wybierz rok</option>
|
||||
<option value="{{ url_for('compare', player='Leo Messi') }}">2024/2025</option>
|
||||
<option value="{{ url_for('compare', player='Ronaldo') }}">2023/2024</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2022/2023</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2021/2022</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2020/2021</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2019/2020</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2018/2019</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2017/2018</option>
|
||||
<option value="{{ url_for('compare', player='Neymar') }}">2016/2017</option>
|
||||
<option value="{{ url_for('mecze', date='2025') }}">2025</option>
|
||||
<option value="{{ url_for('mecze', date='2024') }}">2024</option>
|
||||
<option value="{{ url_for('mecze', date='2023') }}">2023</option>
|
||||
<option value="{{ url_for('mecze', date='2022') }}">2022</option>
|
||||
<option value="{{ url_for('mecze', date='2021') }}">2021</option>
|
||||
<option value="{{ url_for('mecze', date='2020') }}">2020</option>
|
||||
<option value="{{ url_for('mecze', date='2019') }}">2019</option>
|
||||
<option value="{{ url_for('mecze', date='2018') }}">2018</option>
|
||||
<option value="{{ url_for('mecze', date='2017') }}">2017</option>
|
||||
<option value="{{ url_for('mecze', date='2016') }}">2016</option>
|
||||
<option value="{{ url_for('mecze', date='2015') }}">2015</option>
|
||||
<option value="{{ url_for('mecze', date='2014') }}">2014</option>
|
||||
</select>
|
||||
<section class="section__matches">
|
||||
<h2>📅 Mecze Roberta</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
|
||||
<!--
|
||||
<th>Przeciwnik</th>
|
||||
<th>Gole</th>
|
||||
<th>Asysty</th>
|
||||
<th>Minuty</th>
|
||||
-->
|
||||
<th>Gospodarze</th>
|
||||
<th>Wynik</th>
|
||||
<th>Goście</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{% for match in matches %}
|
||||
{% if match.data[:4] == selected_date %}
|
||||
<tr>
|
||||
<td>{{ match.date }}</td>
|
||||
<td>{{ match.opponent }}</td>
|
||||
<td>{{ match.data }}</td>
|
||||
|
||||
<td>{{ match.gospodarze_id }}</td>
|
||||
<td>{{ match.gosp_wynik }} : {{ match.gosc_wynik }}</td>
|
||||
<td>{{ match.goscie_id }}</td>
|
||||
<!--
|
||||
<td>{{ match.goals }}</td>
|
||||
<td>{{ match.assists }}</td>
|
||||
<td>{{ match.minutes }}</td>
|
||||
-->
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</section>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<p>Asysty:</p> <span class="stat-box-special"> {{ nation_stats.assists }} </span>
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
<p>Występy:</p> <span class="stat-box-special"> {{ nation_stats.goals }} </span>
|
||||
<p>Występy:</p> <span class="stat-box-special"> {{ nation_stats.matches }} </span>
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
<p>Łączny czas gry:</p> <span class="stat-box-special"> {{ nation_stats.minutes_played }}</span>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block content %}
|
||||
<section class="section__matches">
|
||||
<h2>📅 Trofea</h2>
|
||||
<h2>🏆 Trofea</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Nazwa</th>
|
||||
|
||||
Reference in New Issue
Block a user