Add navigation bar and logout button

This commit is contained in:
Lexi / Zoe 2021-07-27 20:02:36 +02:00
parent b24fe56c8a
commit e58036b2b3
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
6 changed files with 95 additions and 31 deletions

View file

@ -1,18 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta charset="utf-8"/>
<title>{% block title %}Untitled page{% endblock %} - MailAccountAdmin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/static/style.css"/>
</head>
<body>
<header>
<h1>MailAccountAdmin</h1>
<div class="header_userstatus">
Hello, <b>{{ current_user_name }}</b>. | <a href="/logout">Logout</a>
</div>
</header>
<nav>
<ul>
<li class="nav_current_page"><a href="/">Dashboard</a></li>
<li><a href="/domains">Domains</a></li>
<li><a href="/accounts">Accounts</a></li>
</ul>
</nav>
<main>
{% block content %}
Nothing to see here...

View file

@ -6,15 +6,4 @@
<h2>Dashboard</h2>
<p>Hello, {{ username }}!</p>
<pre>
ID: {{ user.getId() }}
username: {{ user.getUsername() }}
password: {{ user.getPasswordHash() }}
is_active: {{ user.isActive() }}
created_at: {{ user.getCreatedAt() | date() }}
modified_at: {{ user.getModifiedAt() | date() }}
</pre>
<a href="/logout">Logout.</a>
{% endblock %}

View file

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta charset="utf-8"/>
<title>Login - MailAccountAdmin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/static/style.css"/>
</head>
<body>
@ -18,7 +18,7 @@
<form action="/login" method="POST">
{% if error is defined %}
<div class="error">{{ error }}</div>
<div class="error">{{ error }}</div>
{% endif %}
<table>
@ -32,7 +32,9 @@
</tr>
<tr>
<td></td>
<td><button type="submit">Login</button></td>
<td>
<button type="submit">Login</button>
</td>
</tr>
</table>
</form>