init medias folder

This commit is contained in:
2023-01-06 17:00:19 +01:00
parent 2d9bf66b7a
commit ed25baf5f1
31 changed files with 216 additions and 906 deletions

View File

@@ -2,7 +2,6 @@
<html lang="en">
<head>
<title>{% block title %}{% endblock title %} - DrWhy</title>
{% block head %}
{% include 'includecss.html.twig' %}
{% endblock head %}
@@ -10,6 +9,5 @@
<body>
{% block body %}{% endblock body %}
{% block footer %}{% include 'includescript.html.twig' %}{% endblock footer %}
</body>
</html>

View File

@@ -1,16 +1,12 @@
<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>
{% if message_error is defined %}<div class="text-danger text-center font-weight-bold ">{{ message_error }}</div>{% endif %}
<div class="">
<label for="password">Mot de passe</label>
<input name="password" type="password" placeholder="mdp" required>
</div>
{# Password again #}
<div class="form-floating mt-3">
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
<div class="">
<label for="repassword">Confirmez le mot de passe</label>
<input name="repassword" type="password" placeholder="mdp" required>
</div>
{# Submit button #}
<button class="w-100 mb-2 btn btn-lg rounded-4 btn-primary mt-3" type="submit">Envoyer</button>
<button class="w-100 mb-2 btn btn-lg rounded-4 btn-primary " type="submit">Envoyer</button>
</form>

View File

@@ -1,13 +1,9 @@
<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>
<div class=" ">
<input 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>

View File

@@ -1,43 +1,20 @@
<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">
{% if message_login is defined %}<div class="text-danger text-center font-weight-bold ">{{ message_login }}</div>{% endif %}
<div class="">
<label for="floatingUser">Nom d'utilisateur ou Email</label>
<input name="username" type="text" id="floatingUser" placeholder="name@example.com">
</div>
{# Password #}
<div class="form-floating mb-3">
<input name="password" type="password" class="form-control rounded-4" id="floatingPassword" placeholder="Password">
<div class="">
<label for="floatingPassword">Mot de passe</label>
<input name="password" type="password" id="floatingPassword" placeholder="Password">
</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 #}
<button class="w-100 btn btn-lg rounded-4 btn-primary" type="submit">Se connecter</button>
<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>
data-client_id="1041713159432-vad6qp7ce7p9iid9qjdiopi7n6ajvmtv.apps.googleusercontent.com"
data-login_uri="/auth"
data-auto_prompt="false"
></div>
<button class="g_id_signin"></button>
<a href="/forgotpassword" class="color-hover">Mot de passe oublié ?</a><br>
<a href="/register" class="color-hover">Créer un compte</a>
</form>

View File

@@ -1,78 +1,37 @@
<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 %}
{% if message_register is defined %}<div class="text-danger font-weight-bold ">{{ message_register }}</div>{% endif %}
{# UserName #}
<div class="form-floating mt-3">
<input class="form-control" name="username" type="text" placeholder="JohnDoe" required>
<div class="">
<label for="username">Nom d'utilisateur</label>
<input name="username" type="text" placeholder="JohnDoe" required>
</div>
{# Email #}
<div class="form-floating mt-3">
<input class="form-control" name="email" type="email" placeholder = "mail@example.com" required>
<div class="">
<label for="username">Email</label>
<input name="email" type="email" placeholder = "mail@example.com" required>
</div>
{# Password #}
<div class="form-floating mt-3">
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp" required>
<div class="">
<label for="password">Mot de passe</label>
<input name="password" type="password" placeholder="mdp" required>
</div>
{# Password again #}
<div class="form-floating mt-3">
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
<div class="">
<label for="repassword">Confirmez le mot de passe</label>
<input name="repassword" type="password" placeholder="mdp" required>
</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"/>
<div class="">
<label for="input-image">
<span>Image de profil </span>
<input name="image" type="file" accept="image/png, image/jpg, image/gif, image/jpeg"/>
</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 #}
<button type="submit">S'inscrire</button>
<div id="g_id_onload"
data-client_id="1041713159432-vad6qp7ce7p9iid9qjdiopi7n6ajvmtv.apps.googleusercontent.com"
data-login_uri="/auth"
data-auto_prompt="false"
></div>
<button class="g_id_signin"></button>
<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>
<hr>
</form>

View File

@@ -1,26 +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 >
<div class="">
<input 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>
<div class="">
<input 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>
<div class="">
<input 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 %}
{% if message is defined %}<div class="text-danger font-weight-bold ">{{ message }}</div>{% endif %}
{# Password again #}
<div class="form-floating mt-3">
<input class="form-control" name="repassword" type="password" placeholder="mdp" required>
<div class="">
<input 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>
<button class="w-100 btn btn-lg rounded-4 btn-primary" type="submit">S'inscrire</button>
</form>

View File

@@ -1,23 +1,60 @@
<header>
<nav>
<ul>
</ul>
<ul>
<li><img src="/static/img/logo.svg" alt="DrWhy" height="24" width="24"></li>
<li><img src="/static/img/logo.svg" alt="DrWhy" height="75" width="75"></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>
<li>
<details role="list">
<summary class="mdi mdi-movie" aria-haspopup="listbox" role="Link">
Series
</summary>
<ul role="listbox">
<li><a href="/medias?q=/Series/DrWho">Dr WHO(2005)</a></li>
<li><a href="/medias?q=/Series/DrWho Classic">Dr WHO Classic(1963)</a></li>
<li><a href="/medias?q=/Series/Torchwood">Torchwood</a></li>
<li><a href="/medias?q=/Series/The Sarah Jane Adventures">The Sarah Jane Adventures</a></li>
<li><a href="/medias?q=/Series/Class">Class</a></li>
<li><a href="/medias?q=/Series/K-9">K-9</a></li>
</ul>
</details>
</li>
<li>
<details role="list">
<summary class="mdi mdi-thought-bubble" aria-haspopup="listbox" role="Link">
BD
</summary>
<ul role="listbox">
<li><a href="/medias?q=/BD">Comming soon</a></li>
</ul>
</details>
</li>
<li>
<details role="list">
<summary class="mdi mdi-book-open-variant" aria-haspopup="listbox" role="Link">
Romans
</summary>
<ul role="listbox">
<li><a href="/medias?q=/Romans">Comming soon</a></li>
</ul>
</details>
</li>
<li>
<details role="list">
<summary class="mdi mdi-podcast" aria-haspopup="listbox" role="Link">
Podcast
</summary>
<ul role="listbox">
<li><a href="/medias?q=/Podcast">Comming soon</a></li>
</ul>
</details>
</li>
</ul>
<ul>
{% if user is defined %}
<details role="list">
<summary aria-haspopup="listbox" role="button">
<summary aria-haspopup="listbox" role="Link">
<img src="{{user.image}}" alt="avatar" class="rounded" width="50" height="50">
</summary>
<ul role="listbox">
@@ -26,8 +63,8 @@
</ul>
</details>
{% else %}
<button class="contrast" data-target="modal-signin" onClick="toggleModal(event)">Inscription</button>
<button class="contrast" data-target="modal-login" onClick="toggleModal(event)">Connexion</button>
<button class="outline" data-target="modal-signin" onClick="toggleModal(event)">Inscription</button>
<button class="outline" data-target="modal-login" onClick="toggleModal(event)">Connexion</button>
{# <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 %}
@@ -35,6 +72,8 @@
<ul>
</ul>
</nav>
{% if user is not defined %}
<dialog id="modal-login">
<article>
<a href="#close"
@@ -57,38 +96,4 @@
{% include 'forms/user/register.html.twig' %}
</article>
</dialog>
{% 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 %}

View File

@@ -11,9 +11,11 @@
<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 href="https://unpkg.com/@videojs/themes@1/dist/fantasy/index.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css" rel="stylesheet">
<script src="https://accounts.google.com/gsi/client"></script>
<link rel="stylesheet" href="/static/css/pico.min.css">
<script src="/static/js/modal.js"></script>
<script src="/static/js/modal.js"></script>

View File

@@ -2,10 +2,8 @@
{% block title %}Acceuil{% endblock %}
{% block body %}
<body>
{% include "header.html.twig" %}
{% include "footer.html.twig"%}
</body>

View File

@@ -0,0 +1,19 @@
{% extends 'base.html.twig' %}
{% block title %}Acceuil{% endblock %}
{% block body %}
<body>
{% include "header.html.twig" %}
<nav aria-label="breadcrumb">
{% set current_path = "" %}
<ul>
{% for item in path|split(pat="/") %}
{% set current_path = current_path ~ "/" ~ item %}
<li><a href="/medias?q={{current_path}}">{{item}}</a></li>
{% endfor %}
</ul>
</nav>
{% include "footer.html.twig"%}
</body>
{% endblock %}

View File

@@ -9,41 +9,41 @@
<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">
<div style="width: 75%; margin: auto">
<h2 class="fw-bold ">Profil</h2>
<form action="/profile/{{user.id}}" 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}}">
<div class="">
<label for="username">Nom d'utilisateur</label>
<input name="username" type="text" placeholder="JohnDoe" value="{{user.username}}">
</div>
{# Email #}
<div class="form-floating mt-3">
<input class="form-control" name="email" type="email" placeholder = "mail@example.com" value="{{user.email}}">
<div class="">
<label for="username">Email</label>
<input name="email" type="email" placeholder = "mail@example.com" value="{{user.email}}">
</div>
{# Password #}
<div class="form-floating mt-3">
<input class="form-control rounded-4" name="password" type="password" placeholder="mdp">
<div class="">
<label for="password">Mot de passe</label>
<input name="password" type="password" placeholder="mdp">
</div>
{# Error message #}
{% if message_register is defined %}<div class="text-danger font-weight-bold mt-3">{{ message_register }}</div>{% endif %}
{% if message_register is defined %}<div class="text-danger font-weight-bold ">{{ message_register }}</div>{% endif %}
{# Password again #}
<div class="form-floating mt-3">
<input class="form-control" name="repassword" type="password" placeholder="mdp" >
<div class="">
<label for="repassword">Confirmez le mot de passe</label>
<input name="repassword" type="password" placeholder="mdp" >
</div>
{# Image #}
<div class="form-group mt-3 w-50" style="float:left">
<div class=" w-50" style="float:left">
<input name="image" type="file">
<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">
<img src="{{user.image}}" alt="Image de profil" height="128" class="">
</div>
{# Submit #}
<button class="mt-3 mb-3 btn btn-lg rounded-4 btn-primary" type="submit">Modifier</button>
<button class=" 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>
@@ -51,20 +51,13 @@
{% 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>
<p class="text-center ">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>
data-client_id="1041713159432-vad6qp7ce7p9iid9qjdiopi7n6ajvmtv.apps.googleusercontent.com"
data-login_uri="/auth"
data-auto_prompt="false"
></div>
<button class="g_id_signin"></button>
{% endif %}
</main>
{% include "footer.html.twig"%}