docs: click-to-zoom lightbox for diagrams (scroll-zoom + drag-pan)

Graphviz renders SVG as <object>, which swallows clicks and can't be
lightboxed. Vendored, dependency-free zoom.js converts each graphviz
<object> to a clickable <img> (crisp vector) and adds a fullscreen
overlay: click to open, scroll to zoom toward the cursor, drag to pan,
Esc / dbl-click / background-click to close. Works for any img.zoomable,
so future charts get it free. Degrades gracefully (no JS -> inline image
still renders). Wired via html_css_files / html_js_files.
This commit is contained in:
russell@unturf.com 2026-05-21 15:26:39 -04:00
parent 5dd9c18f79
commit 2a37c6ec51
No known key found for this signature in database
3 changed files with 160 additions and 0 deletions

View file

@ -43,6 +43,11 @@ html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_title = "Arborist API Reference"
# Click-to-zoom lightbox for diagrams (graphviz SVG + img.zoomable).
# Vendored, dependency-free — see _static/zoom.{css,js}.
html_css_files = ["zoom.css"]
html_js_files = ["zoom.js"]
# Standard sphinx-book-theme layout: full project TOC on the left,
# 'On this page' (current page sections) on the right. show_toc_level=3
# expands the right TOC down to subsections.