style input profil

remotes/origin/master
Leni BEAULATON 6 months ago
parent 0207304a91
commit 71fffb2223

@ -31,25 +31,24 @@
<?php
include ('../script/user.php');
echo "<img src='{$u->img}' class='imageProfil' onmousedown='return false'/>";
// Nom d'utilisateur
echo "<p id='username' class='nameProfil'>
echo "<p id='username' class='infoProfil'>
<strong>{$u->username}
<img class='imgModify' src='../images/modify.svg' onclick='editField(\"username\")'/>
</strong>
</p>";
// Email
echo "<p id='email' class='nameProfil'>
echo "<p id='email' class='infoProfil'>
<strong>{$u->email}
<img class='imgModify' src='../images/modify.svg' onclick='editField(\"email\")'/>
</strong>
</p>";
// Mot de passe
echo "<p id='passwd' class='nameProfil'>
echo "<p id='passwd' class='infoProfil'>
<strong>{$u->hidenPasswd}
<img class='imgModify' src='../images/modify.svg'/>
</strong>

@ -15,40 +15,42 @@ class User{
$this->img = $image;
$this->email = $mail;
}
}
$u = new User('Testeur', 'motDepasse', '../images/imageProfil.png', 'testeur.compte@wikifantasy.com'); /*Test*/
function hidenPassWd(string $passwd){
if(strlen($passwd) >= 16) return str_repeat('*', 16);
return str_repeat('*', strlen($passwd));
}
function modifyName(string $name){
if(!empty($name)){
$u->username = $name;
public function updateUsername(string $newUsername){
if(!empty($newUsername)){
$this->username = $newUsername;
}
}
}
function modifyEmail(string $mail){
if(!empty($mail)){
$u->email = $mail;
public function updateEmail(string $newEmail) {
if(!empty($newEmail)){
$this->email = $newEmail;
}
}
}
function modifyPassWd(string $password1, string $password2){
if(!empty($password2) && !empty($password2)){
if($password1 == $password2){
$u->passwd = $password;
public function updatePassWd(string $newPassword1, string $newPassword2){
if(!empty($newPassword2) && !empty($newPassword1)){
if($newPassword1 == $newPassword2){
$u->passwd = $newPassword1;
}
}
}
}
function modifyImage(string $image){
public function modifyImage(string $image){
if(!empty($image)){
$u->img = $image;
}
}
}
$u = new User('Testeur', 'motDepasse', '../images/imageProfil.png', 'testeur.compte@wikifantasy.com'); /*Test*/
function hidenPassWd(string $passwd){
if(strlen($passwd) >= 16) return str_repeat('*', 16);
return str_repeat('*', strlen($passwd));
}
?>

@ -49,6 +49,18 @@ body.dark-mode .buttonSudmite{
font-size: 20px;
}
body.dark-mode .connexion{
width:90%;
height: 40px;
padding-left: 3%;
margin-left: 1%;
margin-top: -1%;
border-radius: 25px;
border: none;
font-size: 15px;
}
/* ====== LIGHT MODE ====== */
body.light-mode h1{
color : black;
@ -116,13 +128,3 @@ body.light-mode .connexion{
}
.connexion{
width:90%;
height: 40px;
padding-left: 3%;
margin-left: 1%;
margin-top: -1%;
border-radius: 25px;
border: none;
font-size: 15px;
}

@ -58,6 +58,18 @@ body.dark-mode .imgModify{
}
body.dark-mode .infoProfil > input {
width:90%;
height: 40px;
padding-left: 3%;
margin-left: 1%;
margin-top: -1%;
border-radius: 25px;
border: none;
font-size: 15px;
font-family: "Lemon", serif;
}
/* ====== LIGHT MODE ====== */
body.light-mode h1{
color : black;
@ -109,6 +121,27 @@ body.light-mode .login{
border: 2px solid black;
}
body.light-mode .imgModify{
width: 3%;
margin-left: 5%;
margin-top: 5%;
}
body.light-mode .infoProfil > input {
width:90%;
height: 40px;
padding-left: 3%;
margin-left: 1%;
margin-top: -1%;
border-radius: 25px;
border: 1px solid black;
background-color: #fff1f1;
font-size: 15px;
font-family: "Lemon", serif;
}
/* ====== OTHER ====== */
.buttonSudmiteDiv{
text-align: center;
@ -127,7 +160,7 @@ body.light-mode .login{
margin-top: 5%;
}
.nameProfil{
.infoProfil{
margin-left: 10%;
text-align: center;
font-size: 120%;

Loading…
Cancel
Save