const ROMAN = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"]; // BlurIn is shared with the gallery — see Reveal.jsx. // One photo, in a box that already holds its shape so nothing jumps while the // image loads. `w`/`h` come from the manifest; without them the box is left to // the image itself. function Frame({ frame, index, label, total, captionInset = 0 }) { // A film takes the same place in the sequence as a photograph, so the choice // is made here rather than at each of the four spots that lay out a row. if (frame.youtube) return ; const ratio = frame.w && frame.h ? `${frame.w} / ${frame.h}` : undefined; // Without a caption in the manifest every frame in a series read the same to // a screen reader — "Sven Ugau", forty-one times over. The position at least // tells someone where they are. Real descriptions belong in the manifest. const described = frame.caption || `${label} — frame ${index + 1}${total ? ` of ${total}` : ""}`; return (
{described}
{/* Nothing under a frame that has nothing to say. The project name used to sit under all forty-one — already the page's heading and its tab title — and a bare number left on its own read as a stray mark. The number returns alongside the words as soon as the manifest carries a caption. */} {frame.caption && (
{String(index + 1).padStart(2, "0")} {frame.caption}
)}
); } // A film in the sequence. Nothing of YouTube's is fetched until someone asks // for it: the player alone is about a megabyte, and on a page where every image // is being weighed that is too much to spend on a visitor who never presses // play. Until then this is a still with a control over it. // // `poster` names a frame from the project's own folder; without one, YouTube's // thumbnail stands in — the only request made before play, and it comes from // a cookieless host. function FilmFrame({ frame, captionInset = 0 }) { const [playing, setPlaying] = React.useState(false); const [hover, setHover] = React.useState(false); const id = frame.youtube; const still = frame.poster || `https://i.ytimg.com/vi/${id}/maxresdefault.jpg`; const label = frame.caption || "Film"; return (
{playing ? (