From 3b186b7724dd3ca0ff67c3c8a0f9823f0f161fc5 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 14:03:11 -0300 Subject: The landing's words jump to their recordings, the casts open on their telling frame, and #mode-box draws the box Each recording on the landing has an anchor (rec-); the "What's in it" words jump to theirs (Terminals, PDFs, Images, Diff review, Scripting) and the recording's caption ends in a link to the docs; Language servers and Themes, with no recording, link to the docs. A cast's `poster_at` in casts.toml picks the frame it shows until it plays: live-text at the error, terminals at the copied line, petscii on the Mandelbrot; the casts wait for the in-view script to play them. A caption may hold markup: the 9P clip links 9ns to setup. The downloads give their size, read from project.download, and the footer links the changes (project.changes). The guide's annotated pane has alt text, pin 1 beside the workspace tag rather than on Changelog, and pin 5 on the body's text; pin positions are written with repr, since str puts a U+2212 minus CSS cannot read. #mode-box(mark, unsaved:) draws a pane's box as it looks, in print and HTML. Co-Authored-By: Claude Opus 5.5 --- docs/typ/style.typ | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'docs/typ/style.typ') diff --git a/docs/typ/style.typ b/docs/typ/style.typ index c7e91495..23bdab3c 100644 --- a/docs/typ/style.typ +++ b/docs/typ/style.typ @@ -308,6 +308,7 @@ (name: "git.0x4200.cafe", web: "https://git.0x4200.cafe/pardes", clone: "https://git.0x4200.cafe/pardes.git"), ), license: "ISC", + changes: "https://git.sr.ht/~gbrls/pardes/tree/main/item/src/CHANGELOG.md", // built binaries to download: the version they are, where the // checksums are, and a file per program (install.typ shows them) download: ( @@ -315,10 +316,10 @@ sums: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/SHA256SUMS", files: ( (program: "pardes", what: "the terminal build, static, any x86_64 Linux", - url: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/pardes-x86_64-linux-static", + url: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/pardes-x86_64-linux-static", bytes: 62034424, sha256: "9db75765a8ad2fc881164b98ff69f0d34ded582304428c28aee7f87ccb211061"), (program: "pardes-gui", what: "the window, x86_64 Linux with glibc 2.29 or later; it loads Wayland or X11 and GL or Vulkan from the system", - url: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/pardes-gui-x86_64-linux", + url: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/pardes-gui-x86_64-linux", bytes: 66620552, sha256: "d788213d14e69ee32348cee9b707b046c71c208c6436d84988e76aaf117095da"), ), ), @@ -534,17 +535,18 @@ /// the repository root (the site serves it from the same path under /// docs/site/); `size` is its pixel (width, height); each pin is (label, /// x, y) in pixels of that image. -#let annotated(src, size, ..pins) = { +#let annotated(src, size, alt: "", ..pins) = { let (w, h) = size let pins = pins.pos() context if html-out() { let web = src.trim("/docs/site/", at: start) html.elem("figure", attrs: (class: "annotated"), { html.elem("div", attrs: (class: "frame"), { - html.elem("img", attrs: (src: web, alt: "", width: str(w), height: str(h))) + html.elem("img", attrs: (src: web, alt: alt, width: str(w), height: str(h))) for (i, (label, x, y)) in pins.enumerate() { html.elem("span", attrs: (class: "pin", "aria-hidden": "true", - style: "left:" + str(calc.round(100 * x / w, digits: 2)) + "%;top:" + str(calc.round(100 * y / h, digits: 2)) + "%"), str(i + 1)) + // repr, not str: str writes a negative with U+2212, which CSS rejects + style: "left:" + repr(calc.round(100 * x / w, digits: 2)) + "%;top:" + repr(calc.round(100 * y / h, digits: 2)) + "%"), str(i + 1)) } }) html.elem("ol", attrs: (class: "pins"), for (label, x, y) in pins { html.elem("li", label) }) @@ -556,7 +558,7 @@ align(center + horizon, text(size: 0.75em, weight: "bold", fill: white, str(n)))) block(breakable: false, grid(columns: (width, 1fr), column-gutter: 1.2em, align: horizon, box(width: width, height: h * k, { - place(top + left, image(src, width: width)) + place(top + left, image(src, width: width, alt: alt)) for (i, (label, x, y)) in pins.enumerate() { place(top + left, dx: x * k - 0.625em, dy: y * k - 0.625em, pin(i + 1)) } @@ -565,3 +567,20 @@ )) } } + +/// A pane's box as it looks: blank in normal mode, `^` in insert, `$` raw +/// (a terminal's own input); `unsaved: true` fills it, as an unsaved +/// file's is. In HTML a span the stylesheet draws, its mode said in words. +#let mode-box(mark, unsaved: false) = { + let mode = if mark == "^" { "insert" } else if mark == "$" { "raw" } else { "normal" } + context if html-out() { + html.elem("span", attrs: (class: "mode-box" + if unsaved { " unsaved" } else { "" }, + role: "img", "aria-label": mode + " mode box" + if unsaved { ", unsaved" } else { "" }), mark) + } else { + box(width: 1.05em, height: 1.05em, baseline: 0.15em, radius: 1pt, + fill: if unsaved { palette.col-grip } else { palette.tag-bg }, + stroke: 0.7pt + palette.grip, + align(center + horizon, text(font: mono, size: 0.8em, weight: "bold", + fill: if unsaved { white } else { palette.ink }, mark))) + } +} -- cgit v1.3