Skip to content

Commit

Permalink
feat: clean up date styling on post lists
Browse files Browse the repository at this point in the history
  • Loading branch information
esfalsa committed May 19, 2024
1 parent 30690c2 commit 931b2c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/PostList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ const { posts } = Astro.props;
<DateTime
date={post.data.pubDate}
display={{ month: "long", day: "numeric" }}
class="shrink-0 text-sm tabular-nums text-gray-300"
class="hidden shrink-0 text-sm tabular-nums text-gray-300 sm:block"
/>
<DateTime
date={post.data.pubDate}
display={{ month: "short", day: "numeric" }}
class="shrink-0 text-sm tabular-nums text-gray-300 sm:hidden"
/>
</div>
))
Expand Down
2 changes: 1 addition & 1 deletion src/pages/posts/[year].astro
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const { posts } = Astro.props;
>
<div class="h-full w-full bg-gray-800 p-px transition duration-200 hover:bg-opacity-0">
<div class="relative h-full w-full rounded-[calc(0.5rem-0.8px)] bg-gray-950 p-4">
<div class="mb-2 flex flex-row items-center justify-between">
<div class="mb-2 flex flex-col justify-between sm:flex-row sm:items-center">
<h2 class="mr-4 text-lg font-bold text-brand-400">
{post.data.title}
</h2>
Expand Down

0 comments on commit 931b2c9

Please sign in to comment.