FabulaVotes/templates/base_page.html.tera
trotFunky b1f37a4e4a templates: Make the index a class
The index is a full HTML page with some boilerplate that would be needed in all
pages deviating from the truth list, specifically the head and general structure.

Make the core structure a base template, rebuild the week index page inheriting
from it.
Change which template is used by the route accordingly.
2024-07-28 16:55:18 +01:00

36 lines
1 KiB
Text

<!DOCTYPE html>
<html lang="en">
{% set title = "Vérités Fabula Ultima" %}
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
<link href="/static/style.css" rel="stylesheet"/>
<link href="/static/favicon.ico" rel="icon"/>
{% block scripts %}
{% endblock %}
</head>
<body>
{% block top_bar %}
<div class="top_bar">
<h1>{{ title }}</h1>
{% if user.logged_in == true %}
<form class="login" id="logout" action="/{{ week_data.number }}/logout" method="POST">
Connecté en tant que <b>{{ user.name }}</b>
<button form="logout">Déconnecter</button>
</form>
{% else %}
<form class="login" id="login" action="/{{ week_data.number }}/login" method="POST">
<label>Pseudo <input form="login" type="text" name="name"/></label>
<label>Mot de passe <input form="login" type="password" name="password"/></label>
<button form="login">Se connecter</button>
</form>
{% endif %}
</div>
{% endblock %}
{% block body %}
{% endblock %}
</body>
</html>