Files
kuentagym/website
Duarte Santos 523cfc9df7 website: one header on every page, one contents drawer that starts closed
The docs page used to swap the site's links for its own three and unfold the
chapter rail on arrival, so half the navigation vanished the moment you opened
the documentation and a sidebar you never asked for was already there. Both are
gone. Every page — home, about, docs, API — now serves a byte-identical nav bar
and navigation sheet; which page you are on is marked with aria-current at
runtime, so nothing is ever added or dropped from the markup to say it.

The rail is now separate from the header and the same object everywhere: closed
in CSS at every width, opened by one Contents pill, closed by the ✕ in its own
sticky header, by Escape, or by a tap on the dimmed page. No preference is
remembered any more and the stale og_rail key is cleared on sight. One panel
controller in site.js drives both the sheet and the drawer, traps focus while
either is open and hands it back to the button that opened it. api.html no
longer carries a private copy of any of this.

Also: visibility is switched at one instant instead of being transitioned —
interpolating it left both panels hidden through their own opening animation,
so they popped in at the end and nothing inside could take focus until then.
Long inline code breaks instead of widening the page (docs ran 21px wide of a
320px screen), the header folds at one breakpoint rather than three, and every
control in the rail clears 44px.

246 headless assertions across four pages and five widths: nav and sheet
markup identical, drawer shut on first paint, no horizontal overflow, focus
returned, reduced motion honoured, no console errors.
2026-08-31 14:32:32 +02:00
..

opengym.duarte-santos.ch

Source of the project website — plain hand-written HTML/CSS/JS, no build step, served by nginx.

Not in this folder (added at deploy time):

  • img/ — the five screenshots from ../assets/screenshots/ plus banner.png
  • icon-180.png / icon-512.png — copied from ../frontend/public/ (the same icons the PWA uses, so the browser tab, home screen and app all match)
  • openGym.apk — the signed release build (see ../docs/MOBILE.md)
  • demo/ — the browser-only demo build of the app, embedded in the #demo section and reachable on its own at /demo/. Built from ../frontend with VITE_DEMO=1 and the jsDelivr media bases (see the pages job in ../.gitlab-ci.yml), so the ~140 MB of exercise media stays out of it. It has to live on this host: the site frames it, and X-Frame-Options: SAMEORIGIN would block it from anywhere else.

Navigation is a topic rail (.side): one title/subtitle list of everything on the site, a fixed column beside the page from 1300 px up and the hamburger sheet below that, with a scrollspy lighting the section under the reader. The top bar keeps only the brand, GitLab, Discord and the download button.

site.js carries five independent pieces, each one failing soft so the page is complete without any of them: the topic-rail sheet, its scrollspy, the scroll reveals, the demo iframe (injected only once the frame is on screen, and never below 700 px, where the CSS swaps it for an "open it full-screen" card), and the two things that come from the public gitlab.com API at view time — the star/issue counts and the About page's release timeline. Those two URLs pointed at api.github.com until that account was suspended; they go back once it is restored.

api.html is the one generated file in here: node scripts/build-api-docs.mjs rewrites it from ../api/openapi.yaml. Edit the spec, re-run the script, commit both — never hand-edit api.html, the next run overwrites it. The page is static HTML in this site's own design (no Swagger UI, nothing rendered at view time); the only script of its own it carries is the contents drawer and the card expand/collapse.

styles.css and site.js are cache-busted with ?v=N — nginx serves the site with no-cache, must-revalidate, but the query bump is what saves a Cloudflare edge from handing out an old stylesheet with new markup. Bump it on every change.