updated html

This commit is contained in:
2026-04-22 21:14:30 +02:00
parent 9f4007c0e9
commit f433f0cf4c
9 changed files with 1100 additions and 1138 deletions

View File

@@ -19,6 +19,28 @@
<script src="https://cdn.jsdelivr.net/npm/flowbite@3.1.2/dist/flowbite.min.js"></script>
{% endblock %}
<script>
function toggleCourseSwitcher(btn) {
const root = document.getElementById(btn.dataset.csRoot);
const menu = document.getElementById(btn.dataset.csMenu);
const chevron = document.getElementById(btn.dataset.csChevron);
const isOpen = !menu.classList.contains('hidden');
menu.classList.toggle('hidden', isOpen);
chevron.style.transform = isOpen ? '' : 'rotate(180deg)';
if (!isOpen) {
document.addEventListener('click', function handler(e) {
if (!root.contains(e.target)) {
menu.classList.add('hidden');
chevron.style.transform = '';
document.removeEventListener('click', handler);
}
});
}
}
</script>
{% block scripts_extra %}{% endblock %}
</body>
</html>