summaryrefslogtreecommitdiff
path: root/docs/typ/style.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 15:33:35 -0300
committerGabriel Schneider <[email protected]>2026-10-01 15:42:55 -0300
commit4bdca090abc970b742f0653a02aa77d9adc95602 (patch)
tree253a10e5617113dd7f44010dd57bf48e0ab34200 /docs/typ/style.typ
parent9b947777a2f693d10da1101c3eab4af3a5ef5a10 (diff)
downloadpardes-4bdca090abc970b742f0653a02aa77d9adc95602.tar.gz
pardes-4bdca090abc970b742f0653a02aa77d9adc95602.zip
The guide's glossary is a definition list, and the site's tutor links its pointers into the guide
On the site the glossary is a <dl> of terms and meanings inside its <details>, with no stray count, so a text browser reads each term then its meaning. The tutor page links docs/typ/<chapter>.typ to that page, each "-> Guide: <section>" to the guide's section of that title (read from guide.typ's headings), and URLs; the tutor itself keeps its text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ/style.typ')
-rw-r--r--docs/typ/style.typ8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/typ/style.typ b/docs/typ/style.typ
index 9753eedf..f651878f 100644
--- a/docs/typ/style.typ
+++ b/docs/typ/style.typ
@@ -329,9 +329,13 @@
/// and the table; in HTML a <details> that starts closed, its summary the
/// heading and the count, so a reader who knows the words skips them.
#let glossary(title, lbl, ..cells) = context if html-out() {
+ // a real definition list, so a text browser reads term, then meaning
html.elem("details", attrs: (class: "glossary"), {
- html.elem("summary", [#heading(title) #lbl #html.elem("span", attrs: (class: "count"), "(" + str(calc.quo(cells.pos().len(), 2)) + ")")])
- pairs(..cells)
+ html.elem("summary", [#heading(title) #lbl])
+ html.elem("dl", for (term, meaning) in cells.pos().chunks(2) {
+ html.elem("dt", term)
+ html.elem("dd", meaning)
+ })
})
} else {
[#heading(title) #lbl]