Files

59 lines
2.4 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Kundenportal{% endblock %} - Webwerkstatt</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
<link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/sidebar.css') }}" rel="stylesheet">
{% block extra_css %}{% endblock %}
</head>
<body class="has-sidebar">
{% if g.customer %}
{% include "components/sidebar.html" %}
{% endif %}
<main class="main-content">
<!-- Top Bar (Mobile) -->
<header class="topbar d-lg-none">
<span class="topbar-title">{% block topbar_title %}Kundenportal{% endblock %}</span>
</header>
<!-- Flash Messages -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flash-container">
{% for category, message in messages %}
<div class="alert alert-{{ 'danger' if category == 'error' else category }} alert-dismissible fade show">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<!-- Page Content -->
<div class="page-content">
{% block content %}{% endblock %}
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Close sidebar on mobile when clicking outside
document.addEventListener('click', function(e) {
const sidebar = document.querySelector('.sidebar');
const toggle = document.querySelector('.sidebar-toggle');
if (sidebar && sidebar.classList.contains('show') &&
!sidebar.contains(e.target) && !toggle.contains(e.target)) {
sidebar.classList.remove('show');
}
});
</script>
{% block extra_js %}{% endblock %}
</body>
</html>