--- import Chip from "@gk/ui/components/Chip.astro"; import FilterGroup from "@gk/ui/components/FilterGroup.astro"; import PageShell from "@gk/ui/components/PageShell.astro"; import StarChartArt from "@gk/ui/components/StarChartArt.astro"; import { pageSeals } from "@gk/ui/components/seals.ts"; import CtaBand from "../../components/world/CtaBand.astro"; import WorldSection from "../../components/world/WorldSection.astro"; import Button from "@gk/ui/components/Button.astro"; import type { Note } from "../../lib/content.ts"; import { plural, site } from "../../lib/page.ts"; import { formatDate } from "../../lib/site.ts"; import { byDateDesc, byOrder, craftSeal, makePhotos } from "../../lib/world.ts"; const s = await site(); const text = s.pageText("/workshop/makes"); const intro = s.render(text?.body); const craftOf = (m: Note<"make">) => { const found = s.byName(m.data.craft); return found?.type === "craft" ? (found as Note<"craft">) : undefined; }; // Newest first; makes without a finish date follow, still in a stable order. const makes = byDateDesc(s.all("make")).sort((a, b) => Number(!!b.data.date) - Number(!!a.data.date)); const crafts = byOrder(s.all("craft")).filter((c) => makes.some((m) => craftOf(m)?.path === c.path)); const loose = makes.some((m) => !craftOf(m)); const pills = crafts.length + (loose ? 1 : 0) >= 2 ? [{ label: "All", value: "", active: true }, ...crafts.map((c) => ({ label: c.title, value: c.slug })), ...(loose ? [{ label: "Other", value: "-" }] : [])] : []; ---
Workshop / Makes

{text?.title ?? "All makes"}

{text?.data.lede ?? "Everything I have made in the Workshop, newest first."}

{intro &&
} {pills.length > 0 && } { makes.length > 0 ? (
    {makes.map((m) => { const craft = craftOf(m); const photos = makePhotos(m); const log = s.backlinks(m, { type: "post" })[0]; return (
  • {craft && ( {craft.title} )}

    {craft ? {m.title} : m.title}

    {m.data.blurb && {m.data.blurb}} {(m.data.date || log) && ( {m.data.date && } {log && Build log} )}
  • ); })}
) : (

Nothing finished yet.

) }