Implement basic login function; add basic styling
This commit is contained in:
parent
2bb7ea54a2
commit
8be7988d97
12 changed files with 252 additions and 27 deletions
23
templates/base.html.twig
Normal file
23
templates/base.html.twig
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<h1>MailAccountAdmin</h1>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}
|
||||
Nothing to see here...
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
templates/dashboard.html.twig
Normal file
11
templates/dashboard.html.twig
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Dashboard</h2>
|
||||
|
||||
<p>Hello, {{ username }}!</p>
|
||||
|
||||
<a href="/logout">Logout.</a>
|
||||
{% endblock %}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>MailAccountAdmin</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- <link rel="stylesheet" href=""> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>MailAccountAdmin - Login</h1>
|
||||
|
||||
<b>Hello.</b>
|
||||
|
||||
<!-- <script src="" async defer></script> -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
42
templates/login.html.twig
Normal file
42
templates/login.html.twig
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<h1>MailAccountAdmin</h1>
|
||||
</header>
|
||||
|
||||
<main class="login_page">
|
||||
<h2>Login</h2>
|
||||
|
||||
<form action="/login" method="POST">
|
||||
{% if error is defined %}
|
||||
<div class="error">{{ error }}</div>
|
||||
{% endif %}
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="username">Username</label></td>
|
||||
<td><input type="text" id="username" name="username"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="password">Password</label></td>
|
||||
<td><input type="password" id="password" name="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><button type="submit">Login</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue