Plate № 19 · Navigation · long-page UX

A pattern from the gf.cx specimen book

Back-to-top jump icon

Source · Dan, 2026-06-25

"what is the conditional logic for adding a 'top' icon, for long pages — it should be automatically added and retroactively added… it might be included in the footer."

The problem

A long page leaves the reader stranded at the bottom — the header, the nav, the way back, all scrolled off. The fix is a small ↑ top link at the foot of the page. But adding it by hand means remembering to, on every long page, forever; and a page that's short today is long tomorrow once footnotes accrete. You want the affordance to appear only when it earns its place, on every surface, without anyone deciding page-by-page.

The deeper problem is that "which pages are long" is a moving answer. Content grows. New copy lands. A static allowlist drifts — and the drift is invisible, because a short page with the link is annoying but a long page without it is just quietly worse.

The element, in-page

The live specimen below runs in a sandboxed iframe (the pattern-preview primitive). Scroll down inside the preview until the page clears the threshold — the ↑ top button fades in at the lower-left. Click it to smooth-scroll back to the top. The button is absent on short pages; it only shows when the content justifies it.

Where it applies

Reusable elements

The named, copyable pieces — lift any one without the others:

Reference

Source
Dan, 2026-06-25 — distilled from the hand-wired .backtop on happiness.gf.cx/behaviour/ long-reads, generalised to the shared script and sweep on the same date.
In use / example
status.gf.cx/ — the hub renderer was wired to emit the tag on every generated page; scroll any long status panel to see it appear. The shared asset is assets.gf.cx/back-to-top/back-to-top.js. Also live on happiness.gf.cx/behaviour/ (origin, hand-wired) and this site, patterns.gf.cx.
Reusable elements
Shared CDN script · runtime scroll-height gate · no-op-if-hand-wired guard · sweep tool with manifest · generator wiring pattern (listed above).
Origin
The <a class="backtop" href="#top">↑ top</a> + <body id="top"> idiom on happiness.gf.cx/behaviour/ long-reads, present from the first commit of that surface. Generalised 2026-06-25 as a portfolio-wide affordance. Sibling of the built-with provenance footer — the same single-source, control-plane discipline applied to a different page layer.
Build cost
~25 min to build the shared script and sweep tool; ~5 min per new surface to wire the generator or run the sweep. Retroactive injection of ~166 hand-authored pages: one command.