login and dashboard pages

This commit is contained in:
2025-04-16 16:44:21 +03:00
parent 4e43c17242
commit db465d6e4e
15 changed files with 426 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Flask App{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body class="light-mode">
{% if request.endpoint != 'main.login' %}
<header>
<div class="header-content">
<div class="left-header">
<img src="{{ url_for('static', filename='scan_me.jpg') }}" alt="Logo" class="logo">
{% if request.endpoint == 'main.dashboard' %}
<span class="page-title">Welcome to Dashboard</span>
{% endif %}
</div>
<div class="right-header">
<button id="theme-toggle" class="theme-toggle">Change to dark theme</button>
{% if 'user' in session %}
<span class="user-info">You are logged in as {{ session['user'] }}</span>
<a href="{{ url_for('main.logout') }}" class="logout-button">Logout</a>
{% endif %}
</div>
</div>
</header>
{% endif %}
<div class="container">
{% block content %}{% endblock %}
</div>
<script src="{{ url_for('static', filename='script.js') }}"></script>
</body>
</html>