Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
2026-04-30 17:49:53 +02:00
6 changed files with 342 additions and 81 deletions
+112 -45
View File
@@ -1,85 +1,152 @@
.bg { /* Import Google Font */
--background: linear-gradient(180deg, #e6dede, #e58a8a); @import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');
/* ---- Page background ---- */
ion-content.bg {
--background: transparent;
--overflow: hidden;
&::before {
content: '';
position: fixed;
inset: 0;
background: linear-gradient(
160deg,
#f9e8e8 0%,
#f2c4c4 35%,
#e89898 70%,
#d97070 100%
);
z-index: -1;
}
} }
/* ---- Centered container ---- */
.container { .container {
text-align: center; display: flex;
padding-top: 60px; flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100%;
padding: 40px 24px;
font-family: 'Nunito', sans-serif;
gap: 10px;
} }
/* ---- Logo box ---- */
.logo-box { .logo-box {
width: 90px; width: 80px;
height: 90px; height: 80px;
margin: 0 auto 10px; background: #ffffff;
border-radius: 20px; border-radius: 22px;
background: #f2eaea;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0 4px 18px rgba(180, 80, 80, 0.18);
box-shadow: 8px 8px 15px #d1bcbc, overflow: hidden;
-8px -8px 15px #ffffff; margin-bottom: 4px;
img { img {
width: 50px; width: 52px;
height: 52px;
object-fit: contain;
} }
} }
/* ---- App title ---- */
h1 { h1 {
color: #b86b6b; font-family: 'Nunito', sans-serif;
margin-bottom: 30px; font-size: 28px;
font-weight: 800;
color: #b05050;
margin: 0 0 10px;
letter-spacing: 0.5px;
} }
/* ---- White card ---- */
.card { .card {
width: 85%; width: 100%;
max-width: 320px; max-width: 340px;
margin: auto; background: rgba(255, 255, 255, 0.88);
padding: 25px; border-radius: 24px;
border-radius: 20px; padding: 28px 24px 32px;
background: #f2eaea; box-shadow: 0 8px 32px rgba(180, 80, 80, 0.12);
display: flex;
box-shadow: 10px 10px 20px #cfaeae, flex-direction: column;
-10px -10px 20px #ffffff; gap: 14px;
h3 { h3 {
color: #c27a7a; font-family: 'Nunito', sans-serif;
margin-bottom: 20px; font-size: 16px;
font-weight: normal; font-weight: 700;
color: #b05050;
text-align: center;
margin: 0 0 4px;
} }
} }
/* ---- Inputs ---- */
.input { .input {
margin: 10px 0; --background: rgba(255, 255, 255, 0.95);
border-radius: 20px; --border-radius: 50px;
--padding-start: 18px;
--background: #f2eaea; --padding-end: 18px;
--padding-start: 15px; --inner-padding-end: 0;
--highlight-color-focused: #d97070;
box-shadow: inset 5px 5px 10px #d1bcbc, border-radius: 50px;
inset -5px -5px 10px #ffffff; box-shadow: 0 2px 8px rgba(180, 80, 80, 0.10);
overflow: hidden;
ion-input { ion-input {
color: #a35c5c; --placeholder-color: #c9a0a0;
--placeholder-opacity: 1;
--color: #6b3030;
font-family: 'Nunito', sans-serif;
font-size: 15px;
font-weight: 600;
caret-color: #d97070;
} }
} }
/* ---- Login button ---- */
.btn { .btn {
margin-top: 15px; --background: #b05050;
--background: #b86b6b; --background-activated: #903838;
--border-radius: 20px; --border-radius: 50px;
--box-shadow: 0 4px 16px rgba(176, 80, 80, 0.35);
--color: #ffffff;
font-family: 'Nunito', sans-serif;
font-size: 16px;
font-weight: 700;
letter-spacing: 0.3px;
margin-top: 6px;
height: 48px;
transition: transform 0.15s ease, box-shadow 0.15s ease;
box-shadow: 5px 5px 10px #a45f5f, &:active {
-5px -5px 10px #ff9c9c; transform: scale(0.97);
--box-shadow: 0 2px 8px rgba(176, 80, 80, 0.25);
}
} }
/* ---- Sign-up link ---- */
.signup { .signup {
margin-top: 20px; text-align: center;
color: white; font-family: 'Nunito', sans-serif;
font-size: 14px; font-size: 14px;
font-weight: 700;
color: #b05050;
line-height: 1.7;
margin-top: 6px;
a { a {
color: white; color: #b05050;
font-weight: bold; font-weight: 800;
text-decoration: underline; text-decoration: underline;
text-underline-offset: 2px;
&:hover {
color: #903838;
}
} }
} }
@@ -28,7 +28,7 @@
<div class="signup"> <div class="signup">
Vous êtes nouveau ?<br> Vous êtes nouveau ?<br>
<a href="#">Créez vous un compte ici</a> <a (click)="goToRegister()">Créez vous un compte ici</a>
</div> </div>
</div> </div>
@@ -26,6 +26,10 @@ export class LoginFormComponent {
isLoading = false; isLoading = false;
goToRegister() {
this.router.navigate(['/register']);
}
loginForm = this.fb.group({ loginForm = this.fb.group({
name: ['', [Validators.required]], name: ['', [Validators.required]],
password: ['', [Validators.required]] password: ['', [Validators.required]]
@@ -34,6 +38,8 @@ export class LoginFormComponent {
async submitForm(): Promise<void> { async submitForm(): Promise<void> {
if (this.loginForm.valid) { if (this.loginForm.valid) {
await this.navCtrl.navigateRoot(['main/messages']); await this.navCtrl.navigateRoot(['main/messages']);
this.isLoading = true; this.isLoading = true;
@@ -0,0 +1,160 @@
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');
/* ---- Page background ---- */
ion-content.bg {
--background: transparent;
--overflow: hidden;
&::before {
content: '';
position: fixed;
inset: 0;
background: linear-gradient(
160deg,
#f9e8e8 0%,
#f2c4c4 35%,
#e89898 70%,
#d97070 100%
);
z-index: -1;
}
}
/* ---- Centered container ---- */
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100%;
padding: 40px 24px;
font-family: 'Nunito', sans-serif;
gap: 10px;
}
/* ---- Logo box ---- */
.logo-box {
width: 80px;
height: 80px;
background: #ffffff;
border-radius: 22px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 18px rgba(180, 80, 80, 0.18);
overflow: hidden;
margin-bottom: 4px;
img {
width: 52px;
height: 52px;
object-fit: contain;
}
}
/* ---- App title ---- */
h1 {
font-family: 'Nunito', sans-serif;
font-size: 28px;
font-weight: 800;
color: #b05050;
margin: 0 0 10px;
letter-spacing: 0.5px;
}
/* ---- White card ---- */
.card {
width: 100%;
max-width: 340px;
background: rgba(255, 255, 255, 0.88);
border-radius: 24px;
padding: 28px 24px 32px;
box-shadow: 0 8px 32px rgba(180, 80, 80, 0.12);
display: flex;
flex-direction: column;
gap: 14px;
h3 {
font-family: 'Nunito', sans-serif;
font-size: 16px;
font-weight: 700;
color: #b05050;
text-align: center;
margin: 0;
}
.subtitle {
font-family: 'Nunito', sans-serif;
font-size: 13px;
font-weight: 600;
color: #c98080;
text-align: center;
margin: -6px 0 4px;
}
}
/* ---- Inputs ---- */
.input {
--background: rgba(255, 255, 255, 0.95);
--border-radius: 50px;
--padding-start: 18px;
--padding-end: 18px;
--inner-padding-end: 0;
--highlight-color-focused: #d97070;
border-radius: 50px;
box-shadow: 0 2px 8px rgba(180, 80, 80, 0.10);
overflow: hidden;
ion-input {
--placeholder-color: #c9a0a0;
--placeholder-opacity: 1;
--color: #6b3030;
font-family: 'Nunito', sans-serif;
font-size: 15px;
font-weight: 600;
caret-color: #d97070;
}
}
/* ---- Register button ---- */
.btn {
--background: #b05050;
--background-activated: #903838;
--border-radius: 50px;
--box-shadow: 0 4px 16px rgba(176, 80, 80, 0.35);
--color: #ffffff;
font-family: 'Nunito', sans-serif;
font-size: 16px;
font-weight: 700;
letter-spacing: 0.3px;
margin-top: 6px;
height: 48px;
transition: transform 0.15s ease, box-shadow 0.15s ease;
&:active {
transform: scale(0.97);
--box-shadow: 0 2px 8px rgba(176, 80, 80, 0.25);
}
}
/* ---- Login link ---- */
.signup {
text-align: center;
font-family: 'Nunito', sans-serif;
font-size: 14px;
font-weight: 700;
color: #b05050;
line-height: 1.7;
margin-top: 6px;
a {
color: #b05050;
font-weight: 800;
text-decoration: underline;
text-underline-offset: 2px;
&:hover {
color: #903838;
}
}
}
@@ -1,22 +1,41 @@
<ion-card> <ion-content [fullscreen]="true" class="bg">
<ion-card-header>
<ion-card-title>Inscrivez-vous à Knots !</ion-card-title><br>
<ion-card-subtitle>Commencez à nouer des liens !</ion-card-subtitle><br>
</ion-card-header>
<ion-card-content> <div class="container">
Nom d'utilisateur
<br>
<input type="text">
<br><br>
Mot de Passe
<br>
<input type="password" id="password">
<br><br>
Confirmez votre mot de passe
<br>
<input type="password" id="confirmPassword">
</ion-card-content><br>
<ion-button fill="clear">Créer son compte</ion-button> <div class="logo-box">
</ion-card> <img src="assets/icon/logo.png" alt="logo">
</div>
<h1>Knots</h1>
<div class="card">
<h3>Inscrivez-vous à Knots !</h3>
<p class="subtitle">Commencez à nouer des liens !</p>
<ion-item lines="none" class="input">
<ion-input placeholder="Nom d'utilisateur..."></ion-input>
</ion-item>
<ion-item lines="none" class="input">
<ion-input type="password" placeholder="Mot de passe..."></ion-input>
</ion-item>
<ion-item lines="none" class="input">
<ion-input type="password" placeholder="Confirmez votre mot de passe..."></ion-input>
</ion-item>
<ion-button expand="block" class="btn">
Créer son compte
</ion-button>
</div>
<div class="signup">
Déjà un compte ?<br>
<a (click)="goToLogin()" >Connectez-vous ici</a>
</div>
</div>
</ion-content>
@@ -1,12 +1,13 @@
import { Component } from '@angular/core'; import {Component, inject} from '@angular/core';
import { import {
IonButton, IonButton,
IonCard, IonCard,
IonCardContent, IonCardContent,
IonCardHeader, IonCardHeader,
IonCardSubtitle, IonCardSubtitle,
IonCardTitle IonCardTitle, IonContent, IonInput, IonItem
} from "@ionic/angular/standalone"; } from "@ionic/angular/standalone";
import {Router} from "@angular/router";
@Component({ @Component({
selector: 'app-register-form', selector: 'app-register-form',
@@ -16,11 +17,19 @@ import {
IonCardContent, IonCardContent,
IonCardHeader, IonCardHeader,
IonCardTitle, IonCardTitle,
IonCardSubtitle IonCardSubtitle,
IonInput,
IonContent,
IonItem
], ],
templateUrl: './register-form.component.html', templateUrl: './register-form.component.html',
styleUrl: './register-form.component.css' styleUrl: './register-form.component.css'
}) })
export class RegisterFormComponent { export class RegisterFormComponent {
private router = inject(Router)
goToLogin() {
this.router.navigate(['/login']);
}
} }