Skip to content

Commit b3fdde7

Browse files
committed
Add mention to Goodreads
1 parent 25ea398 commit b3fdde7

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

pages/library.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import z from "zod";
55

66
import { library } from "@/cms/content/library.json";
77
import { Heading } from "@/components/Heading";
8+
import { Link } from "@/components/Link";
89
import { Text } from "@/components/Text";
910
import { Application } from "@/layouts/Application";
1011

@@ -72,6 +73,7 @@ export function LibrarySectionBooks(props: Readonly<{ books: Book[] }>) {
7273
<dt className="sr-only">Read At</dt>
7374
<dd className="LibrarySection__Book__Date">
7475
{/* Displays relative time - e.g, 1 year ago */}
76+
last read{" "}
7577
{new Intl.RelativeTimeFormat("en", { numeric: "auto" }).format(
7678
-Math.floor((now - new Date(book.readAt).getTime()) / (1000 * 60 * 60 * 24 * 30 * 12)),
7779
"year",
@@ -150,6 +152,15 @@ export default function LibraryPage(props: Readonly<LibraryPageProps>) {
150152

151153
<LibrarySectionBooks books={props.library["exploration"]} />
152154
</LibrarySection>
155+
156+
<Text className="Library__Footer">
157+
I also use Goodreads as a personal reading log. If you’re curious about what I’m reading at the moment, you’ll
158+
find a broader and <em>more eclectic</em> mix of fiction and non-fiction{" "}
159+
<Link href="https://www.goodreads.com/user/show/37956895-sergio" target="_blank">
160+
there
161+
</Link>
162+
.
163+
</Text>
153164
</Application.Article>
154165
</Application>
155166
);

styles/pages/library.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@
2929

3030
color: var(--c-gray-11);
3131
}
32+
33+
.Library__Footer::before {
34+
content: "---";
35+
36+
display: block;
37+
margin-top: 2rem;
38+
margin-bottom: 0.5rem;
39+
}

0 commit comments

Comments
 (0)