This commit is contained in:
Mateusz Gruszczyński
2025-03-09 21:24:50 +01:00
parent 74513a920a
commit 71f67fa8fa
5 changed files with 54 additions and 33 deletions

View File

@ -36,5 +36,23 @@
{% block content %}{% endblock %}
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Funkcja aktualizująca animację paska postępu
function animateProgressBars() {
document.querySelectorAll('.progress-bar').forEach(bar => {
const progressValue = bar.getAttribute('aria-valuenow');
bar.style.setProperty('--progress-width', progressBarWidth(progressBarValue(progressBar)));
});
}
// Funkcja wywoływana przy ładowaniu strony
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.progress-bar').forEach(bar => {
const width = bar.getAttribute('aria-valuenow') + '%';
bar.style.setProperty('--progress-width', width);
});
});
</script>
</body>
</html>