import {
  Card,
  CardBody,
  CardFooter,
  CardHeader,
  Container,
  Divider,
  Heading,
  Image,
  Link,
  Text,
} from "@chakra-ui/react";
import projects from "../../data/public-projects.json";

export function meta() {
  return [
    {
      title: "For Hiring Teams - Car Crushers",
    },
    {
      name: "robots",
      content: "noindex",
    },
  ];
}

export default function () {
  return (
    <Container maxW="container.xl">
      <Heading textAlign="start">About Evan</Heading>
      <br />
      <Text textAlign="start">
        Hello! Thank you for your interest in me as a candidate. Are you
        wondering if I did all those things I mentioned on my resume? If so,
        yes, I did. Below is a list of some things I have worked on during my
        time here, some of them more strongly related than others. Thank you for
        taking the time to look at a history of my past and current work.
      </Text>
      <br />
      <div
        style={{
          display: "grid",
          gap: "1rem",
          gridTemplateColumns: "repeat(auto-fill, minmax(16rem, 1fr))",
          justifyItems: "center",
        }}
      >
        {projects.map((project) => (
          <Card borderRadius="36px" key={project.name} p="12px" w="100%">
            <Image
              alt={`Logo for ${project.name}`}
              borderRadius="36px"
              src={`/files/${project.image}`}
            />
            <CardHeader>
              <b>
                <Heading size="md">{project.name}</Heading>
              </b>
              <Text>Time Span: {project.timespan}</Text>
            </CardHeader>
            <CardBody>
              <Text>{project.description}</Text>
            </CardBody>
            <Divider />
            <CardFooter gap="16px" justifyContent="center">
              {project.work_link ? (
                <Link href={project.work_link}>Project Work</Link>
              ) : null}
              {project.landing_link ? (
                <Link href={project.landing_link}>Project Site</Link>
              ) : null}
            </CardFooter>
          </Card>
        ))}
      </div>
    </Container>
  );
}
