From 914b74125180c49615208057f0c95432f3475617 Mon Sep 17 00:00:00 2001 From: Elhoucine Date: Fri, 14 Jun 2024 15:27:51 +0200 Subject: [PATCH] feat: home page --- src/components/accueil/NewHome.tsx | 177 ++++++++++++++++++++--------- src/styles/globals.scss | 6 + 2 files changed, 128 insertions(+), 55 deletions(-) diff --git a/src/components/accueil/NewHome.tsx b/src/components/accueil/NewHome.tsx index a68f3fd46..45cafd76a 100644 --- a/src/components/accueil/NewHome.tsx +++ b/src/components/accueil/NewHome.tsx @@ -1,9 +1,8 @@ import { useRouter } from 'next/router'; import React from 'react'; -import { Button } from '@mui/material'; +import { Box, Button, Grid, Typography } from '@mui/material'; -import { KeepRatio } from '../KeepRatio'; import Home from 'src/svg/home.svg'; import Logo from 'src/svg/logo_1village.svg'; import School from 'src/svg/school.svg'; @@ -19,62 +18,130 @@ export function isRedirectValid(redirect: string) { return false; } } +interface LoginBoxProps { + title: string; + subTitle: string; + route: string; + Icon: React.ComponentType>; +} -export const NewHome = () => { +const LoginBox: React.FC = ({ title, subTitle, route, Icon }) => { const router = useRouter(); return ( -
- <> -
- -

Vous êtes...

-
- -
- {/* Block Teacher */} -
-

Professeur des écoles

- { - router.push('/login'); - }} - /> - -
- {/* Block Parent */} -
-

Parent d'élève

- { - router.push('/connexion'); - }} - /> - -
-
-
- -
+ + + {title} + + + { + router.push(`/${route}`); + }} + /> + + + + ); +}; + +export const NewHome = () => { + return ( + + + + + + + + + + + Vous êtes: + + + + + + + + + + + + + ); }; diff --git a/src/styles/globals.scss b/src/styles/globals.scss index e2e4275f5..30075173e 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -250,6 +250,12 @@ a.text--success:hover { justify-content: center; align-items: center; } +.bg-gradiant-only { + background: rgb(224, 195, 252); + background: -o-linear-gradient(315deg, rgba(224, 195, 252, 1) 0%, rgba(142, 197, 252, 1) 100%); + background: linear-gradient(135deg, rgba(224, 195, 252, 1) 0%, rgba(142, 197, 252, 1) 100%); + background-attachment: fixed; +} .bg-grey { background-color: $bg-page; }