import MarkdownPage from '../templates/MarkdownPage';

import Typ from '../components/Typ';
import ViewPort from '../components/ViewPort';
import Link from '../components/Link';
import Code from '../components/Code';

// @ts-ignore
import md from './greeting.md';

import { List, ListItem } from '../components/List';
import { DISPLAY_DOMAIN } from '../utils/env';


export default function Home() {

  const gitLink = 'https://git.al.' + DISPLAY_DOMAIN;

  let email : string;

  switch(DISPLAY_DOMAIN) {
    case "flu0r1ne.net":
      email = "flu0r1ne [at] flu0r1ne.net";
      break;
    case "exander.io":
      email = "alex [at] al.exander.io";
      break;
    default:
      throw Error("Display domain not recognized");
  }

  return (
    <>
      <ViewPort size='md' mt={3} >
        <Typ variant="h2" gutter>Hello,</Typ>
        <Typ>Welcome to my homepage. I'm a software developer, engi-nerd, and a recent graduate in Computer Engineering at Texas A&M University. I've worked on a wide range of computational projects across a number of subject areas: robotics, bioinformatics, computer security, networking, deep learning, and computer systems. Engineering projects define my life, and fill much of my waking attention.  I've founded and led two robotics teams, built a SLAM system for autonomous driving, worked as an undergraduate teaching assistant for a Data Structures and Algorithms course, created genome analysis toolkits, and have contributed code to high-performance routers. I'm also passionate about open-source and often flit around the internet contributing to open-source projects. Recently, I found and reported a buffer overrun in an in-tree Linux kernel driver and added zsh auto complete support to the popular <Code>argcomplete</Code> module for Python.</Typ>
        <List mt={1} mb={1} variant="unordered">
          <ListItem><Link href="/logs">The Logs</Link></ListItem>
          <ListItem><Link href={gitLink}>Public Git Projects</Link></ListItem>
          <ListItem>
            My PGP keys
            <List variant="unordered">
              <ListItem><Link href="/flur01ne.asc">Ascii Armored</Link></ListItem>
              <ListItem><Link href="/flur01ne.pub">Binary</Link></ListItem>
            </List>
          </ListItem>
        </List>
        <Typ style={{ marginBottom: '0.5rem' }}>I'm a privacy enthusiast and go by my first name, Alex, or my legacy online handle, <Code>flu0r1ne</Code>.</Typ>
        <Typ gutter>Best,</Typ>
        <Typ>- Alex {"< " + email + " >"}</Typ>
      </ViewPort>
    </>
  );
}
