2023-06-08 17:47:59 +00:00
|
|
|
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";
|
2023-06-06 14:50:47 +00:00
|
|
|
import { Outlet } from "react-router-dom";
|
|
|
|
|
2023-06-08 17:47:59 +00:00
|
|
|
function Copyright(props: any) {
|
2023-06-06 14:50:47 +00:00
|
|
|
return (
|
2023-06-08 17:47:59 +00:00
|
|
|
<Typography
|
|
|
|
variant="body2"
|
|
|
|
color="text.secondary"
|
|
|
|
align="center"
|
|
|
|
style={{ marginTop: "20px" }}
|
|
|
|
{...props}
|
|
|
|
>
|
|
|
|
{"Copyright © "}
|
|
|
|
<Link color="inherit" href="https://0ph.fr/" target="_blank">
|
|
|
|
Pierre HUBERT
|
|
|
|
</Link>{" "}
|
|
|
|
{new Date().getFullYear()}
|
|
|
|
{"."}
|
|
|
|
</Typography>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function BaseLoginPage() {
|
|
|
|
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
|
|
|
event.preventDefault();
|
|
|
|
const data = new FormData(event.currentTarget);
|
|
|
|
console.log({
|
|
|
|
email: data.get("email"),
|
|
|
|
password: data.get("password"),
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Grid container component="main" sx={{ height: "100vh" }}>
|
|
|
|
<CssBaseline />
|
|
|
|
<Grid
|
|
|
|
item
|
|
|
|
xs={false}
|
|
|
|
sm={4}
|
|
|
|
md={7}
|
|
|
|
sx={{
|
|
|
|
backgroundImage: "url(/login_splash.jpg)",
|
|
|
|
backgroundRepeat: "no-repeat",
|
|
|
|
backgroundColor: (t) =>
|
|
|
|
t.palette.mode === "light"
|
|
|
|
? t.palette.grey[50]
|
|
|
|
: t.palette.grey[900],
|
|
|
|
backgroundSize: "cover",
|
|
|
|
backgroundPosition: "center",
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Grid item xs={12} sm={8} md={5} component={Paper} elevation={6} square>
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
my: 8,
|
|
|
|
mx: 4,
|
|
|
|
display: "flex",
|
|
|
|
flexDirection: "column",
|
|
|
|
alignItems: "center",
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Avatar sx={{ m: 1, bgcolor: "secondary.main" }}>
|
|
|
|
<Icon path={mdiFamilyTree} size={1} />
|
|
|
|
</Avatar>
|
|
|
|
<Typography component="h1" variant="h5">
|
|
|
|
GeneIT
|
|
|
|
</Typography>
|
|
|
|
<Typography
|
|
|
|
component="h1"
|
|
|
|
variant="h6"
|
|
|
|
style={{ margin: "10px 0px 30px 0px" }}
|
|
|
|
>
|
|
|
|
La généalogie de votre famille
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
{/* inner page */}
|
|
|
|
<Outlet />
|
|
|
|
|
|
|
|
<Copyright sx={{ mt: 5 }} />
|
|
|
|
</Box>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2023-06-06 14:50:47 +00:00
|
|
|
);
|
|
|
|
}
|