Fix login + css

php
Antoine JOURDAIN 1 year ago
parent 4bf463ffdd
commit 4f1f9fa466

@ -144,7 +144,7 @@ class AbsController
if (!$this->checkLoginExist($login)) throw new Exception(("login invalide")); if (!$this->checkLoginExist($login)) throw new Exception(("login invalide"));
$user = $model->connection($login, $password); $user = $model->connection($login, $password);
if ($user == null) throw new Exception("mot de passe invalide"); if ($user == null) throw new Exception("mot de passe invalide");
$this->home(); FrontController::home();
} }
public function checkLoginExist(string $login): bool { public function checkLoginExist(string $login): bool {
@ -155,7 +155,7 @@ class AbsController
public function disconnect(): void { public function disconnect(): void {
$mdl = new MdlStudent(); $mdl = new MdlStudent();
$mdl->deconnection(); $mdl->deconnection();
$this->home(); FrontController::home();
} }
public function resultatsJeux(): void{ public function resultatsJeux(): void{

@ -87,9 +87,8 @@ class FrontController
} }
} }
public function home(): void { public static function home(): void {
global $twig; global $twig;
echo $twig->render('home.html'); echo $twig->render('home.html');
var_dump($_SESSION['roles']);
} }
} }

@ -16,7 +16,7 @@
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet" /> rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)--> <!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" /> <link href="{{base}}/css/styles.css" rel="stylesheet" />
</head> </head>
<body id="page-top"> <body id="page-top">
@ -64,7 +64,7 @@
</p> </p>
</div> </div>
</div> </div>
<img class="img-fluid" src="assets/img/ipad.png" alt="..." /> <img class="img-fluid" src="{{base}}/assets/img/ipad.png" alt="..." />
</div> </div>
</section> </section>
@ -74,7 +74,7 @@
<div class="container px-4 px-lg-5" id="game"> <div class="container px-4 px-lg-5" id="game">
<!-- Game One Row--> <!-- Game One Row-->
<div class="row gx-0 mb-5 mb-lg-0 justify-content-center"> <div class="row gx-0 mb-5 mb-lg-0 justify-content-center">
<div class="col-lg-6"><img class="img-fluid" src="assets/img/quizz.jpeg" alt="..." /></div> <div class="col-lg-6"><img class="img-fluid" src="{{base}}/assets/img/quizz.jpeg" alt="..." /></div>
<div class="col-lg-6"> <div class="col-lg-6">
<div class="bg-black text-center h-100 project"> <div class="bg-black text-center h-100 project">
<div class="d-flex h-100"> <div class="d-flex h-100">
@ -88,7 +88,7 @@
</div> </div>
<!-- Game Two Row--> <!-- Game Two Row-->
<div class="row gx-0 justify-content-center"> <div class="row gx-0 justify-content-center">
<div class="col-lg-6"><img class="img-fluid" src="assets/img/memory.jpeg" alt="..." /></div> <div class="col-lg-6"><img class="img-fluid" src="{{base}}/assets/img/memory.jpeg" alt="..." /></div>
<div class="col-lg-6 order-lg-first"> <div class="col-lg-6 order-lg-first">
<div class="bg-black text-center h-100 project"> <div class="bg-black text-center h-100 project">
<div class="d-flex h-100"> <div class="d-flex h-100">
@ -107,8 +107,8 @@
<h1 class="display-1 lh-1 mb-3">Download now</h1> <h1 class="display-1 lh-1 mb-3">Download now</h1>
<p class="lead fw-normal mb-5">Start to learn english now with the mobile app!<br>Available on Android & iOS.</p> <p class="lead fw-normal mb-5">Start to learn english now with the mobile app!<br>Available on Android & iOS.</p>
<div class="d-flex flex-column flex-lg-row align-items-center"> <div class="d-flex flex-column flex-lg-row align-items-center">
<a class="me-lg-3 mb-4 mb-lg-0" href="https://play.google.com"><img class="app-badge" src="assets/img/google-play-badge.svg" alt="..." /></a> <a class="me-lg-3 mb-4 mb-lg-0" href="https://play.google.com"><img class="app-badge" src="{{base}}/assets/img/google-play-badge.svg" alt="..." /></a>
<a href="https://www.apple.com/fr/app-store/"><img class="app-badge" src="assets/img/app-store-badge.svg" alt="..." /></a> <a href="https://www.apple.com/fr/app-store/"><img class="app-badge" src="{{base}}/assets/img/app-store-badge.svg" alt="..." /></a>
</div> </div>
</div> </div>
</div> </div>
@ -118,7 +118,7 @@
<div class="device-wrapper"> <div class="device-wrapper">
<div class="device" data-device="iPhoneX" data-orientation="portrait" data-color="black"> <div class="device" data-device="iPhoneX" data-orientation="portrait" data-color="black">
<div class="screen bg-black"> <div class="screen bg-black">
<video muted="muted" autoplay="" loop="" style="max-width: 100%; height: 100%"><source src="assets/img/demo-screen.mp4" type="video/mp4" /></video> <video muted="muted" autoplay="" loop="" style="max-width: 100%; height: 100%"><source src="{{base}}/assets/img/demo-screen.mp4" type="video/mp4" /></video>
</div> </div>
</div> </div>
</div> </div>
@ -178,7 +178,7 @@
<!-- Bootstrap core JS--> <!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS--> <!-- Core theme JS-->
<script src="js/scripts.js"></script> <script src="{{base}}/js/scripts.js"></script>
</body> </body>
</html> </html>

@ -5,12 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet"/> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://unicons.iconscout.com/release/v2.1.9/css/unicons.css" rel="stylesheet"/> <link href="https://unicons.iconscout.com/release/v2.1.9/css/unicons.css" rel="stylesheet"/>
<link href="../css/login.css" rel="stylesheet" /> <link href="{{base}}/css/login.css" rel="stylesheet" />
<title>Login</title> <title>Login</title>
</head> </head>
<body> <body>
<div class="section"> <div class="section">
<a href="{{base}}/"><img src="../assets/img/home.png"></a> <a href="{{base}}/"><img src="{{base}}/assets/img/home.png"></a>
<div class="container"> <div class="container">
<div class="row full-height justify-content-center"> <div class="row full-height justify-content-center">
<div class="col-12 text-center align-self-center py-5"> <div class="col-12 text-center align-self-center py-5">

Loading…
Cancel
Save