BookShelfRow

2 variants. Open one in isolation: use the link on each card.

WithDescriptionAndLink

Open alone →
Thinking, Fast and Slow
Daniel Kahneman· Bookshop.org
System 1 vs System 2 — why fast thinking misleads, from the Nobel laureate who split the mind in two.

src/ui/2_organisms/BookShelfRow.astro
---
import BodyText from '../0_atoms/BodyText.astro'
import type { BookShelfItem } from '../../lib/books'
interface Props {
book: BookShelfItem
}
const { book } = Astro.props
const url = `/books/${book.slug}/`
---
<div class="relative cursor-pointer border-b border-border mb-6 pb-6">
<a
href={url}
class="font-serif font-medium text-lg leading-snug text-ink no-underline stretched-link"
>
{book.title}
</a>
<div class="text-sm text-ink-muted mt-0.5">
{book.author}
{
book.links[0] && (
<a
href={book.links[0].url}
target="_blank"
rel="noopener noreferrer"
class="relative z-10 underline underline-offset-2 text-ink"
>
· {book.links[0].label}
</a>
)
}
</div>
{
book.description && (
<BodyText variant="muted" label={book.description} class="text-sm mt-1 line-clamp-2" />
)
}
</div>