| <!DOCTYPE html>
|
| <html lang="en">
|
| <head>
|
| <meta charset="UTF-8">
|
| <script src="https://cdn.tailwindcss.com"></script>
|
| <title>{% block title %}CGPA App{% endblock %}</title>
|
| </head>
|
| <body class="bg-gray-100 min-h-screen">
|
| <nav class="bg-blue-600 p-4 text-white">
|
| <div class="container mx-auto flex justify-between">
|
| <a href="/" class="font-bold">CGPA App</a>
|
| <div>
|
| {% if request.session.is_admin %}
|
| <a href="/admin/dashboard" class="mr-4">Admin Dashboard</a>
|
| <form action="/admin/logout" method="post" style="display:inline;">
|
| <button type="submit" class="bg-red-500 text-white p-2 rounded">Logout</button>
|
| </form>
|
| {% elif request.session.user_id %}
|
| <a href="/user/dashboard" class="mr-4">Dashboard</a>
|
| <form action="/user/logout" method="post" style="display:inline;">
|
| <button type="submit" class="bg-red-500 text-white p-2 rounded">Logout</button>
|
| </form>
|
| {% endif %}
|
| </div>
|
| </div>
|
| </nav>
|
| <main class="container mx-auto py-6">
|
| {% block content %}{% endblock %}
|
| </main>
|
| </body>
|
| </html>
|
|
|