Skip to content

Commit 5e79715

Browse files
committed
Add the script
1 parent ed4f749 commit 5e79715

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

template.html.jinja

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,22 @@
5656
</table>
5757
<p>Last updated at {{ generation_time.strftime('%A, %d %B %Y, %X %Z') }}.</p>
5858
</body>
59+
<script>
60+
function updateProgressBarVisibility() {
61+
document.querySelectorAll('.progress-bar').forEach(progressBar => {
62+
const textWidth = progressBar.scrollWidth;
63+
const barWidth = progressBar.offsetWidth;
64+
65+
if (barWidth < textWidth) {
66+
progressBar.classList.add('low');
67+
} else {
68+
progressBar.classList.remove('low');
69+
}
70+
});
71+
}
72+
73+
updateProgressBarVisibility();
74+
75+
window.addEventListener('resize', updateProgressBarVisibility);
76+
</script>
5977
</html>

0 commit comments

Comments
 (0)