<!DOCTYPE html>
<html>

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/css/css.css">
  <style>
    .club512 {
      border-radius: calc(var(--radius)/2);
    }
  </style>
</head>

<body style="background-color: #222;">
  <div id="content">
    <div class="header" style="grid-area: header1; text-align: center">
      <h1>SpoodyThe<span style="color:var(--background-text)">.</span>One</h1>
    </div>

    <div class="content" style="grid-area: content1">
      <h2>Things I like</h2>
      <ul>
        <li><a href="https://myanimelist.net/animelist/unplowed">Anime</a></li>
        <li>Programming</li>
        <li>Gaming</li>
        <li>Vim motions</li>
      </ul>
    </div>
    <div class="content posts" style="grid-area: content2">
      <h2><a href="posts">Projects I've finished</a></h2>
      <ul>
        <li><a href="/posts?post=How I made a programming language 700x slower than python">Openbirch</a><br>(made it to
          an alpha release)</li>
        <li><a href="/posts?post=Putting hungry minecraft servers to sleep">Minecraft server
            hibernator</a></li>
        <li><a href="https://gitlab.com/SpoodyTheOne/the-wheel">Wheel of names drinking game</a><br>(scraping the bottom
          of the barrel for finished projects)</li>
      </ul>
    </div>
    <!-- <div class="content" style="grid-area: content3">content</div> -->

    <div class="footer" style="grid-area: footer1">
      <marquee>Footer</marquee>
    </div>
    <div class="footer" style="grid-area: footer2; text-align: center">
      <a href="https://nixwebr.ing/next/<name>">&leftarrow; prev</a> <a href="https://nixwebr.ing">Webring</a>
      <a href="https://nixwebr.ing/prev/<name>">next &rightarrow;</a>
    </div>
    <div class="footer" style="grid-area: footer3; text-align: center;">
      <a href="https://512kb.club" style="padding:0"><img style="aspect-ratio: 234.383/30; margin-bottom: -5px" class="club512" height=24
          alt="a proud member of the green team of 512KB club"
          src="https://512kb.club/assets/images/green-team.svg"></a>
    </div>
  </div>
  <div id="background"></div>
  <script src="/js/main.js"></script>
  <script>
    generate_background();

    (async () => {
      let response = await fetch(`/posts/index`);
      if (response.status != 200)
        return;

      let posts = (await response.text()).split("\n");

      let p = document.querySelector("#content>.content.posts>h2");
      p.innerHTML = "Recent <a href=\"/posts\">posts</a>";

      let elem = document.querySelector("#content>.content.posts>ul");
      elem.innerHTML = posts.slice(0, 3).map(x => `<li><a href="/posts?post=${x}">${x}</a></li>`).join("\n");
      elem.style.maxWidth = "40ch";
      elem.classList.add("posts");
    })()
  </script>
</body>

</html>