1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 06:21:17 -04:00

use <time> element for all dates

This commit is contained in:
2022-04-16 15:59:28 -04:00
parent 1648464e0e
commit fa968dbcd2
11 changed files with 217 additions and 202 deletions

View File

@@ -1,5 +1,5 @@
import Link from "../Link";
import { formatDateTZ } from "../../lib/helpers/format-date";
import Time from "../Time";
import { styled } from "../../lib/styles/stitches.config";
import type { NoteType } from "../../types";
@@ -47,7 +47,7 @@ const Post = styled("li", {
},
});
const PostDate = styled("span", {
const PostDate = styled(Time, {
width: "5.25em",
flexShrink: 0,
color: "$medium",
@@ -67,7 +67,7 @@ const NotesList = ({ notesByYear }: NotesListProps) => {
<List>
{notes.map(({ slug, date, htmlTitle }) => (
<Post key={slug}>
<PostDate title={formatDateTZ(date)}>{formatDateTZ(date, "MMM d")}</PostDate>
<PostDate date={date} format="MMM d" />
<span>
<Link
href={{