design tweaks

This commit is contained in:
2025-02-03 22:33:22 -05:00
parent 46202f3337
commit 74797c161b
10 changed files with 81 additions and 40 deletions
+10 -1
View File
@@ -1,6 +1,8 @@
---
import { format, add } from 'date-fns';
import CalendarIcon from '../styles/svg/calendar.svg';
interface Props {
title: String;
date: Date;
@@ -15,6 +17,13 @@ const { title, date, slug } = Astro.props;
{slug ? <a href={`/posts/${slug}`}>{title}</a> : title}
</h2>
<div>
🗓️ <i>{format(add(new Date(date), { hours: 6 }), 'MMM do, y')}</i>
<CalendarIcon class="calendar-icon" size={24} />
{format(add(new Date(date), { hours: 6 }), 'MMM do, y')}
</div>
</div>
<style>
.calendar-icon {
transform: translateY(0.3rem);
}
</style>