init project cleaned

This commit is contained in:
2023-01-05 11:21:32 +01:00
commit bc98268740
54 changed files with 3861 additions and 0 deletions

View 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 %}