--- /** * Now: every status in the log, grouped (making, at the table, playing, * reading, watching, up next), each an anchor at its slug, with the * Everything / Now / Up next filter. */ import FilterGroup from "@gk/ui/components/FilterGroup.astro"; import Motif from "@gk/ui/components/Motif.astro"; import PageShell from "@gk/ui/components/PageShell.astro"; import SectionHeading from "@gk/ui/components/SectionHeading.astro"; import Star from "@gk/ui/components/Star.astro"; import TickScale from "@gk/ui/components/TickScale.astro"; import { seals } from "@gk/ui/components/seals.ts"; import PageHero from "../components/PageHero.astro"; import StatusRow from "../components/home/StatusRow.astro"; import { groupStatuses, lastUpdated, viewStatus } from "../lib/home.ts"; import { site } from "../lib/page.ts"; import { formatDate } from "../lib/site.ts"; const s = await site(); const text = s.pageText("/now"); const groups = groupStatuses(s); const updated = lastUpdated(s); const lede = [text?.data.lede ?? "What I am making, reading, playing and watching right now.", updated && `Last updated ${formatDate(updated)}.`] .filter(Boolean) .join(" "); const intro = s.render(text?.body); const hasNext = groups.some((g) => g.key === "next"); const wrapped = s .all("status") .filter((x) => /finish|wrapped|completed|done|caught up/i.test(x.data.kind)) .sort((a, b) => b.data.date.localeCompare(a.data.date)) .slice(0, 5) .map((x) => viewStatus(s, x)); ---
{intro &&
} { groups.length ? ( groups.map((g) => (
{g.title}
    {g.items.map((v) => ( ))}
)) ) : (

Nothing on the status log yet.

) } {!hasNext && }