Compare commits
10 Commits
f730dc74df
...
4737663e8d
Author | SHA1 | Date | |
---|---|---|---|
4737663e8d | |||
72aeeb5eab | |||
9ef1cd3459 | |||
e9472eff01 | |||
77aae9eb89 | |||
57bcad0b23 | |||
93852b4150 | |||
42cffe117c | |||
0cbfadbe1c | |||
817a167223 |
2480
staging-diff.sql
2480
staging-diff.sql
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Statistik</h1>
|
<h1 class="h1">Statistik <select id="yearSelect" onchange="changeYear()" style="background: transparent; background-image: none; text-decoration: underline;"></select></h1>
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
<label for="name" class="sr-only">Suche</label>
|
<label for="name" class="sr-only">Suche</label>
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Namen...">
|
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Namen...">
|
||||||
@ -46,6 +46,33 @@ const data = [
|
|||||||
]
|
]
|
||||||
sessionStorage.setItem('userStats', JSON.stringify(data));
|
sessionStorage.setItem('userStats', JSON.stringify(data));
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
function getYearFromURL() {
|
||||||
|
var queryParams = new URLSearchParams(window.location.search);
|
||||||
|
return queryParams.get('year');
|
||||||
|
}
|
||||||
|
|
||||||
|
function populateYears() {
|
||||||
|
var select = document.getElementById('yearSelect');
|
||||||
|
var currentYear = new Date().getFullYear();
|
||||||
|
var selectedYear = getYearFromURL() || currentYear;
|
||||||
|
for (var year = 1977; year <= currentYear; year++) {
|
||||||
|
var option = document.createElement('option');
|
||||||
|
option.value = option.textContent = year;
|
||||||
|
if (year == selectedYear) {
|
||||||
|
option.selected = true;
|
||||||
|
}
|
||||||
|
select.appendChild(option);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeYear() {
|
||||||
|
var selectedYear = document.getElementById('yearSelect').value;
|
||||||
|
window.location.href = '?year=' + selectedYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call this function when the page loads
|
||||||
|
populateYears();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/public/logbook.js"></script>
|
<script src="/public/logbook.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user