main #1

Open
philipp wants to merge 71 commits from Ruderverein-Donau-Linz/rowt:main into main
Showing only changes of commit 0ebcd5a284 - Show all commits

View File

@ -73,4 +73,31 @@
</div> </div>
</div> </div>
</div> </div>
<script>
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;
}
populateYears();
</script>
{% endblock content %} {% endblock content %}