diff --git a/src/components/FinishedBooks.astro b/src/components/FinishedBooks.astro new file mode 100644 index 0000000..7b4117c --- /dev/null +++ b/src/components/FinishedBooks.astro @@ -0,0 +1,115 @@ +--- +/** + * "Finished" — the 5 most recently finished books, with a link to the full list. + * + * import FinishedBooks from '../components/FinishedBooks.astro'; + * + * + * Data: api.c0smere.net/reading/finished — the same array /reading/finished.astro renders in + * full; this widget just takes the first 5 client-side rather than adding a ?limit param to an + * endpoint whose only other consumer wants everything. + * + * Deliberately terse, matching ReadingNow at this rail width (13rem): title + date only, no + * duration/pages/author — those live on the full page. Title links to the book's Quotes page + * only when quote_slug is present; see api.reading_finished()'s comment (grants_phlegethon.sql) + * for why a non-null slug is always a real page. + */ +--- + + + + + + diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index b24e9b0..fc7dba8 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -6,6 +6,7 @@ import { COMMIT, BUILT_AT } from '../lib/build-info.mjs'; import NavTree from '../components/NavTree.astro'; import Toc from '../components/Toc.astro'; import ReadingNow from '../components/ReadingNow.astro'; +import FinishedBooks from '../components/FinishedBooks.astro'; import { loadNotebooks, notebookUrl } from '../lib/notebooks.mjs'; interface Props { @@ -205,6 +206,7 @@ const pageUrl = new URL(Astro.url.pathname, Astro.site); diff --git a/src/pages/reading/finished.astro b/src/pages/reading/finished.astro new file mode 100644 index 0000000..ea5fb05 --- /dev/null +++ b/src/pages/reading/finished.astro @@ -0,0 +1,186 @@ +--- +import Base from '../../layouts/Base.astro'; +--- + + +

Finished books

+ +

+ The rail on every page carries the five most recent. This is the whole list: when I + finished each one, how long it took by the device's own cumulative counter, and — where + I took any highlights — a link through to the quotes I kept. +

+ + + + + + + +