start working on auth

This commit is contained in:
2023-04-03 16:11:26 +02:00
parent 3dbfadb00e
commit d50f3d9746
12 changed files with 485 additions and 106 deletions

View File

@ -0,0 +1,26 @@
{% if flash %}
{% if flash.0 == "success" %}
<div class="row">
<div class="one-column p-1 text-white bg-green mb-3 light text-center">
{{ flash.1 }}
</div>
</div>
{% endif %}
{% if flash.0 == "error" %}
<div class="row">
<div class="one-column p-1 text-white bg-red mb-3 bold text-center">
{{ flash.1 }}
</div>
</div>
{% endif %}
{% endif %}
<form method="post" action="/auth">
<label for="name">Name</label>
<input type="text" id="name" name="name" />
<label for="password">Passwort</label>
<input type="password" id="password" name="password" />
<button type="submit">Login</button>
</form>

17
templates/base.html.tera Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
{% block content %}
{% endblock content %}
</body>
</html>

24
templates/index.html.tera Normal file
View File

@ -0,0 +1,24 @@
{% extends "base" %}
{% block content %}
{% if flash %}
{% if flash.0 == "success" %}
<div class="row">
<div class="one-column p-1 text-white bg-green mb-3 light text-center">
{{ flash.1 }}
</div>
</div>
{% endif %}
{% if flash.0 == "error" %}
<div class="row">
<div class="one-column p-1 text-white bg-red mb-3 bold text-center">
{{ flash.1 }}
</div>
</div>
{% endif %}
{% endif %}
<h1>Hi</h1>
{% endblock content %}