diff options
| author | user <user@clank> | 2026-08-30 19:16:30 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-30 19:16:30 +0200 |
| commit | a3715c1eefb083385c42af8a52484c4b612fffe8 (patch) | |
| tree | 55c3ba9c484dbd7297a2b23998d1ab92c234f36b | |
| parent | web: the floating logo yields to the buttons and the rising terminal (diff) | |
| download | slosh-a3715c1eefb083385c42af8a52484c4b612fffe8.tar.gz slosh-a3715c1eefb083385c42af8a52484c4b612fffe8.tar.xz slosh-a3715c1eefb083385c42af8a52484c4b612fffe8.zip | |
web: a step's title is a road to the step
Clicking an article's h3 glides it to the middle of the viewport --
the exact spot where the tour's observer activates it, so the click
also switches the recording, through the same door scrolling uses
rather than a second mechanism. The pointer cursor and a breath of
pink on hover say clickable.
| -rw-r--r-- | web/index.html | 12 | ||||
| -rw-r--r-- | web/site.css | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/web/index.html b/web/index.html index 3a71736..fa59404 100644 --- a/web/index.html +++ b/web/index.html @@ -460,6 +460,18 @@ if (tour) { const ctl = (el) => el._sloshcast; let current = null; // the first activation always plays + // A step's title is a road to the step: clicking it glides the article to + // the middle of the viewport, which is the exact spot where the observer + // below activates it -- so the click also switches the recording, through + // the same door scrolling uses. + for (const s of steps) { + const h = s.querySelector("h3"); + if (h) + h.addEventListener("click", () => + s.scrollIntoView({ block: "center" }) + ); + } + const show = (name) => { if (!name || name === current) return; current = name; diff --git a/web/site.css b/web/site.css index d67c80c..5b280d5 100644 --- a/web/site.css +++ b/web/site.css @@ -450,7 +450,11 @@ section > p:last-child { margin-bottom: 0; } font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 650; line-height: 1.25; + /* Clickable: the title glides its step to the centre, where it activates. + * The pointer and a breath of pink say so. */ + cursor: pointer; } +.step h3:hover { color: var(--pink); } .step p { margin: 0.8rem 0 0; |
