From 94a4ab4f91b89e1cc39bc0a746433e1d8c9cf75c Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Thu, 8 Jun 2023 19:47:59 +0200 Subject: [PATCH] Add login page layout --- geneit_app/package-lock.json | 28 ++++++++ geneit_app/package.json | 2 + geneit_app/src/widgets/BaseLoginpage.tsx | 92 ++++++++++++++++++++++-- 3 files changed, 118 insertions(+), 4 deletions(-) diff --git a/geneit_app/package-lock.json b/geneit_app/package-lock.json index 6905767..e06e236 100644 --- a/geneit_app/package-lock.json +++ b/geneit_app/package-lock.json @@ -11,6 +11,8 @@ "@emotion/react": "^11.11.0", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.2", + "@mdi/js": "^7.2.96", + "@mdi/react": "^1.6.1", "@mui/icons-material": "^5.11.16", "@mui/material": "^5.13.4", "@testing-library/jest-dom": "^5.16.5", @@ -3310,6 +3312,19 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "node_modules/@mdi/js": { + "version": "7.2.96", + "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz", + "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA==" + }, + "node_modules/@mdi/react": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.6.1.tgz", + "integrity": "sha512-4qZeDcluDFGFTWkHs86VOlHkm6gnKaMql13/gpIcUQ8kzxHgpj31NuCkD8abECVfbULJ3shc7Yt4HJ6Wu6SN4w==", + "dependencies": { + "prop-types": "^15.7.2" + } + }, "node_modules/@mui/base": { "version": "5.0.0-beta.4", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.4.tgz", @@ -20005,6 +20020,19 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "@mdi/js": { + "version": "7.2.96", + "resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.2.96.tgz", + "integrity": "sha512-paR9M9ZT7rKbh2boksNUynuSZMHhqRYnEZOm/KrZTjQ4/FzyhjLHuvw/8XYzP+E7fS4+/Ms/82EN1pl/OFsiIA==" + }, + "@mdi/react": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.6.1.tgz", + "integrity": "sha512-4qZeDcluDFGFTWkHs86VOlHkm6gnKaMql13/gpIcUQ8kzxHgpj31NuCkD8abECVfbULJ3shc7Yt4HJ6Wu6SN4w==", + "requires": { + "prop-types": "^15.7.2" + } + }, "@mui/base": { "version": "5.0.0-beta.4", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.4.tgz", diff --git a/geneit_app/package.json b/geneit_app/package.json index 18c3cb3..f978bad 100644 --- a/geneit_app/package.json +++ b/geneit_app/package.json @@ -6,6 +6,8 @@ "@emotion/react": "^11.11.0", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.2", + "@mdi/js": "^7.2.96", + "@mdi/react": "^1.6.1", "@mui/icons-material": "^5.11.16", "@mui/material": "^5.13.4", "@testing-library/jest-dom": "^5.16.5", diff --git a/geneit_app/src/widgets/BaseLoginpage.tsx b/geneit_app/src/widgets/BaseLoginpage.tsx index 290b172..d5ed048 100644 --- a/geneit_app/src/widgets/BaseLoginpage.tsx +++ b/geneit_app/src/widgets/BaseLoginpage.tsx @@ -1,9 +1,93 @@ +import { mdiFamilyTree } from "@mdi/js"; +import Icon from "@mdi/react"; +import Avatar from "@mui/material/Avatar"; +import Box from "@mui/material/Box"; +import CssBaseline from "@mui/material/CssBaseline"; +import Grid from "@mui/material/Grid"; +import Link from "@mui/material/Link"; +import Paper from "@mui/material/Paper"; +import Typography from "@mui/material/Typography"; +import * as React from "react"; import { Outlet } from "react-router-dom"; -export function BaseLoginPage(): React.ReactElement { +function Copyright(props: any) { return ( - <> - - + + {"Copyright © "} + + Pierre HUBERT + {" "} + {new Date().getFullYear()} + {"."} + + ); +} + +export function BaseLoginPage() { + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + const data = new FormData(event.currentTarget); + console.log({ + email: data.get("email"), + password: data.get("password"), + }); + }; + + return ( + + + + t.palette.mode === "light" + ? t.palette.grey[50] + : t.palette.grey[900], + backgroundSize: "cover", + backgroundPosition: "center", + }} + /> + + + + + + + GeneIT + + + La généalogie de votre famille + + + {/* inner page */} + + + + + + ); }