diff --git a/WEB/Controller/UtilisateurGateway.php b/WEB/Controller/UtilisateurGateway.php index 136ebc06..91b86efd 100644 --- a/WEB/Controller/UtilisateurGateway.php +++ b/WEB/Controller/UtilisateurGateway.php @@ -48,17 +48,7 @@ class UtilisateurGateway ':email' => array($email,SQLITE3_TEXT) )); $results=$this->con->getResults(); - if ($results == null){ - return new Utilisateur("null", "null", "null", false); - } - foreach($results as $row) - { - $email = $row['email']; - $pseudo=$row['pseudo']; - $mdp = $row['mdp']; - $estAdmin = $row['estAdmin']; - } - return new Utilisateur($email, $pseudo, $mdp, $estAdmin); + return UtilisateurFactory::createUtilisateur($results); } public function getMdpByEmail(string $email) : string{ diff --git a/WEB/Factory/UtilisateurFactory.php b/WEB/Factory/UtilisateurFactory.php index 03c8b27f..860f6d63 100644 --- a/WEB/Factory/UtilisateurFactory.php +++ b/WEB/Factory/UtilisateurFactory.php @@ -2,7 +2,20 @@ class UtilisateurFactory { - public static function create(array $results){ + public static function createUtilisateur(array $results){ + if ($results == null){ + return new Utilisateur("null", "null", "null", false); + } + foreach($results as $row) + { + $email = $row['email']; + $pseudo=$row['pseudo']; + $mdp = $row['mdp']; + $estAdmin = $row['estAdmin']; + } + return new Utilisateur($email, $pseudo, $mdp, $estAdmin); + } + public static function createTabUtilisateur(array $results){ $tabUtilisateur=array(); foreach($results as $row) { @@ -10,5 +23,4 @@ class UtilisateurFactory } return $tabUtilisateur; } - } \ No newline at end of file diff --git a/WEB/View/src/CSS/Eni.css b/WEB/View/src/CSS/Enigme.css similarity index 95% rename from WEB/View/src/CSS/Eni.css rename to WEB/View/src/CSS/Enigme.css index b9d363f1..785e2d67 100644 --- a/WEB/View/src/CSS/Eni.css +++ b/WEB/View/src/CSS/Enigme.css @@ -17,7 +17,6 @@ body { background-attachment: fixed; background-repeat: no-repeat; background-size: cover; - /* background-image: url("../../assets/img/Background5.jpg"); */ background-color: #050E15; } @@ -123,6 +122,5 @@ h1, h2, h3, h4, h5, h6 { justify-content: center; align-items: center; text-transform: uppercase; - letter-spacing: 1.5px; color: #fff; } \ No newline at end of file diff --git a/WEB/View/src/CSS/FirstTest.css b/WEB/View/src/CSS/FirstTest.css new file mode 100644 index 00000000..1008917b --- /dev/null +++ b/WEB/View/src/CSS/FirstTest.css @@ -0,0 +1,94 @@ +@font-face { + font-family: Fauna; + src: url("../../assets/fonts/Fauna.ttf"); +} +@font-face { + font-family: Equinox; + src: url("../../assets/fonts/Equinox.otf"); +} + +body { + min-height: 100vh; + font-family: "Equinox", sans-serif; + color: white; + scroll-behavior: smooth; + background-color: #050e15; +} + +nav { + background-color: #050e15; +} + +p { + font-family: "Fauna", sans-serif; + font-size: 14px; +} + +#editor { + width: 100%; + min-height: 80vh; + height: auto; +} + +#console { + font-family: DejaVu Sans Mono, monospace; + font-size: 0.8rem; + letter-spacing: 1px; + background-color: #222831; + resize: none; + color: #fff; + border: 1px solid #44fff6; + box-shadow: 0 0 1px #fff, 0 0 1px #fff, 0 0 5px #44fff6, 0 0 5px #44fff6, + inset 0 0 5px #44fff6; +} + +.btn { + position: relative; + width: 120px; + height: 60px; + background: transparent; +} + +.btn:before, +.btn:after { + content: ""; + position: absolute; + inset: 0; + transition: 0.5s; + background: #f00; +} + +.btn:nth-child(1):before, +.btn:nth-child(1):after { + background: linear-gradient(45deg, #00ccff, #0e1538, #d400d4); +} + +.btn:nth-child(2):before, +.btn:nth-child(2):after { + background: linear-gradient(45deg, #d400d4, #0e1538, #fb5942); +} + +.btn:hover:before { + inset: -3px; +} + +.btn:hover:after { + inset: -3px; + filter: blur(10px); +} + +.btn span { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #0e1538; + z-index: 10; + display: flex; + justify-content: center; + align-items: center; + text-transform: uppercase; + letter-spacing: 2px; + color: #fff; +} diff --git a/WEB/View/src/CSS/Presentation.css b/WEB/View/src/CSS/Presentation.css index 03f8b5ab..a8508824 100644 --- a/WEB/View/src/CSS/Presentation.css +++ b/WEB/View/src/CSS/Presentation.css @@ -67,4 +67,5 @@ section{ p { font-family: "Fauna", sans-serif; font-size: 20px; -} \ No newline at end of file +} + diff --git a/WEB/View/src/JS/FirstTest.js b/WEB/View/src/JS/FirstTest.js new file mode 100644 index 00000000..0333f0ab --- /dev/null +++ b/WEB/View/src/JS/FirstTest.js @@ -0,0 +1,3 @@ +var secondTest1 = "Pour ce second test, nous allons voir comment déclarer une variable et le manipuler. Pour créer une variable en python il est inutile de déclarer son type, il suffit de faire : "; +var secondTest2 = "x = 1" +var secondTest3 = "Pour la manipuler"; \ No newline at end of file diff --git a/WEB/View/src/pages/FirstTest.html b/WEB/View/src/pages/FirstTest.html deleted file mode 100644 index 91b98b54..00000000 --- a/WEB/View/src/pages/FirstTest.html +++ /dev/null @@ -1,48 +0,0 @@ - - -
- - -+ Nous voici dans votre premier test, pour savoir si vous ètes + qualifié pour m’aider. Attention je suis très méticuleux, alors + soit bien sur d’être précis dans ce que tu fais ! +
+
+ Tout d’abord, vous allez devoir afficher
+ "Hello World !" en utilisant la
+ fonction intégrée de python,
+ print()
.
+
+ Pour ce second test, nous allons voir comment déclarer une + variable et le manipuler. Pour créer une variable en python il + est inutile de déclarer son type, il suffit de faire : +
+x = 1
+ + Ici, nous avons créé une variable x qui contient la valeur 1. + Nous pouvons maintenant manipuler cette variable en faisant : +
+x = x + 1
+ + Ici, nous avons incrémenté la valeur de x de 1. Nous pouvons + également faire tout autre opération mathématique avec cette + même variable. Par exemple : +
+x = x * 2
x = x / 2
x = x - 1
+ Nous pouvons afficher la valeur de x en faisant :
+print(x)
+ + Pour ce second test, nous allons voir comment déclarer une + variable et le manipuler. Pour créer une variable en python il + est inutile de déclarer son type, il suffit de faire : +
+x = 1
+ + Ici, nous avons créé une variable x qui contient la valeur 1. + Nous pouvons maintenant manipuler cette variable en faisant : +
+x = x + 1
+ + Ici, nous avons incrémenté la valeur de x de 1. Nous pouvons + également faire tout autre opération mathématique avec cette + même variable. Par exemple : +
+x = x * 2
x = x / 2
x = x - 1
+ Nous pouvons afficher la valeur de x en faisant :
+print(x)
+