Glossary: letters as chapters, a search panel beside the terms, and references linked to the terms that cite them
Merged
LU
10d ago+204+204+012345678901234567890123456789-59-59-01234567890123456789
The glossary hub was 260 near-identical grey cards with small letter headings, so a long scroll had no landmarks. Term pages listed related terms as a run of links, and the List of References was one long block of citations with a note saying cross-linking to terms was still to come. This PR gives the glossary landmarks and links its references to the terms that cite them.
What changes for visitors
- Glossary hub (all languages; CSS only).
- On screens 1001 px and wider, the search, the Cards/List toggle, the count and a grid of A–Z tiles sit in a pale green panel beside the title. The panel stays in view while the terms scroll, and letter jumps land at the top of the screen.
- Each letter is a large Newsreader letter on the education area's pale green. From 1240 px it is an 88 px tile beside its terms that stays in view while they scroll; below that it is a band across the column.
- Term cards are white with a thin border. With the panel beside them, wide screens show two cards to a row instead of four.
- Term pages.
- "Related terms" is a heading over cards that show the start of each definition, like the hub's cards. Terms without a page stay plain text after the cards (DESIGN.md §5).
- References get a heading and sit in a panel as wide as the definition. On Arabic pages the panel reads left to right.
- Previous and next are two pale green cards, each with its term and the start of its definition.
- List of References (new
layouts/partials/doors/glossary_references.html).- The page has the hub's layout: the search panel with a count ("10 of 712 references"), the letter tiles and A–Z groups.
- Under each reference, a "Cited in" line links the English terms whose definitions cite it. 543 of the 712 references get links; the rest are not cited by an English term whose reference text matches
apa_lookup.json. - The page is picked in
layouts/glossary/single.htmlby folder, not by front matter, becausecontent/glossary/ships frommainthrough the data artifact. The page works with either the old or the new generated body. _build_references.pynow writes only the title and the intro sentence, and the template renders the list fromapa_lookup.json. Re-running it drops the "We are currently working on a better way…" note, so the page's meta description is now just the intro sentence.
site.js: the hub script also runs on the references page, which has no view toggle or About box. The count line takes its wording from the page; that change is copied word for word from #1159, so the two PRs merge cleanly there.- DESIGN.md §4: related terms with previews may be cards, and dense term lists break into chapters under large letters.
Before and after
Glossary hub, top
| Before | After | |
|---|---|---|
| 390 px | ![]() | ![]() |
| 1440 px | ![]() | ![]() |
Glossary hub, scrolled
| Before | After | |
|---|---|---|
| 390 px | ![]() | ![]() |
| 1440 px | ![]() | ![]() |
Term page (p-hacking)
| Before | After | |
|---|---|---|
| 390 px | ![]() | ![]() |
| 1440 px | ![]() | ![]() |
List of References
| Before | After | |
|---|---|---|
| 390 px | ![]() | ![]() |
| 1440 px | ![]() | ![]() |
Checks
- Full Hugo builds of this branch and its base (0f7b5c8a9f), compared by eye at 390, 760, 1000, 1100 and 1440 px on the hub, an English and an Arabic term page and the references page, beside Teams and Partnerships. No page scrolls sideways at any of those widths.
check_seo_html.py: all checks pass.compare_builds.py: no paths added or removed. The one changed SEO tag is the references page's description, which loses the "currently working on" sentence.- Unit tests (
scripts/testsandtest_parse_disciplines_gdoc.py) pass. - In a browser, search works on the hub ("replication": 7 of 260 terms) and on the references page ("Nosek": 10 of 712 references), with no script errors. Every
idon the references page is unique.
Created with Claude Opus 5.5 in Claude Code.
After CI
- The generated
content/glossary/references/index.mdis back as main has it; only its generator changes here. The page renders from its partial, so it looks the same either way, and the next data run writes the new body.check_source_rules.pynow lets a generator script beside its output (content/glossary/*.py) change. - Lines stay under 80 characters: two cards a row beside the panel at 1001–1239 px, the index introduction capped at 32.5em, reference rows at 29em, and references on term pages at 30em.
🤖 Generated with Claude Code
Summary by cubic
Reworks the glossary so a long run of terms reads as chapters, keeps search and letter navigation in a sticky panel beside the title on wide screens, and links the List of References to the English terms that cite them.
Glossary hub and term pages
- Hub cards are white with a thin border, two to a row on wide screens; each letter is a large chapter heading that stays in view while its terms scroll.
- Related terms on term pages are cards showing the start of each definition, with terms that lack a page as a quiet labelled list beneath.
- References get a heading and a plain hanging-indent list that reads left-to-right on Arabic pages; previous and next become cards with definition previews.
List of References
- Reuses the hub's layout: search with a live count, letter tiles and A–Z groups, and a "Cited in" line linking the English terms whose definitions cite each reference (543 of 712).
- The list is rendered from
apa_lookup.jsonby the template, so_build_references.pynow writes only the title and intro; re-running it drops the "currently working on a better way" note.
Checks
- Cards, the index introduction, and reference rows keep their lines under 80 characters.
- The generated references page keeps
main's body until the next data run; the source-rules check now names the two glossary generator scripts instead of exempting every script in that folder.















