docs(site): vertical pipeline on mobile, click tooltips, consistent chrome
All checks were successful
docs / build-and-deploy (push) Successful in 2s

- Pipeline diagram stacks vertically with downward arrows on mobile (row on
  >=720px) instead of the awkward wrap.
- Tooltip cards now open on CLICK (works on touch too), the card itself is
  clickable and opens the symbol's page in a NEW TAB, and an outside click or
  Escape closes it. Replaces the hover-only behavior.
- Reference pages get their own nav — Home / API Reference / Source ↗ — instead
  of the landing-only Features/Examples/Get started anchors, and now include the
  Source link.
- Unify the container width (1120px) across the landing and all reference pages
  so the header and content align between them.
- Reword extern/@export FFI docs from "C-ABI" to "native" for consistency with
  the site's no-C wording.

Verified in-browser at 375px and 1280px: vertical pipeline, click→card→new-tab,
outside-click close, correct reference nav, aligned container; 158 examples still
compile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-08-29 18:42:40 +03:00
parent c93eca80af
commit 31f1019a69
7 changed files with 62 additions and 41 deletions

View file

@ -161,10 +161,10 @@ NS_TIP = {"Screen": "The 2D drawing surface.", "Color": "The named color palette
# ---------------------------------------------------------------------------
# shared chrome
# ---------------------------------------------------------------------------
def nav_html(cfg, active=None):
def nav_html(cfg, links=None, cta_href="api.html"):
out = []
for n in cfg["nav_links"]:
cls = 'class="nav-cta" ' if n.get("href") == "api.html" else ""
for n in (links if links is not None else cfg["nav_links"]):
cls = 'class="nav-cta" ' if n.get("href") == cta_href else ""
out.append('<a %shref="%s">%s</a>' % (cls, n["href"], esc(n["label"])))
return "".join(out)
@ -186,10 +186,12 @@ def head_html(title, desc, css_file):
</head>""", {"TITLE": esc(title), "DESC": escattr(desc), "CSS": css})
def topbar(cfg):
refnav = nav_html(cfg, links=cfg.get("ref_nav_links", cfg["nav_links"]), cta_href=None) \
+ '<a class="nav-cta" href="%s">Source ↗</a>' % cfg["repo_url"]
return ('<header class="nav"><div class="wrap nav-in">'
'<a class="brand" href="index.html"><span class="logo">L</span> %s</a>'
'<button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button>'
'<nav class="nav-links">%s</nav></div></header>') % (esc(cfg["brand"]), nav_html(cfg))
'<nav class="nav-links">%s</nav></div></header>') % (esc(cfg["brand"]), refnav)
# ---------------------------------------------------------------------------
# per-item page