rework login form

This commit is contained in:
kelen-dev 2025-06-02 17:56:08 +02:00
parent 4d2d6608e7
commit 05157e6d38
2 changed files with 49 additions and 39 deletions

View file

@ -25,8 +25,7 @@
} }
.login-header { .login-header {
background: url("https://www.lejdd.fr/lmnr/var/jdd/public/media/image/2022/07/19/12/escrime-comment-les-francais-apprivoisent-leurs-armes.jpg?VersionId=Mw31AogdDUwVLuCaVdxMozm9kito7TTP") background: url("https://www.lejdd.fr/lmnr/var/jdd/public/media/image/2022/07/19/12/escrime-comment-les-francais-apprivoisent-leurs-armes.jpg?VersionId=Mw31AogdDUwVLuCaVdxMozm9kito7TTP") no-repeat center/cover;
no-repeat center/cover;
position: relative; position: relative;
padding: 4rem 1rem; padding: 4rem 1rem;
display: flex; display: flex;
@ -40,8 +39,10 @@
content: ""; content: "";
position: absolute; position: absolute;
inset: 0; inset: 0;
background: rgba(0, 0, 0, 0.3); /* voile sombre */ background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(2px); /* effet de flou */ /* voile sombre */
backdrop-filter: blur(2px);
/* effet de flou */
z-index: 1; z-index: 1;
border-radius: 0.5rem; border-radius: 0.5rem;
} }
@ -68,18 +69,48 @@
gap: 1rem; gap: 1rem;
} }
.login-form h3 {
text-align: center;
color: #235d4f;
margin-bottom: 1rem;
}
.input-group { .input-group {
display: flex; display: flex;
align-items: center; align-items: center;
border-radius: 20px;
position: relative;
background-color: #235d4f; background-color: #235d4f;
border-radius: 30px; padding: 1rem;
padding: 0.5rem 1rem; }
.input-group input {
width: 100%;
padding: 1rem;
font-size: 16px;
color: white;
border: none;
border-bottom: 1px solid white;
outline: none;
background: transparent;
}
.input-group input:focus~label,
.input-group input:valid~label {
top: 0;
left: 0;
color: #235d4f;
font-size: 12px;
padding: .6rem;
}
.input-group input .form-control:focus {
border-color: transparent !important;
}
.input-group label {
position: absolute;
top: 22px;
left: 0;
font-size: 16px;
color: white;
pointer-events: none;
transition: 0.5s;
padding: .6rem;
} }
.input-group .icon { .input-group .icon {
@ -87,15 +118,6 @@
margin-right: 0.5rem; margin-right: 0.5rem;
} }
.input-group input {
border: none;
background: none;
color: white;
width: 100%;
font-size: 1rem;
outline: none;
}
.options { .options {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View file

@ -5,25 +5,13 @@
</div> </div>
<form (ngSubmit)="onSubmit()" class="login-form"> <form (ngSubmit)="onSubmit()" class="login-form">
<div class="input-group"> <div class="input-group">
<span class="icon">👤</span> <input type="email" name="email" [(ngModel)]="email" placeholder="Nom utilisateur" required />
<input <label class="icon">👤</label>
type="email"
name="email"
[(ngModel)]="email"
placeholder="Nom utilisateur"
required
/>
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="icon">🔒</span> <input type="password" name="password" [(ngModel)]="password" placeholder="Mot de passe" required />
<input <label class="icon">🔒</label>
type="password"
name="password"
[(ngModel)]="password"
placeholder="Mot de passe"
required
/>
</div> </div>
<button type="submit" class="login-btn">Connexion</button> <button type="submit" class="login-btn">Connexion</button>