login and dashboard pages
This commit is contained in:
34
py_app/app/templates/base.html
Normal file
34
py_app/app/templates/base.html
Normal 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>
|
||||
11
py_app/app/templates/dashboard.html
Normal file
11
py_app/app/templates/dashboard.html
Normal 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 %}
|
||||
21
py_app/app/templates/login.html
Normal file
21
py_app/app/templates/login.html
Normal 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 %}
|
||||
8
py_app/app/templates/settings.html
Normal file
8
py_app/app/templates/settings.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user