aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/index.astro
blob: c2129e064e4d40f32339ce76e4da83e67f3477a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
import BaseHead from "../components/BaseHead.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
import { getCollection } from "astro:content";
import FormattedDate from "../components/FormattedDate.astro";

const posts = (await getCollection("blog")).sort(
  (a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
);
---

<!DOCTYPE html>
<html lang="en">
  <head>
    <BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} />
  </head>
  <body>
    <Header title={SITE_TITLE} />

    <main>
      <style>
        ul {
          list-style-type: none;
          padding: unset;
        }
        ul li {
          display: flex;
        }
        ul li :global(time) {
          flex: 0 0 130px;
          font-style: italic;
          color: #646464;
        }
      </style>
      <h2>Recent Blog Posts</h2>
      <section>
        <ul>
          {
            posts
              .slice(-5)
              .map((post) => (
                <li>
                  <FormattedDate date={post.data.pubDate} />
                  <a href={`/blog/${post.slug}/`}>{post.data.title}</a>
                </li>
              ))
              .reverse()
          }
        </ul>
      </section>
      <h1>
        👋 Greetings, Adventurer
      </h1>
      <p>
        Welcome to my site/blog! This place will serve as a corner where I can
        archive my thoughts and processes on various topics or projects. It'll pretty much
        just be whatever I feel like writing about, posts will be very infrequent so don't expect much.
      </p>
      <p>Check out the main site as well: <a href="https://pinapelz.com">pinapelz.com</a></p>
      </p>
    </main>
  </body>
  <Footer />
</html>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage