export const description = "Software developer and open-source enthusiast.";

export default function (data: Lume.Data) {
  return (
    <>
      <p>
        I am a software developer, open-source enthusiast, lover of pizza, and
        renegade of funk. I speak fluent English and Filipino.
      </p>
      <p>
        You'll most likely find me within{" "}
        <a href="https://code.fosterhangdaan.com">my lab</a>{" "}
        tinkering with my inventions and the latest JavaScript frameworks. Other
        times, I help in the battle for an open web and for user privacy by
        contributing in the development of free and open-source software.
      </p>
      <h2 id="contact-me" tabIndex={-1}>
        <a className="header-anchor" href="#contact-me">Contact Me</a>
      </h2>
      <p>
        The best method of reaching me is through my email:{" "}
        <a href="mailto:foster@hangdaan.email">foster@hangdaan.email</a>.
      </p>
      <p>
        If you'd like an encrypted response, you can send me your GPG public
        key. You can find mine in the <a href="/gpg-key/">GPG Key</a> page.
      </p>
      <h2 id="highlighted-projects" tabIndex={-1}>
        <a className="header-anchor" href="#highlighted-projects">
          Highlighted Projects
        </a>
      </h2>
      <ul>
        <li>
          <a href="https://code.fosterhangdaan.com/foster/vimm-dl">
            Vimm DL
          </a>{" "}
          &mdash; A secure command-line tool to automate game downloads from
          {" "}
          <a href="https://vimm.net/vault">Vimm's Vault</a>.
        </li>
        <li>
          <a href="https://code.fosterhangdaan.com/foster/ipme">IpMe</a>{" "}
          &mdash; A self-hostable API for obtaining your public IP address.
        </li>
        <li>
          <a href="https://code.fosterhangdaan.com/foster/grub-themes">
            GRUB Themes
          </a>{" "}
          &mdash; Collection of themes for the <strong>GR</strong>and{" "}
          <strong>U</strong>nified <strong>B</strong>ootloader.
        </li>
        <li>
          <a href="https://code.fosterhangdaan.com/foster/bitcoin-core-container">
            Bitcoin Core Container
          </a>{" "}
          &mdash; A containerized Bitcoin node.
        </li>
        <li>
          <a href="https://code.fosterhangdaan.com/foster/website">
            This website
          </a>{" "}
          &mdash; My personal website &amp; blog.
        </li>
      </ul>
      <p>
        <a href="https://code.fosterhangdaan.com/foster?tab=repositories">
          View all projects
        </a>
      </p>
      <h2 id="latest-blog-posts" tabIndex={-1}>
        <a className="header-anchor" href="#latest-blog-posts">
          Latest Blog Posts
        </a>
      </h2>
      <ul>
        {data.nav.menu("/blog/posts")?.children?.sort((a, b) => {
          let result = 0;
          if (a.data && b.data) {
            if (a.data.date < b.data.date) {
              result = 1;
            } else if (a.data.date > b.data.date) {
              result = -1;
            }
          }
          return result;
        }).slice(0, 5).map((
          post,
          index,
        ) => (
          <li key={index}>
            <a href={post.data?.url}>{post.data?.title}</a> &mdash;{" "}
            <time className="post-list-date">
              {Intl.DateTimeFormat("en-CA", { dateStyle: "long" }).format(
                post.data?.date,
              )}
            </time>
          </li>
        ))}
      </ul>
      <p>
        <a href="/blog/">View all blog posts</a>
      </p>
    </>
  );
}