ajout background

This commit is contained in:
p2405951
2025-10-18 15:39:57 +02:00
parent 7160f4cfa2
commit 05eed05947
5 changed files with 90 additions and 26 deletions
+15
View File
@@ -0,0 +1,15 @@
import styles from './../pages/Login/LoginPage.module.css';
const Background = ({ children, className }) => {
return (
<div className={`${styles["background-container"]} ${className || ''}`}>
<div className={styles["circle"] + " " + styles["circle-1"]}></div>
<div className={styles["circle"] + " " + styles["circle-2"]}></div>
<div className={styles["circle"] + " " + styles["circle-3"]}></div>
<div className={styles["circle"] + " " + styles["circle-4"]}></div>
<div className={styles["circle"] + " " + styles["circle-5"]}></div>
{children}
</div>
);
};
export default Background;
+3 -11
View File
@@ -1,25 +1,17 @@
function LoginForm({ className }) { function LoginForm({ className }) {
return ( return (
<form className={className}> <form className={className} method="POST" action="#">
<h1>Connexion</h1> <h1>Connexion</h1>
<div className="form-group"> <div className="form-group">
<br/> <br/>
<label htmlFor="email" className="floating-label">Adresse e-mail</label> <label htmlFor="email" className="floating-label">Adresse e-mail</label>
<input <input type="email"id="email"required/>
type="email"
id="email"
required
/>
</div> </div>
<div className="form-group"> <div className="form-group">
<label htmlFor="password" className="floating-label">Mot de passe</label> <label htmlFor="password" className="floating-label">Mot de passe</label>
<input <input type="password"id="password"required/>
type="password"
id="password"
required
/>
<br/> <br/>
</div> </div>
+2 -2
View File
@@ -2,9 +2,9 @@
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5; line-height: 1.5;
font-weight: 400; font-weight: 400;
color-scheme: light dark; /* color-scheme: light dark;
color: rgba(255, 255, 255, 0.87); color: rgba(255, 255, 255, 0.87);
background-color: #242424; background-color: #242424;*/
font-synthesis: none; font-synthesis: none;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
+11 -10
View File
@@ -1,14 +1,15 @@
import styles from "./LoginPage.module.css" import styles from "./LoginPage.module.css";
import LoginForm from "../../components/form.jsx" import LoginForm from "../../components/form.jsx";
import Background from "../../components/background.jsx";
function LoginPage(){ function LoginPage() {
return (
return ( <Background>
<div className={styles.container}> <div className={styles.container}>
<LoginForm className={styles["login-form"]}/> <LoginForm />
</div> </div>
</Background>
) );
} }
export default LoginPage; export default LoginPage;
+59 -3
View File
@@ -10,20 +10,19 @@
height: 100vh; height: 100vh;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: rgb(235, 199, 22);
padding: 20px; padding: 20px;
border: 1px solid #ccc;
} }
.login-form { .login-form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 40px 20px; padding: 40px 20px;
width: 100%; width: 25%;
max-width: 400px; max-width: 400px;
background-color: rgb(232, 229, 229); background-color: rgb(232, 229, 229);
opacity: 0.85; opacity: 0.85;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
} }
.form-group { .form-group {
margin-bottom: 30px; margin-bottom: 30px;
@@ -53,3 +52,60 @@ h1 {
font-size: 16px; font-size: 16px;
margin-top: 100px; margin-top: 100px;
} }
/* BACKGROUND ////////////////////////////////////////////////////////*/
.background-container {
margin: 0;
padding: 0;
min-height: 100vh;
background: linear-gradient(135deg, #ff9500, #ffb347);
overflow: hidden;
position: relative;
width: 100vw;
}
.circle {
position: absolute;
border-radius: 50%;
opacity: 0.8;
z-index: 1; /* Place les cercles sous le contenu */
}
.circle-1 {
width: 600px;
height: 600px;
background-color: rgba(255, 255, 204, 0.6);
top: -10%;
left: -10%;
}
.circle-2 {
width: 250px;
height: 250px;
background-color: rgba(255, 255, 153, 0.829);
top: 51%;
left: 10%;
}
.circle-3 {
width: 280px;
height: 280px;
background-color: rgba(255, 255, 204, 0.439);
top: 17%;
right: 9%;
}
.circle-4 {
width: 500px;
height: 500px;
background-color: rgb(244, 244, 172);
bottom: 0%;
right: 0%;
}
.circle-5 {
width: 240px;
height: 240px;
background-color: rgba(240, 240, 41, 0.827);
top: 2%;
right: 2%;
}