import { h, render, Component } from "preact";
import {
  Container,
  Card,
  CardActions,
  CardContent,
  Typography,
  Button,
} from "@material-ui/core";
const CV = new URL("../static/cv.pdf", import.meta.url);

import VideoPlayer from "./VideoPlayer.jsx";

class Greeting extends Component {
  render() {
    return (
      <div>
        <div
          style={{
            position: "absolute",
            width: "100%",
            left: "50%",
            right: "50%",
            top: "25%",
            height: "50%",
            objectFit: "cover",
            transform: "translate(-50%,-50%)",
            zIndex: "-1",
          }}
        >
          <VideoPlayer />
        </div>
        <Container
          maxWidth="sm"
          style={{
            zindex: "0",
          }}
        >
          <p />
          <Card>
            <CardContent>
              <Typography variant="h1">Welcome</Typography>
              <Typography variant="body1">
                Hi, My name is Warwick and I'm an Associate Lecturer in
                Computing at the Games Academy in Falmouth University, with an
                academeic background in Computing for Games and
                Entrepreneurship. I'm currently looking for oppertunities which
                would allow me to explore graphics programming and simulation.
              </Typography>
            </CardContent>
            <CardActions>
              <Button href={CV} color="secondary">
                My Corriculum Vitae
              </Button>
            </CardActions>
          </Card>
        </Container>
      </div>
    );
  }
}

export default Greeting;
