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>

View File

@@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block content %}
<div class="card">
<h3>Manage Settings</h3>
<p>Access and manage application settings.</p>
<a href="{{ url_for('main.settings') }}" class="btn">Access Settings Page</a>
</div>
{% endblock %}

View File

@@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block title %}Login{% endblock %}
{% block content %}
<div class="login-page">
<div class="logo-container">
<img src="{{ url_for('static', filename='logo_login.jpg') }}" alt="Login Logo" class="login-logo">
</div>
<div class="form-container">
<h2>Login</h2>
<form method="POST">
<label for="email">Email:</label>
<input type="email" name="email" required>
<label for="password">Password:</label>
<input type="password" name="password" required>
<button type="submit">Login</button>
</form>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block title %}Settings{% endblock %}
{% block content %}
<h2>Settings Page</h2>
<p>This is the settings page. Add your settings here.</p>
{% endblock %}