Something went wrong. Try again.
Mirror of https://github.com/kualta/site — web infrastructure
Something went wrong. Try again.
643 B · 17 lines
Astro
123456789101112131415161718---import type { PostMetadata } from "@/lib/posts";
interface Props extends PostMetadata {}
const props = Astro.props;// the list is ordered by date already, so the day and month only add noiseconst year = props.date.match(/^\d{4}/)?.[0] ?? props.date;---<a href={`/posts/${props.filename}`} class="flex w-full min-w-0 flex-row items-baseline gap-2 rounded-xl bg-secondary px-4 py-2 text-lg drop-shadow-sm hover:opacity-70 dark:bg-dark-secondary"> <span class="min-w-0 truncate font-medium">{props.title}</span> <span class="ml-auto shrink-0 whitespace-nowrap font-mono text-sm text-secondary-text">{year}</span></a>