From f1d582fe06abbe08f2e016ffa0c13f42aba1aee1 Mon Sep 17 00:00:00 2001 From: vbochet <vbochet@gmail.com> Date: Wed, 27 Apr 2016 19:35:05 +0200 Subject: [PATCH] Modification du css et de la vue du formulaire de connexion pour prendre en compte le design --- app/view/Connexion/displayForm.html | 46 +++++++++++++++-------------- app/view/Includes/css/style.css | 27 +++++++++++++---- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/app/view/Connexion/displayForm.html b/app/view/Connexion/displayForm.html index 05918fb..594c44f 100644 --- a/app/view/Connexion/displayForm.html +++ b/app/view/Connexion/displayForm.html @@ -1,27 +1,29 @@ <?php session_start(); ?> -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"/> - <title>Formulaire de connexion</title> -</head> -<body> - <header> - <h1>Connexion au site</h1> - </header> +<?php $page_title = "Formulaire de connexion"; + $RACINE = ".."; ?> +<?php include(ROOT."/app/view/Includes/header.include.html"); ?> + + <?php if(isset($_SESSION['connexionErrCode'])) { // si message d'erreur $errCode = $_SESSION['connexionErrCode']; - $errMsg = ($errCode == 0) ? '<h3 style="color:red;">Identifiant inconnu !</h3>' : '<h3 style="color:red;">Mauvais mot de passe !</h3>'; // on détermine le message à afficher - echo $errMsg; // on affiche le message + $errMsg = ($errCode == 0) ? '<h3>Identifiant inconnu !</h3>' : '<h3>Mauvais mot de passe !</h3>'; // on détermine le message à afficher + echo '<article class="msg-erreur">'.$errMsg.'</article>'; // on affiche le message unset($_SESSION['connexionErrCode']); // on retire la variable de session } ?> - <form method="post" action="connexion/verify"> - <label for="login">Login : </label><input type="text" name="login" id="login" /><br/> - <label for="password">Password : </label><input type="password" name="password" id="password" /><br/> - <input type="submit" value="Connexion" /> - </form> - <footer> - <p>Le pied de page</p> - </footer> -</body> -</html> + + <article> + <h2>Formulaire de connexion</h2> + <div class="connexion-form"> + <form method="post" action="connexion/verify"> + <label for="login">Login : </label><input type="text" name="login" id="login" /><br/> + <label for="password">Password : </label><input type="password" name="password" id="password" /><br/> + <input type="checkbox" id="stayC" name="stayC" value="checket"><label for="stayC">Rester connecté</label><br /> + <div class="submit"> + <input type="reset" name="reset" value="Réinitialiser"> + <input type="submit" name="submit" value="Se connecter"> + </div> + </form> + </div> + </article> + +<?php include(ROOT."/app/view/Includes/footer.include.html"); ?> diff --git a/app/view/Includes/css/style.css b/app/view/Includes/css/style.css index 6b42713..86835cb 100644 --- a/app/view/Includes/css/style.css +++ b/app/view/Includes/css/style.css @@ -42,9 +42,8 @@ article{ width:100%; background:white; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); - padding-bottom: 20px; - padding-top: 20px; box-sizing: border-box; + padding: 20px; } @@ -209,6 +208,20 @@ header a:hover, footer a:hover{ } +label { + display: block; + min-width: 140px; + float: left; +} + +div.submit { + text-align:center; +} + +div.submit input[type=submit], div.submit input[type=reset] { + margin-left:5px; + margin-right:5px; +} .connexion-form{ margin: auto; @@ -239,9 +252,6 @@ header a:hover, footer a:hover{ box-shadow: 0 6px 20px 2px black; } -article { - padding: 10px; -} article h1{ text-align: center; font-size: 2em; @@ -251,6 +261,11 @@ article h2{ text-align: center; } +.msg-erreur { + color: white; + background-color: red; +} + .classement-card{ width:100%; background:white; @@ -280,6 +295,8 @@ article h2{ width: 50px; border-radius: 100%; } + + @media only screen and (min-width: 600px) { /* For tablets: */ .col-m-1 {width: 8.33%;} -- GitLab