Fix login page layout - hide navbar for non-authenticated users

- Made header/navbar conditional on user authentication
- Login and register pages now display without navbar
- Forms remain centered on full page background
- Notifications still work on all pages
parent 433054e2
......@@ -66,22 +66,22 @@
{% block head %}{% endblock %}
</head>
<body>
{% if user %}
<header class="header">
<div class="header-content">
<div class="logo">VidAI</div>
<nav class="nav">
<a href="/dashboard" {% if active_page == 'dashboard' %}class="active"{% endif %}>Dashboard</a>
<a href="/analyze" {% if active_page == 'analyze' %}class="active"{% endif %}>Analyze</a>
{% if user and user.get('role') == 'admin' %}
{% if user.get('role') == 'admin' %}
<a href="/train" {% if active_page == 'train' %}class="active"{% endif %}>Train</a>
{% endif %}
<a href="/history" {% if active_page == 'history' %}class="active"{% endif %}>History</a>
{% if user and user.get('role') == 'admin' %}
{% if user.get('role') == 'admin' %}
<a href="/api_tokens" {% if active_page == 'api_tokens' %}class="active"{% endif %}>API Tokens</a>
{% endif %}
<a href="/settings" {% if active_page == 'settings' %}class="active"{% endif %}>Settings</a>
</nav>
{% if user %}
<div class="user-menu">
<div class="user-icon" onclick="toggleUserMenu()">
<i class="fas fa-user"></i>
......@@ -97,9 +97,9 @@
<a href="/logout">Logout</a>
</div>
</div>
{% endif %}
</div>
</header>
{% endif %}
<!-- Notification container -->
<div class="notification-container" id="notificationContainer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment