44 lines
No EOL
1.7 KiB
HTML
44 lines
No EOL
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Inspection Reporting{% endblock %}</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
</head>
|
|
<body class="bg-gray-100">
|
|
<nav class="bg-blue-800 text-white p-4">
|
|
<div class="container mx-auto flex justify-between items-center">
|
|
<div class="text-white font-bold">Inspection App</div>
|
|
<div>
|
|
{% if current_user.is_authenticated %}
|
|
<span class="mr-4">Welcome, {{ current_user.full_name }}</span>
|
|
<a href="{{ url_for('auth.logout') }}" class="text-white hover:underline">Logout</a>
|
|
{% else %}
|
|
<a href="{{ url_for('auth.login') }}" class="text-white hover:underline">Login</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="container mx-auto py-6">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="space-y-4">
|
|
{% for category, message in messages %}
|
|
<div class="p-3 mb-2 rounded {% if category == 'danger' %}bg-red-100 text-red-800{% elif category == 'success' %}bg-green-100 text-green-800{% elif category == 'info' %}bg-blue-100 text-blue-800{% else %}bg-gray-100 text-gray-800{% endif %}">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<slot></slot>
|
|
</main>
|
|
|
|
<script>
|
|
// Place for any custom JS
|
|
</script>
|
|
</body>
|
|
</html> |