69 lines
No EOL
3.3 KiB
HTML
69 lines
No EOL
3.3 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 Tool{% endblock %}</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
</head>
|
|
<body class="bg-gray-50 min-h-screen">
|
|
<nav class="bg-white shadow-md">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="flex justify-between h-16">
|
|
<div class="flex">
|
|
<div class="flex-shrink-0 flex items-center">
|
|
<i class="fas fa-wrench text-blue-600 mr-2"></i>
|
|
<span class="text-xl font-bold text-gray-800">Inspection Tool</span>
|
|
</div>
|
|
{% if current_user.is_authenticated %}
|
|
<div class="ml-6 flex space-x-2">
|
|
<a href="{{ url_for('inspections.dashboard') }}" class="inline-flex items-center px-1 pt-1 border-b-2 border-blue-500 text-sm font-medium text-gray-900">
|
|
Dashboard
|
|
</a>
|
|
{% if current_user.is_admin %}
|
|
<a href="{{ url_for('admin.users') }}" class="inline-flex items-center px-1 pt-1 border-b-2 border-transparent hover:border-gray-300 text-sm font-medium text-gray-500 hover:text-gray-700">
|
|
Admin
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if current_user.is_authenticated %}
|
|
<div class="flex items-center">
|
|
<div class="ml-3 relative">
|
|
<div class="text-sm text-gray-700">
|
|
<span class="font-medium">{{ current_user.full_name }}</span>
|
|
{% if current_user.is_admin %} (Admin) {% endif %}
|
|
</div>
|
|
<a href="{{ url_for('auth.logout') }}" class="text-sm text-gray-500 hover:text-gray-700">Logout</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="mb-6">
|
|
{% for category, message in messages %}
|
|
<div class="mb-2 px-4 py-2 rounded-md {% if category == 'error' %}bg-red-100 text-red-700{% elif category == 'success' %}bg-green-100 text-green-700{% else %}bg-blue-100 text-blue-700{% endif %}">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<footer class="bg-white border-t mt-8">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
|
|
<p class="text-center text-sm text-gray-500">© {{ moment().format('YYYY') }} Inspection Reporting Tool</p>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html> |