Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/flo-bit/flo-bit.github.io. my personal website, w/ astro, svelte, tailwind, typescript, threlte flo-bit.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788---import { getBlogPosts } from "src/utils";
interface Article { title: string; description: string; date: string; href: string;}
const posts = (await getBlogPosts()).splice(0, 4);
function formatDate(date: Date) { return date.toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", });}---
<div class="relative isolate overflow-hidden bg-background"> <div class="mx-auto max-w-5xl px-6 lg:px-8"> <div id="blog" class="py-16 md:py-32 section"> <div class="max-w-2xl"> <h1 class="text-4xl font-bold tracking-tight text-base-800 dark:text-base-100 sm:text-5xl" > my ramblings </h1> <p class="mt-6 text-base text-base-600 dark:text-base-400"> here are some of my thoughts on things i'm learning or working on. </p> </div> <div class="mt-16"> <div class="grid grid-cols-1 md:grid-cols-2 gap-16"> { posts.map((article) => ( <article class=""> <div class="group relative flex flex-col items-start"> <div class="text-base z-10 font-semibold tracking-tight text-base-800 dark:text-base-100"> {article.data.title} </div> <div class="relative z-10 order-first mb-3 flex items-center text-sm text-base-400 dark:text-base-500 pl-3.5 mt-1"> <span class="absolute inset-y-0 left-0 flex items-center" aria-hidden="true" > <span class="h-4 w-0.5 rounded-full bg-base-200 dark:bg-base-500" /> </span> {formatDate(article.data.pubDate).toLowerCase()} </div>
<p class="relative z-10 mt-2 text-sm text-base-600 dark:text-base-400"> {article.data.description} </p>
<a href={"blog/post/" + article.slug}> <div class="absolute -inset-x-4 -inset-y-6 z-0 scale-95 bg-base-50 opacity-0 transition group-hover:scale-100 group-hover:opacity-100 dark:bg-base-800/50 sm:-inset-x-6 sm:rounded-2xl" /> <span class="absolute -inset-x-4 -inset-y-6 z-20 sm:-inset-x-6 sm:rounded-2xl" /> <span class="relative z-10 mt-4 flex items-center text-sm font-medium text-base-400 transition-colors duration-200 group-hover:text-accent-400"> read <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-3 h-3 ml-1 mt-0.5" > <path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" /> </svg> </span> </a> </div> </article> )) } </div> </div> </div> </div></div>