--- /** * One board game on The Shelf: box art (or star-chart art), how it plays, * title, blurb, its states and a link to BoardGameGeek. The card is the * game's anchor (`#slug`); the data-* attributes feed the filter and sort * script. */ import Card from "@gk/ui/components/Card.astro"; import Star from "@gk/ui/components/Star.astro"; import StarChartArt from "@gk/ui/components/StarChartArt.astro"; import StatusPill from "@gk/ui/components/StatusPill.astro"; import StatusChip from "../StatusChip.astro"; import { formatDate, mediaSrc, type SiteIndex } from "../../lib/site.ts"; import type { Game } from "../../lib/library.ts"; interface Props { game: Game; site: SiteIndex; hidden?: boolean; } const { game, site, hidden } = Astro.props; const d = game.data; const plays = d.howItPlays ?? []; const status = site.statusFor(game); ---
  • p.toLowerCase()).join("|") || undefined} data-o={d.owned ? "1" : undefined} data-w={d.wantToPlay ? "1" : undefined} data-f={d.favorite ? "1" : undefined} data-lp={d.lastPlayed} data-c={d.created} hidden={hidden} >
    {plays.length > 0 && {plays.join(" ยท ")}}

    {game.title} {d.favorite && <>Favorite}

    {d.blurb}

    { (status || d.wantToPlay || !d.owned || d.lastPlayed) && (
    {status && } {d.wantToPlay && Want to play} {!d.owned && Not owned} {d.lastPlayed && Last played {formatDate(d.lastPlayed)}}
    ) } BoardGameGeek: {game.title}