diff --git a/login/login.css b/login/login.css index ff40b93..c917038 100755 --- a/login/login.css +++ b/login/login.css @@ -8,6 +8,7 @@ body{ color: white; height: 100vh; display: flex; + justify-content: center; flex-direction: column; align-items: center; } @@ -18,7 +19,6 @@ body{ text-align: center; padding: 1em; border-radius: 10px; - margin: auto; } h1{ margin: 0 0 0.4em 0; @@ -36,4 +36,30 @@ input{ margin: 0.4em 0; font-size: 12px; color: rgb(219, 143, 143); +} +.buttons{ + display: flex; + align-items: center; + gap: 1em; + margin-bottom: 0.8em; +} +.buttons .button{ + border: 0; + background-color: #ffffff; + padding: 0.6em; + border-radius: 10px; + transition: 0.2s ease-in-out; +} +.buttons .button:hover{ + background-color: #c7c7c7; + transition: 0.2s ease-in-out; +} +.buttons .button.active{ + background-color: #002d5e; + color: #ffffff; + transition: 0.2s ease-in-out; +} +.buttons .button.active:hover{ + background-color: #02203f; + transition: 0.2s ease-in-out; } \ No newline at end of file diff --git a/login/login.js b/login/login.js new file mode 100755 index 0000000..90aaced --- /dev/null +++ b/login/login.js @@ -0,0 +1,21 @@ +let current = "login"; + +function switchPanel(from){ + if(from === current) return; + if(from === "login"){ + document.getElementsByClassName("login")[0].style.display = "block"; + document.getElementsByClassName("register")[0].style.display = "none"; + current = "login"; + + document.getElementsByClassName("button-login")[0].classList.add("active"); + document.getElementsByClassName("button-register")[0].classList.remove("active"); + } + else{ + document.getElementsByClassName("login")[0].style.display = "none"; + document.getElementsByClassName("register")[0].style.display = "block"; + current = "register"; + + document.getElementsByClassName("button-login")[0].classList.remove("active"); + document.getElementsByClassName("button-register")[0].classList.add("active"); + } +} \ No newline at end of file diff --git a/login/login.php b/login/login.php index 04ba5d1..e40796e 100755 --- a/login/login.php +++ b/login/login.php @@ -8,36 +8,40 @@ Connexion +
+ + +

Connexion

- Nom d'utilisateur incorrecte

- HTML; } ?> + HTML; }*/ ?>
- Mot de passe incorrecte

- HTML; } ?> + HTML; }*/ ?>
-
+