|
|
<!DOCTYPE html> |
|
|
<html lang="en"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>Carwala - Your Car Marketplace</title> |
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> |
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> |
|
|
</head> |
|
|
<body class="bg-gray-100"> |
|
|
|
|
|
<nav class="bg-blue-600 text-white shadow-lg"> |
|
|
<div class="container mx-auto px-4"> |
|
|
<div class="flex justify-between items-center py-4"> |
|
|
<a href="{{ url_for('index') }}" class="text-2xl font-bold">Carwala</a> |
|
|
|
|
|
<div class="flex space-x-4"> |
|
|
{% if session.get('user_id') %} |
|
|
{% if session.get('role') == 'admin' %} |
|
|
<a href="{{ url_for('admin_dashboard') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Admin Dashboard</a> |
|
|
{% elif session.get('role') == 'seller' %} |
|
|
<a href="{{ url_for('seller_dashboard') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Seller Dashboard</a> |
|
|
{% endif %} |
|
|
<a href="{{ url_for('index') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Home</a> |
|
|
<a href="{{ url_for('logout') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Logout</a> |
|
|
{% else %} |
|
|
<a href="{{ url_for('index') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Home</a> |
|
|
<a href="{{ url_for('login') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Login</a> |
|
|
<a href="{{ url_for('register') }}" class="hover:bg-blue-700 px-3 py-2 rounded">Register</a> |
|
|
{% endif %} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</nav> |
|
|
|
|
|
|
|
|
{% with messages = get_flashed_messages() %} |
|
|
{% if messages %} |
|
|
<div class="container mx-auto mt-4"> |
|
|
{% for message in messages %} |
|
|
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert"> |
|
|
<span class="block sm:inline">{{ message }}</span> |
|
|
</div> |
|
|
{% endfor %} |
|
|
</div> |
|
|
{% endif %} |
|
|
{% endwith %} |
|
|
|
|
|
|
|
|
<main class="container mx-auto px-4 py-8"> |
|
|
{% block content %}{% endblock %} |
|
|
</main> |
|
|
|
|
|
|
|
|
<footer class="bg-gray-800 text-white py-8 mt-12"> |
|
|
<div class="container mx-auto px-4 text-center"> |
|
|
<p>© 2024 Carwala. All rights reserved.</p> |
|
|
</div> |
|
|
</footer> |
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> |
|
|
</body> |
|
|
</html> |
|
|
|