diff --git a/Style/signUp.css b/Style/signUp.css new file mode 100644 index 0000000..b41a514 --- /dev/null +++ b/Style/signUp.css @@ -0,0 +1,90 @@ +body{ + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; + font-family: 'Jost', sans-serif; + background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e); +} +.main{ + width: 350px; + height: 500px; + background: red; + overflow: hidden; + background: url("https://doc-08-2c-docs.googleusercontent.com/docs/securesc/68c90smiglihng9534mvqmq1946dmis5/fo0picsp1nhiucmc0l25s29respgpr4j/1631524275000/03522360960922298374/03522360960922298374/1Sx0jhdpEpnNIydS4rnN4kHSJtU1EyWka?e=view&authuser=0&nonce=gcrocepgbb17m&user=03522360960922298374&hash=tfhgbs86ka6divo3llbvp93mg4csvb38") no-repeat center/ cover; + border-radius: 10px; + box-shadow: 5px 20px 50px #000; +} +#chk{ + display: none; +} +.signup{ + position: relative; + width:100%; + height: 100%; +} +label{ + color: #fff; + font-size: 2.3em; + justify-content: center; + display: flex; + margin: 60px; + font-weight: bold; + cursor: pointer; + transition: .5s ease-in-out; +} +input{ + width: 60%; + height: 20px; + background: #e0dede; + justify-content: center; + display: flex; + margin: 20px auto; + padding: 10px; + border: none; + outline: none; + border-radius: 5px; +} +button{ + width: 60%; + height: 40px; + margin: 10px auto; + justify-content: center; + display: block; + color: #fff; + background: #573b8a; + font-size: 1em; + font-weight: bold; + margin-top: 20px; + outline: none; + border: none; + border-radius: 5px; + transition: .2s ease-in; + cursor: pointer; +} +button:hover{ + background: #6d44b8; +} +.login{ + height: 460px; + background: #eee; + border-radius: 60% / 10%; + transform: translateY(-180px); + transition: .8s ease-in-out; +} +.login label{ + color: #573b8a; + transform: scale(.6); +} + +#chk:checked ~ .login{ + transform: translateY(-500px); +} +#chk:checked ~ .login label{ + transform: scale(1); +} +#chk:checked ~ .signup label{ + transform: scale(.6); +} diff --git a/Style/styleSignIn.css b/Style/styleSignIn.css new file mode 100644 index 0000000..335c38e --- /dev/null +++ b/Style/styleSignIn.css @@ -0,0 +1,155 @@ +body { + background-color: #9f9da7; + font-size: 1.6rem; + font-family: "Open Sans", sans-serif; + color: #2b3e51; +} + +h2 { + font-weight: 300; + text-align: center; +} + +p { + position: relative; +} + +a, +a:link, +a:visited, +a:active { + color: #3ca9e2; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} +a:focus, a:hover, +a:link:focus, +a:link:hover, +a:visited:focus, +a:visited:hover, +a:active:focus, +a:active:hover { + color: #329dd5; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} + +#login-form-wrap { + background-color: #fff; + width: 35%; + margin: 30px auto; + text-align: center; + padding: 20px 0 0 0; + border-radius: 4px; + box-shadow: 0px 30px 50px 0px rgba(0, 0, 0, 0.2); +} + +#login-form { + padding: 0 60px; +} + +input { + display: block; + box-sizing: border-box; + width: 100%; + outline: none; + height: 60px; + line-height: 60px; + border-radius: 4px; +} + +input[type="text"], +input[type="email"] { + width: 100%; + padding: 0 0 0 10px; + margin: 0; + color: #8a8b8e; + border: 1px solid #c2c0ca; + font-style: normal; + font-size: 16px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + position: relative; + display: inline-block; + background: none; +} +input[type="text"]:focus, +input[type="email"]:focus { + border-color: #3ca9e2; +} +input[type="text"]:focus:invalid, +input[type="email"]:focus:invalid { + color: #cc1e2b; + border-color: #cc1e2b; +} +input[type="text"]:valid ~ .validation, +input[type="email"]:valid ~ .validation { + display: block; + border-color: #0C0; +} +input[type="text"]:valid ~ .validation span, +input[type="email"]:valid ~ .validation span { + background: #0C0; + position: absolute; + border-radius: 6px; +} +input[type="text"]:valid ~ .validation span:first-child, +input[type="email"]:valid ~ .validation span:first-child { + top: 30px; + left: 14px; + width: 20px; + height: 3px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} +input[type="text"]:valid ~ .validation span:last-child, +input[type="email"]:valid ~ .validation span:last-child { + top: 35px; + left: 8px; + width: 11px; + height: 3px; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} + +.validation { + display: none; + position: absolute; + content: " "; + height: 60px; + width: 30px; + right: 15px; + top: 0px; +} + +input[type="submit"] { + border: none; + display: block; + background-color: #3ca9e2; + color: #fff; + font-weight: bold; + text-transform: uppercase; + cursor: pointer; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; + font-size: 18px; + position: relative; + display: inline-block; + cursor: pointer; + text-align: center; +} +input[type="submit"]:hover { + background-color: #329dd5; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} + +#create-account-wrap { + background-color: #eeedf1; + color: #8a8b8e; + font-size: 14px; + width: 100%; + padding: 10px 0; + border-radius: 0 0 4px 4px; +} \ No newline at end of file diff --git a/Vues/accueil.php b/Vues/accueil.php new file mode 100644 index 0000000..e69de29 diff --git a/Vues/accueilPrive.php b/Vues/accueilPrive.php new file mode 100644 index 0000000..e69de29 diff --git a/Vues/addList.html b/Vues/addList.html deleted file mode 100644 index 846cf74..0000000 --- a/Vues/addList.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Ajouter une Liste - - - - - - - - -

Ajouter

- - -
-
- Liste privee ? - -
-
- - - \ No newline at end of file diff --git a/Vues/addList.php b/Vues/addList.php new file mode 100644 index 0000000..ba7c639 --- /dev/null +++ b/Vues/addList.php @@ -0,0 +1,27 @@ + + + + Ajouter une Liste + + + + + + + + +

Ajouter

+ + +
+
+ Liste privee ? + +
+
+ + + \ No newline at end of file diff --git a/Vues/addTask.html b/Vues/addTask.html deleted file mode 100644 index 2b14508..0000000 --- a/Vues/addTask.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - Ajouter une Tache - - - - - - - - -

Ajouter

- - -
- -
- - - \ No newline at end of file diff --git a/Vues/addTask.php b/Vues/addTask.php new file mode 100644 index 0000000..080ef07 --- /dev/null +++ b/Vues/addTask.php @@ -0,0 +1,24 @@ + + + + Ajouter une Tache + + + + + + + + +

Ajouter

+ + +
+ +
+ + + \ No newline at end of file diff --git a/Vues/connexion.html b/Vues/connexion.html deleted file mode 100644 index e52fc69..0000000 --- a/Vues/connexion.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - Connexion - - - - - - - - - -

Connexion

- - -
- -
- - - \ No newline at end of file diff --git a/Vues/page.html b/Vues/page.html deleted file mode 100644 index f63d85a..0000000 --- a/Vues/page.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Accueil - - - - - - - - - - -

To Do List !

- - - - - - - - \ No newline at end of file diff --git a/Vues/signUp.php b/Vues/signUp.php new file mode 100644 index 0000000..919592f --- /dev/null +++ b/Vues/signUp.php @@ -0,0 +1,38 @@ + + + + Slide Navbar + + + + +
+ + + + +
+
+ + + + +
+
+ +
+
+ + + + + +
+
+ + + + +
+ + \ No newline at end of file diff --git a/Vues/vueErreur.php b/Vues/vueErreur.php new file mode 100644 index 0000000..e5ca644 --- /dev/null +++ b/Vues/vueErreur.php @@ -0,0 +1,14 @@ + + + +

ERREUR !!!!!

+ + + + diff --git a/config/config.php b/config/config.php new file mode 100644 index 0000000..0f9f2dc --- /dev/null +++ b/config/config.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/index.php b/index.php index 546f7e2..458f0ef 100644 --- a/index.php +++ b/index.php @@ -15,6 +15,7 @@ require_once('modeles/mdlUser.php'); require_once('modeles/mdlListe.php'); + //A CHANGER $user= 'thchazot1'; $pass='achanger'; @@ -26,34 +27,8 @@ $content='Argent, Encore de l\'argent'; try{ - $con=new Connection($dsn,$user,$pass); - - $u=new User(2, "boby", "test"); - $t=new Tache($id, $name, $content, true); - $t1=new Tache(478, "TEST", $content, false); - - $tacheGateway=new TacheGateway($con); - $userGateway=new UserGateway($con); - $listeGateway=new ListeGateway($con); - - $mdlUser=new MdlUser($con); - $mdlListe=new MdlListe($con); - - $list=$mdlListe->update($u); - echo ($list[0]); -/* - $tacheGateway->delete($t); - $user=$userGateway->insert(new User(1, "test", "mdp")); - $user=$userGateway->findByNamePassword("test", "mdp"); - print($user); - $gateway->insert($t, 1); - - $tabTache=$gateway->getTacheFromIdList(1); - foreach($tabTache as $tache){ - print($tache); - echo "
"; - } - */ + + require("Vues/signUp.php"); } catch( PDOException $Exception ) { echo 'erreur'; diff --git a/modeles/mdlListe.php b/modeles/mdlListe.php index 2d66bf2..b0530ee 100644 --- a/modeles/mdlListe.php +++ b/modeles/mdlListe.php @@ -24,10 +24,9 @@ class MdlListe{ $gate->delete($liste); } - public function update(Liste $liste, string $name, string $content, bool $private){ + public function update(Liste $liste, string $name, bool $private){ $gate=new ListeGateway($this->con); $liste->setName($name); - $liste->setContent($content); if ($liste->getCreator()!=null){ $liste->setPrivate($private); } diff --git a/modeles/mdlUser.php b/modeles/mdlUser.php index a23efe4..a125a0d 100644 --- a/modeles/mdlUser.php +++ b/modeles/mdlUser.php @@ -11,7 +11,6 @@ class MdlUser{ public function getUserForConnection(string $username, string $password): ?User{ if (!empty($username) && !empty($password)){ - $results=[]; $gate=new UserGateway($this->con); $results=$gate->findByNamePassword($username, $password); if (!empty($results)){