Compare commits

..

10 Commits

Author SHA1 Message Date
4737663e8d Merge pull request 'years-changeable' (#72) from years-changeable into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m53s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 14m54s
Reviewed-on: #72
2023-11-20 19:46:14 +01:00
72aeeb5eab add css magic from marie
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m52s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2023-11-20 18:42:32 +01:00
9ef1cd3459 make years in stat changeable
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m51s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2023-11-20 17:52:10 +01:00
e9472eff01 is in master :-)
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m44s
CI/CD Pipeline / deploy-staging (push) Successful in 14m16s
CI/CD Pipeline / deploy-main (push) Has been skipped
2023-11-20 17:22:26 +01:00
77aae9eb89 Merge pull request 'efa-data' (#66) from efa-data into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m56s
CI/CD Pipeline / deploy-staging (push) Successful in 16m13s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #66
2023-11-20 16:02:40 +01:00
57bcad0b23 remove weird floats
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m45s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2023-11-20 15:50:07 +01:00
93852b4150 add efa data 2019-2021
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m54s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2023-11-20 15:47:53 +01:00
42cffe117c added 2022 to main
All checks were successful
CI/CD Pipeline / test (push) Successful in 11m2s
CI/CD Pipeline / deploy-staging (push) Successful in 14m16s
CI/CD Pipeline / deploy-main (push) Has been skipped
2023-11-20 10:10:24 +01:00
0cbfadbe1c Merge pull request 'Update staging-diff.sql' (#65) from log-2022 into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m43s
CI/CD Pipeline / deploy-staging (push) Successful in 15m0s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #65
2023-11-20 08:23:25 +01:00
817a167223 Merge pull request 'log-2022' (#63) from log-2022 into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m51s
CI/CD Pipeline / deploy-staging (push) Successful in 15m14s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #63
2023-11-19 22:21:46 +01:00
2 changed files with 28 additions and 2481 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
<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">
<label for="name" class="sr-only">Suche</label>
<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));
{% 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 src="/public/logbook.js"></script>