init project cleaned
This commit is contained in:
15
templates/base.html.twig
Executable file
15
templates/base.html.twig
Executable file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{% block title %}{% endblock title %} - DrWhy</title>
|
||||
|
||||
{% block head %}
|
||||
{% include 'includecss.html.twig' %}
|
||||
{% endblock head %}
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock body %}
|
||||
{% block footer %}{% include 'includescript.html.twig' %}{% endblock footer %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
28
templates/catch/404.html.twig
Executable file
28
templates/catch/404.html.twig
Executable file
@@ -0,0 +1,28 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Erreur 404{% endblock %}
|
||||
{% block body %}
|
||||
|
||||
<div class="text-center pt-5" style="height:100vh;">
|
||||
|
||||
<img src="/static/img/404.png" alt="404" class="zoom-hover" style="max-width:100vw;">
|
||||
|
||||
<i class="h5 d-block pb-4"> La page que vous essayez d'atteindre n'existe pas ou vous n'êtes pas autorisé à la voir.</i>
|
||||
|
||||
<hr class="mx-5 mb-4">
|
||||
|
||||
<a href="/" class="btn btn-primary mdi mdi-arrow-left me-2"> Page d'accueil</a>
|
||||
|
||||
<a href="/login" class="btn btn-outline-primary ms-2"> Login <span class="mdi mdi-arrow-right"></span> <a/>
|
||||
|
||||
</div>
|
||||
|
||||
<style media="screen">
|
||||
.zoom-hover {
|
||||
transition: transform .5s ease;
|
||||
}
|
||||
.zoom-hover:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
||||
30
templates/catch/500.html.twig
Normal file
30
templates/catch/500.html.twig
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Erreur 404{% endblock %}
|
||||
{% block body %}
|
||||
|
||||
<div class="text-center pt-5" style="height:100vh;">
|
||||
|
||||
{{message_erreur}}
|
||||
|
||||
<img src="/static/img/404.png" alt="404" class="zoom-hover" style="max-width:100vw;">
|
||||
|
||||
<i class="h5 d-block pb-4"> La page que vous essayez d'atteindre n'existe pas ou vous n'êtes pas autorisé à la voir.</i>
|
||||
|
||||
<hr class="mx-5 mb-4">
|
||||
|
||||
<a href="/" class="btn btn-primary mdi mdi-arrow-left me-2"> Page d'accueil</a>
|
||||
|
||||
<a href="/login" class="btn btn-outline-primary ms-2"> Login <span class="mdi mdi-arrow-right"></span> <a/>
|
||||
|
||||
</div>
|
||||
|
||||
<style media="screen">
|
||||
.zoom-hover {
|
||||
transition: transform .5s ease;
|
||||
}
|
||||
.zoom-hover:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
||||
11
templates/footer.html.twig
Normal file
11
templates/footer.html.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
<footer class="footer mt-auto py-3 bg-transparent">
|
||||
<div class="container">
|
||||
<span class="text-muted">©DigitaruCamera : SORLIN Valentin.</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<style media="screen">
|
||||
.footer {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
</style>
|
||||
16
templates/forms/user/change_password.html.twig
Normal file
16
templates/forms/user/change_password.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
<form class="" action="/change_password/{{user.password}}" method="post" enctype="multipart/form-data">
|
||||
{# Error message #}
|
||||
{% if message_error is defined %}<div class="text-danger text-center font-weight-bold mb-3">{{ message_error }}</div>{% endif %}
|
||||
{# Password #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp" required>
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mb-2 btn btn-lg rounded-4 btn-primary mt-3" type="submit">Envoyer</button>
|
||||
</form>
|
||||
13
templates/forms/user/forgotpassword.html.twig
Normal file
13
templates/forms/user/forgotpassword.html.twig
Normal file
@@ -0,0 +1,13 @@
|
||||
<form class="" action="/forgotpassword" method="post" enctype="multipart/form-data">
|
||||
{# Email #}
|
||||
<div class="form-floating mt-3 mb-3">
|
||||
<input class="form-control" name="email" type="email" placeholder="JohnDoe" required>
|
||||
<label for="email">Email</label>
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mb-2 btn btn-lg rounded-4 btn-primary" type="submit">Envoyer</button>
|
||||
{# Forgot password #}
|
||||
<a href="/login" class="text-muted fs-6">Se connecter</a><br>
|
||||
{# Register #}
|
||||
<a href="/register" class="text-muted fs-6">Créer un compte</a>
|
||||
</form>
|
||||
43
templates/forms/user/login.html.twig
Normal file
43
templates/forms/user/login.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
<form class="" action="/login" method="post">
|
||||
{% if message_login is defined %}<div class="text-danger text-center font-weight-bold mb-3">{{ message_login }}</div>{% endif %}
|
||||
{# Email #}
|
||||
<div class="form-floating mb-3">
|
||||
<input name="username" type="text" class="form-control rounded-4" id="floatingUser" placeholder="name@example.com">
|
||||
<label for="floatingUser">Nom d'utilisateur ou Email</label>
|
||||
</div>
|
||||
{# Password #}
|
||||
<div class="form-floating mb-3">
|
||||
<input name="password" type="password" class="form-control rounded-4" id="floatingPassword" placeholder="Password">
|
||||
<label for="floatingPassword">Mot de passe</label>
|
||||
</div>
|
||||
{# Error message #}
|
||||
{# Submit button #}
|
||||
<button class="w-100 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">Se connecter</button>
|
||||
{# Forgot password #}
|
||||
<a href="/forgotpassword" class="color-hover">Mot de passe oublié ?</a><br>
|
||||
{# Register #}
|
||||
<a href="/register" class="color-hover">Créer un compte</a>
|
||||
{# Divider #}
|
||||
<hr class="my-4">
|
||||
{# Third party #}
|
||||
<h2 class="fs-5 fw-bold mb-3 text-center">Ou</h2>
|
||||
{# Google #}
|
||||
<div id="g_id_onload"
|
||||
data-client_id="723424966880-015kn0qncavlgbj4j3k1ggs3arn7tdkd.apps.googleusercontent.com"
|
||||
data-login_uri="/auth"
|
||||
data-auto_prompt="false">
|
||||
</div>
|
||||
<div class="g_id_signin d-flex justify-content-center mb-2"
|
||||
data-type="standard"
|
||||
data-size="large"
|
||||
data-theme="filled_black"
|
||||
data-text="sign_in_with"
|
||||
data-shape="rectangular"
|
||||
data-logo_alignment="left">
|
||||
</div>
|
||||
{# GitHub #}
|
||||
<button class=" w-100 py-2 mb-2 btn btn-outline-secondary rounded-4" type="submit">
|
||||
<span class="mdi mdi-github"></span>
|
||||
Se connecter avec GitHub
|
||||
</button>
|
||||
</form>
|
||||
78
templates/forms/user/register.html.twig
Normal file
78
templates/forms/user/register.html.twig
Normal file
@@ -0,0 +1,78 @@
|
||||
<form class="" action="/register" method="post" enctype="multipart/form-data">
|
||||
{# Error message #}
|
||||
{% if message_register is defined %}<div class="text-danger font-weight-bold mt-3">{{ message_register }}</div>{% endif %}
|
||||
{# UserName #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="username" type="text" placeholder="JohnDoe" required>
|
||||
<label for="username">Nom d'utilisateur</label>
|
||||
</div>
|
||||
{# Email #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="email" type="email" placeholder = "mail@example.com" required>
|
||||
<label for="username">Email</label>
|
||||
</div>
|
||||
{# Password #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp" required>
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Image #}
|
||||
<div class="form-group mt-3">
|
||||
<label for="input-image" class="input-label-img d-flex">
|
||||
<input name="image" type="file" accept="image/png, image/jpg, image/gif, image/jpeg"/>
|
||||
<span>Image de profil </span>
|
||||
</label>
|
||||
{# <label class="" for="image">Image</label>
|
||||
<input class="form-control" name="image" type="file"> #}
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">S'inscrire</button>
|
||||
{# Login #}
|
||||
<a href="/forgotpassword" class="color-hover">Mot de passe oublié ?</a><br>
|
||||
<a href="/login" class="color-hover">Se connecter</a>
|
||||
{# Divider #}
|
||||
<hr class="my-4">
|
||||
{# Third-Party #}
|
||||
<h2 class="fs-5 fw-bold mb-3 text-center">Ou</h2>
|
||||
{# Google #}
|
||||
<div id="g_id_onload"
|
||||
data-client_id="723424966880-015kn0qncavlgbj4j3k1ggs3arn7tdkd.apps.googleusercontent.com"
|
||||
data-login_uri="/auth"
|
||||
data-auto_prompt="false">
|
||||
</div>
|
||||
<div class="g_id_signin d-flex justify-content-center mb-2"
|
||||
data-type="standard"
|
||||
data-size="large"
|
||||
data-theme="filled_black"
|
||||
data-text="sign_in_with"
|
||||
data-shape="rectangular"
|
||||
data-logo_alignment="left">
|
||||
</div>
|
||||
{# GitHub #}
|
||||
<button class=" w-100 py-2 mb-2 btn btn-outline-secondary rounded-4" type="submit">
|
||||
<span class="mdi mdi-github"></span>
|
||||
Se connecter avec GitHub
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{# CSS #}
|
||||
<style media= "screen" >
|
||||
.input-label-img {
|
||||
border: 1px solid #ccc;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
border-radius: 0.25rem;
|
||||
height: calc(3.5rem + 2px);
|
||||
padding: 1rem 0.75rem;
|
||||
}
|
||||
.input-label-img > input {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
26
templates/forms/user/register_google.html.twig
Normal file
26
templates/forms/user/register_google.html.twig
Normal file
@@ -0,0 +1,26 @@
|
||||
<form class="" action="/register_google/{{registrable_user.username}}" method="post" enctype="multipart/form-data">
|
||||
{# Email #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="email" type="email" value ={{registrable_user.email}} placeholder = "mail@example.com" disabled >
|
||||
<label for="username">Email</label>
|
||||
</div>
|
||||
{# UserName #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="username" type="text" placeholder="JohnDoe" value ={{registrable_user.email}} required>
|
||||
<label for="username">Nom d'utilisateur</label>
|
||||
</div>
|
||||
{# Password #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp" required>
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Error message #}
|
||||
{% if message is defined %}<div class="text-danger font-weight-bold mt-3">{{ message }}</div>{% endif %}
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Submit button #}
|
||||
<button class="w-100 mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">S'inscrire</button>
|
||||
</form>
|
||||
97
templates/header.html.twig
Normal file
97
templates/header.html.twig
Normal file
@@ -0,0 +1,97 @@
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><img src="/static/img/logo.svg" alt="DrWhy" height="24" width="24"></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="#">Dr WHO(2005)</a></li>
|
||||
<li><a href="#">Dr WHO Classic(1963)</a></li>
|
||||
<li><a href="#">Torchwood</a></li>
|
||||
<li><a href="#">Sarah janes adventure</a></li>
|
||||
<li><a href="#">K-9</a></li>
|
||||
<li><a href="#">K-9 and Company</a></li>
|
||||
<li><a href="#">Class</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark" id="navbar" style="background-color: hsl(210deg 11% 20%) !important;">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="/static/img/logo.svg" alt="DrWhy" height="24">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-md-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="/#anchorStart">COMMENCER</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/#features">FONCTIONNALITES</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/#example">EXEMPLES</a>
|
||||
</li>
|
||||
</ul>
|
||||
{# <form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3">
|
||||
<input type="search" class="form-control" placeholder="Search..." aria-label="Search">
|
||||
</form> #}
|
||||
|
||||
{% if user is defined %}
|
||||
<a href="/dashboard" class="btn btn-primary">Tableaux de bord</a>
|
||||
<div class="dropdown text-end ms-2">
|
||||
<a href="#" class="d-block link-light text-decoration-none dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<img src="{{user.image}}" alt="avatar" class="rounded" width="38" height="38">
|
||||
</a>
|
||||
<ul class="dropdown-menu text-small" aria-labelledby="dropdownUser1" style="left:-6.5rem">
|
||||
<li><a class="dropdown-item" href="/profile/{{user.id}}">Profil</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item text-danger" href="/logout">Deconnexion</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-primary text-light ms-2" data-bs-toggle="modal" data-bs-target="#modalSignUp">Inscription</button>
|
||||
<button type="button" class="btn btn-black text-light ms-2" data-bs-toggle="modal" data-bs-target="#modalLogIn">Connexion</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
{# <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal"> #}
|
||||
|
||||
{% if user is not defined %}
|
||||
{# Modal pour LogIn #}
|
||||
<div class="modal fade" role="dialog" id="modalLogIn">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 shadow">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<!-- <h5 class="modal-title">Modal title</h5> -->
|
||||
<h2 class="fw-bold mb-0">Connexion</h2>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/login.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Modal pour SignUp #}
|
||||
<div class="modal fade" role="dialog" id="modalSignUp">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 shadow">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<!-- <h5 class="modal-title">Modal title</h5> -->
|
||||
<h2 class="fw-bold mb-0">Inscription</h2>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/register.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
18
templates/includecss.html.twig
Normal file
18
templates/includecss.html.twig
Normal file
@@ -0,0 +1,18 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="dr_who_website">
|
||||
<meta name="author" content="https://sorlinv.fr/">
|
||||
|
||||
|
||||
<!-- Favicons -->
|
||||
<link rel="apple-touch-icon" href="/static/favicon.png" sizes="180x180">
|
||||
<link rel="icon" href="/static/favicon.png" type="image/png">
|
||||
<link rel="mask-icon" href="/static/favicon.png" color="#7952b3">
|
||||
<meta name="theme-color" content="#333333">
|
||||
|
||||
<link href="https://vjs.zencdn.net/7.17.0/video-js.css" rel="stylesheet" />
|
||||
<link href="https://unpkg.com/@videojs/themes@1/dist/fantasy/index.css" rel="stylesheet">
|
||||
|
||||
<script src="https://accounts.google.com/gsi/client" async defer></script>
|
||||
|
||||
<link rel="stylesheet" href="/static/css/pico.min.css">
|
||||
0
templates/includescript.html.twig
Normal file
0
templates/includescript.html.twig
Normal file
12
templates/index.html.twig
Executable file
12
templates/index.html.twig
Executable file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Acceuil{% endblock %}
|
||||
{% block body %}
|
||||
<body>
|
||||
|
||||
{% include "header.html.twig" %}
|
||||
|
||||
|
||||
{% include "footer.html.twig"%}
|
||||
|
||||
</body>
|
||||
{% endblock %}
|
||||
5
templates/mail/forgot_password.html.twig
Normal file
5
templates/mail/forgot_password.html.twig
Normal file
@@ -0,0 +1,5 @@
|
||||
<h3>DrWhy</h3>
|
||||
<div>
|
||||
<img src="{{uri}}/static/img/logo.svg" alt="logo">
|
||||
</div>
|
||||
<p>Bonjour {{user.username}}, pour rénitialiser votre mot de passe cliquez : <a href="{{uri}}/change_password/{{user.password}}">ICI</a></p>sssss
|
||||
2
templates/mail/welcome.html.twig
Normal file
2
templates/mail/welcome.html.twig
Normal file
@@ -0,0 +1,2 @@
|
||||
<h3>Bienvenue {{user.username}} sur le site DrWhy</h3>
|
||||
<p>Validez votre mail <a href="{{uri}}/user/validate/{{user.email_valid}}">ICI</a></p>
|
||||
30
templates/user/change_password.html.twig
Normal file
30
templates/user/change_password.html.twig
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Rénitialisation mot de passe{% endblock %}
|
||||
{% block body %}
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.html.twig"%}
|
||||
<main>
|
||||
|
||||
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 border-0">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<h2 class="fw-bold mb-0">Choisir un nouveau mot de passe</h2>
|
||||
</div>
|
||||
{# Message changement ok #}
|
||||
{% if message_changement is defined %}<div class="text-success font-weight-bold ps-5 pe-5">{{ message_changement }}</div>{% endif %}
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/change_password.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% include "footer.html.twig"%}
|
||||
</body>
|
||||
|
||||
{% endblock %}
|
||||
32
templates/user/forgotpassword.html.twig
Normal file
32
templates/user/forgotpassword.html.twig
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Mot de passe oublié{% endblock %}
|
||||
{% block body %}
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.html.twig"%}
|
||||
<main>
|
||||
|
||||
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 border-0">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<!-- <h5 class="modal-title">Modal title</h5> -->
|
||||
<h2 class="fw-bold mb-0">Mot de passe oublié</h2>
|
||||
</div>
|
||||
{# Message mail envoyé ou pas#}
|
||||
{% if message_password is defined %}<div class="text-success font-weight-bold ps-5 pe-5">{{ message_password }}</div>{% endif %}
|
||||
{% if message_mail_nok is defined %}<div class="text-danger font-weight-bold ps-5 pe-5">{{ message_mail_nok }}</div>{% endif %}
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/forgotpassword.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% include "footer.html.twig"%}
|
||||
</body>
|
||||
|
||||
{% endblock %}
|
||||
30
templates/user/login.html.twig
Executable file
30
templates/user/login.html.twig
Executable file
@@ -0,0 +1,30 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Connexion{% endblock %}
|
||||
{% block body %}
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.html.twig"%}
|
||||
<main>
|
||||
|
||||
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 border-0">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<!-- <h5 class="modal-title">Modal title</h5> -->
|
||||
<h2 class="fw-bold mb-0">Connexion</h2>
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/login.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% include "footer.html.twig"%}
|
||||
</body>
|
||||
|
||||
{% endblock %}
|
||||
75
templates/user/profile.html.twig
Normal file
75
templates/user/profile.html.twig
Normal file
@@ -0,0 +1,75 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}{{user.username}}{% endblock %}
|
||||
{% block body %}
|
||||
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include 'header.html.twig' %}
|
||||
<main>
|
||||
<div class="d-flex flex-column justify-content-center align-items-center">
|
||||
<h2 class="fw-bold mt-3">Profil</h2>
|
||||
<form action="/profile/{{user.id}}" class="w-75" method="post" enctype="multipart/form-data">
|
||||
{# Username #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="username" type="text" placeholder="JohnDoe" value="{{user.username}}">
|
||||
<label for="username">Nom d'utilisateur</label>
|
||||
</div>
|
||||
{# Email #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="email" type="email" placeholder = "mail@example.com" value="{{user.email}}">
|
||||
<label for="username">Email</label>
|
||||
</div>
|
||||
{# Password #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp">
|
||||
<label for="password">Mot de passe</label>
|
||||
</div>
|
||||
{# Error message #}
|
||||
{% if message_register is defined %}<div class="text-danger font-weight-bold mt-3">{{ message_register }}</div>{% endif %}
|
||||
{# Password again #}
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" name="repassword" type="password" placeholder="mdp" >
|
||||
<label for="repassword">Confirmez le mot de passe</label>
|
||||
</div>
|
||||
{# Image #}
|
||||
<div class="form-group mt-3 w-50" style="float:left">
|
||||
<label for="image">Image</label>
|
||||
<input class="form-control" name="image" type="file">
|
||||
</div>
|
||||
<div class ="w-50 ps-4" style="float:right">
|
||||
<img src="{{user.image}}" alt="Image de profil" height="128" class="mt-3">
|
||||
</div>
|
||||
{# Submit #}
|
||||
<button class="mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">Modifier</button>
|
||||
{# Delete #}
|
||||
<a class=" btn btn-lg ms-3 rounded-4 btn-danger" href="/delete/{{user.id}}" comfirm="Êtes vous sure de vouloir supprimer votre compte ?">Supprimer le compte</a
|
||||
</form>
|
||||
{# Message profil maj #}
|
||||
{% if message_profile is defined %}<div class="text-success font-weight-bold">{{ message_profile }}</div>{% endif %}
|
||||
</div>
|
||||
{% if user.google == "" %}
|
||||
<p class="text-center mt-3">AJOUTER GOOGLE AU COMPTE</p>
|
||||
<div id="g_id_onload"
|
||||
data-client_id="723424966880-015kn0qncavlgbj4j3k1ggs3arn7tdkd.apps.googleusercontent.com"
|
||||
data-login_uri="/auth/{{user.id}}"
|
||||
data-auto_prompt="false">
|
||||
</div>
|
||||
<div class="g_id_signin d-flex justify-content-center mb-2"
|
||||
data-type="standard"
|
||||
data-size="large"
|
||||
data-theme="filled_black"
|
||||
data-text="sign_in_with"
|
||||
data-shape="rectangular"
|
||||
data-logo_alignment="left">
|
||||
</div>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% include "footer.html.twig"%}
|
||||
</body>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
31
templates/user/register.html.twig
Normal file
31
templates/user/register.html.twig
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Inscription{% endblock %}
|
||||
{% block body %}
|
||||
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.html.twig"%}
|
||||
<main>
|
||||
|
||||
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 border-0">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<!-- <h5 class="modal-title">Modal title</h5> -->
|
||||
<h2 class="fw-bold mb-0">Inscription</h2>
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/register.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% include "footer.html.twig"%}
|
||||
</body>
|
||||
|
||||
{% endblock %}
|
||||
28
templates/user/register_google.html.twig
Normal file
28
templates/user/register_google.html.twig
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Inscription{% endblock %}
|
||||
{% block body %}
|
||||
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.html.twig"%}
|
||||
<main>
|
||||
<div class="my-5 modal position-static d-block" tabindex="-1" role="dialog" id="modalSignup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content rounded-5 border-0">
|
||||
<div class="modal-header p-5 pb-4 border-bottom-0">
|
||||
<h2 class="fw-bold mb-0">Inscription via Google</h2>
|
||||
<img src="/static/img/Google_logo.png" alt="Google_logo" height="50" >
|
||||
</div>
|
||||
<div class="modal-body p-5 pt-0">
|
||||
{% include 'forms/user/register_google.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% include "footer.html.twig"%}
|
||||
</body>
|
||||
|
||||
{% endblock %}
|
||||
37
templates/user/user_admin.html.twig
Normal file
37
templates/user/user_admin.html.twig
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Administration utilisateurs{% endblock %}
|
||||
{% block body %}
|
||||
<head>
|
||||
<!-- Custom -->
|
||||
<link href="/static/dashboard/dashboard.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
{% include 'header.html.twig' %}
|
||||
{# {% include 'forms/video' %} #}
|
||||
<div class="card m-4">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead class="text-uppercase">
|
||||
<tr>
|
||||
<th scope="col" style="max-width: 80px">Image</th>
|
||||
<th scope="col" class="w-100">Username<a class="btn btn-primary mdi mdi-account-plus" href="/add_user"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td><img src="{{user.image}}" alt="" style="max-width: 80px"></td>
|
||||
{% if user.password == "" %}
|
||||
<td>
|
||||
<button class="btn btn-primary mdi mdi-content-copy copy-input" input="#copyKey{{user.id}}"></button>
|
||||
<input type="text" value="{{uri}}/register/{{ user.username }}" id="copyKey{{user.id}}">
|
||||
</td>
|
||||
{% else %}
|
||||
<td>{{user.username}}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
15
templates/user/user_deleted.html.twig
Normal file
15
templates/user/user_deleted.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Compte supprimé{% endblock %}
|
||||
{% block body %}
|
||||
|
||||
<div class="text-center pt-5" style="height:100vh;">
|
||||
|
||||
<h1>Votre compte a bien été supprimé</h1>
|
||||
|
||||
<hr class="mx-5 mb-4">
|
||||
|
||||
<a href="/" class="btn btn-primary btn-lg mdi mdi-arrow-left"> Accueil</a>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user