Convert templates to pongo2
This commit is contained in:
parent
266cd2f4d2
commit
d61e607b8a
22 changed files with 311 additions and 136 deletions
5
views/index.html
Normal file
5
views/index.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% extends "layouts/main.html" %}
|
||||
|
||||
{% block main %}
|
||||
<h1>Home</h1>
|
||||
{% endblock %}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
include partials/header.pug
|
||||
|
||||
h1 #{.Title}
|
||||
|
||||
include partials/footer.pug
|
||||
38
views/layouts/main.html
Normal file
38
views/layouts/main.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!doctype html>
|
||||
<html lang="fr" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{% set PageTitleSuffix = "Camarades | POP Vaud" %}
|
||||
{% if PageTitle %}
|
||||
<title>{{ PageTitle }} | {{ PageTitleSuffix }}</title>
|
||||
{% else %}
|
||||
<title>{{ PageTitleSuffix }}</title>
|
||||
{% endif %}
|
||||
|
||||
<link rel="shortcut icon" href="/static/images/favicon.jpg" type="image/jpg">
|
||||
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/main.css">
|
||||
{% block stylesheet %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block header %}
|
||||
{% include "partials/header.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<!-- Content goes here -->
|
||||
{% endblock %}
|
||||
|
||||
<script src="/static/jquery/jquery.min.js"></script>
|
||||
<script src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/static/feather/dist/feather.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
feather.replace();
|
||||
});
|
||||
</script>
|
||||
{% block javascript %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
doctype html
|
||||
html(lang="fr", data-bs-theme="dark")
|
||||
head
|
||||
if .PageTitle
|
||||
title #{.PageTitle} - People - POP Vaud
|
||||
else
|
||||
title People - POP Vaud
|
||||
|
||||
meta(name="viewport" content="width=device-width, initial-scale=1")
|
||||
link(rel="icon", href="/static/images/favicon.jpg")
|
||||
link(rel="stylesheet", href="/static/bootstrap/css/bootstrap.min.css")
|
||||
link(rel="stylesheet", href="/static/main.css")
|
||||
body
|
||||
| {{embed}}
|
||||
|
||||
script(src="/static/jquery/jquery.min.js")
|
||||
script(src="/static/bootstrap/js/bootstrap.bundle.min.js")
|
||||
script(src="/static/feather/dist/feather.min.js")
|
||||
script feather.replace();
|
||||
script(src="/static/events.js")
|
||||
53
views/login.html
Normal file
53
views/login.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{% extends "layouts/main.html" %}
|
||||
|
||||
{% block main %}
|
||||
<div class="container">
|
||||
<div id="login-card" class="my-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Authentification
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if LoginError %}
|
||||
<div class="alert alert-danger">
|
||||
{{ LoginError }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form id="login" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
Adresse email
|
||||
</label>
|
||||
<input
|
||||
id="email"
|
||||
class="form-control"
|
||||
type="email"
|
||||
name="email"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">
|
||||
Mot de passe
|
||||
</label>
|
||||
<input
|
||||
id="password"
|
||||
class="form-control"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="me-2" data-feather="log-in"></i>
|
||||
Connexion
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
include partials/header.pug
|
||||
|
||||
.container
|
||||
#login-card.my-5
|
||||
.card
|
||||
.card-header
|
||||
| Authentification
|
||||
.card-body
|
||||
if .LoginError
|
||||
.alert.alert-danger
|
||||
| #{.LoginError}
|
||||
form#login(method="post")
|
||||
.mb-3
|
||||
label.form-label(for="email") Adresse email
|
||||
input#email.form-control(type="email", required, name="email")
|
||||
.mb-3
|
||||
label.form-label(for="password") Mot de passe
|
||||
input#password.form-control(type="password", required, name="password")
|
||||
.mt-3.text-end
|
||||
button.btn.btn-primary(type="submit")
|
||||
i.me-2(data-feather="log-in")
|
||||
| Connexion
|
||||
|
|
@ -1 +0,0 @@
|
|||
h2 Footer
|
||||
13
views/partials/header.html
Normal file
13
views/partials/header.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<nav class="navbar bg-body-tertiary">
|
||||
<div class="container">
|
||||
<a href="/" class="navbar-brand">
|
||||
<img
|
||||
id="header-logo"
|
||||
class="me-1"
|
||||
src="/static/images/logo.jpg"
|
||||
alt="Logo"
|
||||
>
|
||||
Camarades
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
nav.navbar.bg-body-tertiary
|
||||
div.container
|
||||
a.navbar-brand(href="/")
|
||||
img#header-logo.me-1(src="/static/images/logo.jpg", alt="Logo")
|
||||
| Gestion membres
|
||||
60
views/totp_enroll.html
Normal file
60
views/totp_enroll.html
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{% extends "layouts/main.html" %}
|
||||
|
||||
{% block main %}
|
||||
<div class="container">
|
||||
<div id="login-card" class="my-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Vérification multifacteur (TOTP)
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if MfaError %}
|
||||
<div class="alert alert-danger">
|
||||
{{ MfaError }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="totp-enroll-image" class="text-center my-3">
|
||||
<img src="{{ QrCode }}" alt="Code QR">
|
||||
</div>
|
||||
|
||||
<form id="login" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="secret" class="form-label">
|
||||
Secret (si pas possible de scanner le code QR)
|
||||
</label>
|
||||
<input
|
||||
id="secret"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="secret"
|
||||
disabled
|
||||
value="{{ Secret }}"
|
||||
>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="otp" class="form-label">
|
||||
Code temporaire
|
||||
</label>
|
||||
<input
|
||||
id="otp"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="otp"
|
||||
required
|
||||
placeholder="000000"
|
||||
pattern="[0-9]{6}"
|
||||
>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="me-2" data-feather="check-circle"></i>
|
||||
Vérifier
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
include partials/header.pug
|
||||
|
||||
.container
|
||||
#login-card.my-5
|
||||
.card
|
||||
.card-header
|
||||
| Vérification multifacteur (TOTP)
|
||||
.card-body
|
||||
if .MfaError
|
||||
.alert.alert-danger
|
||||
| #{.MfaError}
|
||||
#totp-enroll-image.text-center.my-3
|
||||
img(data-image=.QrCode)
|
||||
form#login(method="post")
|
||||
.mb-3
|
||||
label.form-label(for="secret") Secret (si pas possible de scanner le code QR)
|
||||
input#secret.form-control(type="text", value!=.Secret, disabled)
|
||||
.mb-3
|
||||
label.form-label(for="otp") Code temporaire
|
||||
input#otp.form-control(type="text", required, name="otp", placeholder="000000" pattern="[0-9]{6}")
|
||||
.mt-3.text-end
|
||||
button.btn.btn-primary(type="submit")
|
||||
i.me-2(data-feather="check-circle")
|
||||
| Vérifier
|
||||
94
views/welcome.html
Normal file
94
views/welcome.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{% extends "layouts/main.html" %}
|
||||
|
||||
{% block main %}
|
||||
<div class="container">
|
||||
<div id="login-card" class="my-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Paramètres du compte
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if FormErrors %}
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mb-0">
|
||||
{% for error in FormErrors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form id="login" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
Adresse email
|
||||
</label>
|
||||
{% if EmailUpdate %}
|
||||
<input
|
||||
id="email"
|
||||
class="form-control"
|
||||
type="email"
|
||||
name="email"
|
||||
required
|
||||
value="{{ Email }}"
|
||||
>
|
||||
{% else %}
|
||||
<input
|
||||
id="email"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="email"
|
||||
disabled
|
||||
value="{{ Email }}"
|
||||
>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">
|
||||
Nom complet
|
||||
</label>
|
||||
<input
|
||||
id="name"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="name"
|
||||
required
|
||||
value="{{ Name }}"
|
||||
>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">
|
||||
Nouveau mot de passe
|
||||
</label>
|
||||
<input
|
||||
id="password"
|
||||
class="form-control"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password-verify" class="form-label">
|
||||
Vérifier le mot de passe
|
||||
</label>
|
||||
<input
|
||||
id="password-verify"
|
||||
class="form-control"
|
||||
type="password"
|
||||
name="password-verify"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="me-2" data-feather="save"></i>
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
include partials/header.pug
|
||||
|
||||
.container
|
||||
#login-card.my-5
|
||||
.card
|
||||
.card-header
|
||||
| Paramètres du compte
|
||||
.card-body
|
||||
if .FormErrors
|
||||
.alert.alert-danger
|
||||
| #{.FormErrors}
|
||||
form#login(method="post")
|
||||
.mb-3
|
||||
label.form-label(for="email") Adresse email
|
||||
if .EmailUpdate
|
||||
input#email.form-control(type="email", required, name="email", value=.Email)
|
||||
else
|
||||
input#email.form-control(type="text", disabled, name="email", value=.Email)
|
||||
.mb-3
|
||||
label.form-label(for="name") Nom complet
|
||||
input#name.form-control(type="text", required, name="name", value=.Name)
|
||||
.mb-3
|
||||
label.form-label(for="password") Nouveau mot de passe
|
||||
input#password.form-control(type="password", required, name="password")
|
||||
.mb-3
|
||||
label.form-label(for="password-verify") Vérifier le mot de passe
|
||||
input#password-verify.form-control(type="password", required, name="password-verify")
|
||||
.mt-3.text-end
|
||||
button.btn.btn-primary(type="submit")
|
||||
i.me-2(data-feather="save")
|
||||
| Enregistrer
|
||||
Loading…
Add table
Add a link
Reference in a new issue