Menu utilisateur du rail identique au mobile (Mon avatar, Paramètres, Admin, Déconnexion) ; titre du site masqué sur téléphone/tablette. Fragment réutilisable _image_upload.html pour le fond (Paramètres) et l'avatar, à la façon BibliothequAyr ; nouvelle route POST /api/fond/ (admin, Pillow, plafond 5 Mo) ; retrait du fond via BoiteDialog. Icônes SVG du site à la place des Bootstrap Icons jamais chargées ; les 9 favicons voyagent dans le projet. Aucune migration ; moteur, anti-régression et journal intacts.
74 lines
4 KiB
HTML
Executable file
74 lines
4 KiB
HTML
Executable file
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% if installation %}Première installation{% else %}Connexion{% endif %} — {{ site_config.site_name|default:"VocabulAyr" }}</title>
|
|
<link rel="icon" href="{% static 'jeu/favicons/favicon-32x32.png' %}" sizes="32x32">
|
|
<link rel="icon" href="{% static 'jeu/favicons/favicon-16x16.png' %}" sizes="16x16">
|
|
<link rel="apple-touch-icon" href="{% static 'jeu/favicons/apple-touch-icon.png' %}">
|
|
<style>
|
|
* { box-sizing: border-box; }
|
|
body { margin:0; min-height:100vh; display:flex; align-items:center; justify-content:center;
|
|
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
|
|
background:#282519; color:#f2ead7; padding:1rem; }
|
|
.carte { width:min(360px,94vw); padding:2rem;
|
|
background:rgba(40,37,25,.42);
|
|
backdrop-filter:blur(16px) saturate(1.2);
|
|
-webkit-backdrop-filter:blur(16px) saturate(1.2);
|
|
border:1px solid rgba(242,234,215,.16);
|
|
border-radius:14px; box-shadow:0 8px 32px rgba(0,0,0,.45); }
|
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
.carte { background:rgba(28,23,18,.94); }
|
|
}
|
|
h1 { margin:0; text-align:center; font-size:1.5rem; font-family:Georgia,"Iowan Old Style",serif; }
|
|
.surtitre { margin:0 0 1rem; text-align:center; font-size:.72rem; color:#c9bc9c;
|
|
letter-spacing:2px; text-transform:uppercase; }
|
|
label { display:block; font-size:.78rem; color:#c9bc9c; margin:.8rem 0 .25rem; letter-spacing:.5px; }
|
|
input { width:100%; padding:.6rem .7rem; border:1px solid rgba(242,234,215,.22);
|
|
border-radius:8px; background:rgba(28,23,18,.55); color:inherit; font:inherit; }
|
|
button { width:100%; margin-top:1.2rem; padding:.7rem; border:0; border-radius:8px;
|
|
background:#b23c2a; color:#fff7ea; font-size:1rem; font-weight:700; cursor:pointer; }
|
|
button:hover { background:#c74f36; }
|
|
.erreur { color:#ffb4a2; text-align:center; margin:.9rem 0 0; font-size:.9rem; }
|
|
.note { margin-top:1.1rem; text-align:center; font-size:.78rem; color:#c9bc9c; line-height:1.55; }
|
|
</style>
|
|
{% if site_config.background_image %}
|
|
<style>
|
|
body { background:url('{{ site_config.background_image.url }}') center / cover no-repeat #282519; }
|
|
</style>
|
|
{% endif %}
|
|
</head>
|
|
<body>
|
|
<div class="carte">
|
|
<p class="surtitre">Le fil des mots</p>
|
|
<h1>{{ site_config.site_name|default:"VocabulAyr" }}</h1>
|
|
{% if installation %}
|
|
<p class="note">Première connexion : créez ici le compte de l'administrateur du site —
|
|
c'est lui qui ouvrira ensuite les comptes de la famille, dans la partie Admin.</p>
|
|
{% if erreur %}<p class="erreur">{{ erreur }}</p>{% endif %}
|
|
<form method="post">{% csrf_token %}
|
|
<label for="id_u">Identifiant administrateur</label>
|
|
<input id="id_u" type="text" name="username" placeholder="Ayr" autofocus autocomplete="username" required>
|
|
<label for="id_p1">Mot de passe</label>
|
|
<input id="id_p1" type="password" name="password1" autocomplete="new-password" required>
|
|
<label for="id_p2">Confirmez le mot de passe</label>
|
|
<input id="id_p2" type="password" name="password2" autocomplete="new-password" required>
|
|
<button type="submit">Créer le compte administrateur</button>
|
|
</form>
|
|
{% else %}
|
|
{% if form.errors %}<p class="erreur">Identifiant ou mot de passe incorrect.</p>{% endif %}
|
|
<form method="post">{% csrf_token %}
|
|
<label for="id_u">Identifiant</label>
|
|
<input id="id_u" type="text" name="username" placeholder="Ayr" autofocus autocomplete="username" required>
|
|
<label for="id_p">Mot de passe</label>
|
|
<input id="id_p" type="password" name="password" placeholder="" autocomplete="current-password" required>
|
|
<button type="submit">Se connecter</button>
|
|
</form>
|
|
<p class="note">Les comptes sont ouverts par l'administrateur,
|
|
dans la partie <b>Admin</b> du site.</p>
|
|
{% endif %}
|
|
</div>
|
|
</body>
|
|
</html>
|