Files
tutor-tool/app/templates/base.html
2026-04-22 21:14:30 +02:00

47 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}Tutortool{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/output.css') }}">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
{% block head_extra %}{% endblock %}
</head>
<body class="{% block body_class %}bg-background text-text min-h-screen font-sans{% endblock %}">
{% block body %}{% endblock %}
{% block scripts %}
<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>