eleboog-astro/src/pages/index.astro

75 lines
4 KiB
Text

---
import { compareDesc, format } from 'date-fns'
import { toZonedTime } from 'date-fns-tz'
import BaseLayout from '../layouts/BaseLayout.astro';
import cri from "./chills_going_waaaaah.png"
import { Picture } from 'astro:assets';
import MDXCallout from "../components/mdx/MDXCallout.astro"
import { getCollection } from 'astro:content';
const posts = await getCollection('posts')
import { timeZone } from "../lib/utils";
---
<BaseLayout title="home">
<h2 class="font-serif text-3xl my-2">Hey. Welcome to City 23.</h2>
<Picture
src={cri}
alt="A scrunkly picture of my sona crying"
class="w-20 mr-4 inline-flex float-left"
/>
<p class="mb-2">
This is my personal website, containing blog posts, a mini journal, and a whole bunch of other nicknacks and projects that I&apos;m working on.
Essentially, this is my fullstack webdev playground where everything is possible and nothing makes sense... the dark side of the sauce.
</p>
<p class="mb-2">Expect posts once or twice a week, I guess.</p>
<p class="mb-2"><b>Last journal update:</b>
<a href="/journal" class="font-serif text-subtitle text-sm hover:underline">November 14, 2024</a>
</p>
<MDXCallout preset="new">
This site is now using the <a href="https://astro.build">Astro web framework</a>!
Previously, this site was using <a href="https://nextjs.org">Next.js</a>, a fullstack framework built for big whig companies
with big whig webapps... and it didn't really fit this site. Hopefully, the move to Astro will mean a more responsive and performant
blog that still has room to expand in the future. To learn more about this, check out my <a href="/journal#2024-11-12"
class="text-subtitle hover:underline">latest journal entry</a>.
<br/><br/>
I also want to note that there are now only <b>two</b> content feeds, Atom and JSON,
accessed via <a href="/feeds/feed.xml" class="text-subtitle hover:underline"><code>/feeds/feed.xml</code></a> and <a href="/feeds/feed.json" class="text-subtitle hover:underline"><code>/feeds/feed.json</code></a> respectively. This was done to simplify my RSS feeds and give myself
less work lmao.
<br/><br/>
If you have any questions (or bug reports) regarding the transition to Astro, please reach out via email. Hope you enjoy the new site!
</MDXCallout>
<h2 class="font-serif text-2xl mb-2">recent posts</h2>
<ul class="space-y-2">
{posts.sort((a, b) => compareDesc(new Date(a.data.date), new Date(b.data.date))).map((post, idx) => {
if (idx >= 3 || post.data.draft) return;
console.log(toZonedTime(post.data.date, timeZone));
return (
<li >
<a href={'/posts/' + post.slug} class="font-serif text-lg text-crusta-400 dark:text-night-300 hover:underline">{post.data.title}</a>
&emsp;<span class="font-mono text-md">{format(toZonedTime(post.data.date, timeZone), 'LLL d, yyyy')}</span>
<p>{post.data.summary}</p>
</li>
);
})}
</ul>
<h2 class="font-serif text-2xl mb-2">webrings</h2>
<div class="flex items-baseline">
<a class="text-subtitle hover:text-current" href="https://fediring.net/previous?host=eleboog.com">←&ensp;</a>
<a class="text-subtitle hover:text-current" href="https://fediring.net/">Fediring</a>
<a class="text-subtitle hover:text-current" href="https://fediring.net/next?host=eleboog.com">&ensp;→</a>
<div class="flex w-4 self-baseline h-1 border-t border-crusta-200 dark:border-night-800 mx-2"></div>
<a class="text-subtitle hover:text-current" href="https://webring.bucketfish.me/redirect.html?to=prev&name=kebokyo">←&ensp;</a>
<a class="text-subtitle hover:text-current" href="https://webring.bucketfish.me">bucket webring</a>
<a class="text-subtitle hover:text-current" href="https://webring.bucketfish.me/redirect.html?to=next&name=kebokyo">&ensp;→</a>
</div>
</BaseLayout>