diff --git a/assets/styles/login.css b/assets/styles/login.css new file mode 100644 index 0000000..733985c --- /dev/null +++ b/assets/styles/login.css @@ -0,0 +1,84 @@ +html { + background-image: url("asset/image/BackgroundLogin.jpg"); background-repeat: no-repeat; background-size: cover; + height: 100%; + width: 100%; +} + +body { + height: 100%; + width: 100%; +} + +.Login { + width: 100%; + height: 100%; +} +.Circle { + background: #db5559; + width: 41%; + height: 80%; + margin: 0 auto; + border-style: solid; + border-radius: 50%; + border-color: white; + border-width: 5px; +} +.Form { + background: #791c1c; + height: 40%; + width: 55%; + margin: auto; + border-style: solid; + border-radius: 50px; + border-color: white; + border-width: 2px; + text-align: center; + font-family: "Qwitcher Grypen", cursive; + font-size: 40px; + font-style: italic; + color: white; + padding-bottom: 0; + +} + +.Logo { + display: flex; + margin: auto; + margin-top: 8%; +} + +.Title1 { + margin: 0; + padding: 0; +} + +.Title2 { + display: grid; + place-items: center; + height: 7vh; + color: black; + font-family: "Qwitcher Grypen", cursive; + font-size: 40px; + margin: 0; +} + +.form-group{ + display: grid; + place-items: center; + height: 7vh; + align-items: center; + text-align: center; + /*margin-bottom: 10px;*/ +} + +.form-control{ + background-color: #f19595; + margin-left: 10px; + border-radius: 5px; +} + +.btn{ + background-color: #279b63; + border-radius: 6px; + height: 30px; +} \ No newline at end of file diff --git a/public/asset/image/BackgroundLogin.jpg b/public/asset/image/BackgroundLogin.jpg new file mode 100644 index 0000000..5a2825f Binary files /dev/null and b/public/asset/image/BackgroundLogin.jpg differ diff --git a/public/asset/image/BackgroundLogin.png b/public/asset/image/BackgroundLogin.png deleted file mode 100644 index c964f0b..0000000 Binary files a/public/asset/image/BackgroundLogin.png and /dev/null differ diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index 62662ba..05fc113 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -2,6 +2,7 @@ namespace App\Controller; +use App\Form\LoginFormType; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -10,8 +11,13 @@ use Symfony\Component\Routing\Attribute\Route; class LoginController extends AbstractController { #[Route('/login', name: 'app_login')] - public function index(): Response + public function index(Request $request): Response { - return $this->render('login/login.html.twig'); + $form = $this->createForm(LoginFormType::class); + $form->handleRequest($request); + + return $this->render('login/login.html.twig',[ + 'form' => $form->createView(), + ]); } } diff --git a/src/Form/LoginFormType.php b/src/Form/LoginFormType.php new file mode 100644 index 0000000..1b04d23 --- /dev/null +++ b/src/Form/LoginFormType.php @@ -0,0 +1,34 @@ +add('email', EmailType::class, [ + 'label' => 'Email', + ]) + ->add('password', PasswordType::class, [ + 'label' => 'Mot de passe', + ]) + ->add('confirm', SubmitType::class, [ + 'label' => 'Connexion', + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + // Configure your form options here + ]); + } +} diff --git a/templates/base.html.twig b/templates/base.html.twig index d743664..c98ef50 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -4,6 +4,9 @@