123456789101112131415// the seasons, generated from madoromi at build time (lib/palettes.ts), and each palette's// day and night desks as plain colours, which the deskbar's look chip splits between while// the page follows the system (light-dark() can only give it one at a time).
import type { APIRoute } from "astro";import { palettes, paletteSelector } from "../lib/palettes";
export const GET: APIRoute = () => { const { css, palettes: list } = palettes(); const chips = list .map((p) => `${paletteSelector(p.id)} { --chip-day: ${p.chip.light.desk}; --chip-night: ${p.chip.dark.desk}; }`) .join("\n"); return new Response(`${css}\n${chips}\n`, { headers: { "content-type": "text/css" } });};