Two standing markers, drawn as rings rather than brighter dots. The animated trace head is already a bright point and comes to rest on exactly the newest node at the end of every draw cycle — under prefers-reduced-motion it parks there permanently — so a second filled dot at that coordinate would read as a rendering fault. Outlines say "different kind of thing" without competing. The newest highlight is the LAST trace entry, never the max of `t`: the payload is pre-sorted, `t` is date-only, and many highlights share a day. The quoted one is looked up by text_hash, which /highlights/random now returns beside the quote. The two fetches race on every page view, so the hash is published both as a global and as a `garden:quote` event — one covers each order. About one highlight in fifteen has no node, because its source book was never indexed; markQuoted returns false and nothing is drawn. Rings are flat geometry parented to the rotating world, so they are billboarded each frame or they would vanish edge-on twice a revolution. Also adds the "Currently reading" rail widget. It says how long ago on purpose: six of the ten books on that shelf have not been opened in months, and without a relative date the thing looks broken rather than honest. Past 45 days it mutes itself. No cover — kobo.books.isbn is a sideloader's UUID for most of the shelf and storygraph_links has no cover URL. The TOC rail is now always rendered, since it carries the widget too; it was conditional on having two headings, which would have hidden the widget on the homepage. Hidden explicitly on wide notebook pages, where a third grid child would wrap under the sidebar.
19 lines
560 B
TypeScript
19 lines
560 B
TypeScript
/// <reference types="astro/client" />
|
|
|
|
declare global {
|
|
interface Window {
|
|
/**
|
|
* `text_hash` of the reading highlight in the page header, set by Base.astro once
|
|
* api.c0smere.net/highlights/random answers. The reading map reads it to ring the node
|
|
* that passage came from.
|
|
*
|
|
* A global as well as a `garden:quote` event because the two fetches race: whichever
|
|
* lands second needs the other's result, and only one of the two mechanisms works in
|
|
* each order.
|
|
*/
|
|
__gardenQuoteHash?: string;
|
|
}
|
|
}
|
|
|
|
export {};
|