clone

a personal forge on plain git: static pages, stacked-diff reviews, signed local ci, repo sites and releases

Draw a wide diagram again for phones

cat committed e7033c1
A diagram is as wide as its layout, and scaled down to fit the column:
a flowchart of eight steps left to right came out 1256px wide, which a
phone shows at 350px, its labels about 4px tall. In a browser Pele's
mount() would draw it again for the width it has; pages here have no
script for that.

So one wider than a phone (340px) is drawn a second time with Pele's
maxWidth at that width, which wraps labels and turns a left-to-right
flowchart top to bottom, and the figure holds both. A container query
shows the second below 640px of column and the first above it. Each
has its own ids, and the hidden one is display: none, so screen readers
read one. Only diagrams that come out narrower get the second drawing.
commit
e7033c1310697bee8f81f25a583238f4be4bc6d2
parent
3527968279601aec7e3a495aa3e7f40d26138530
author
cat <admin@dev.site>
ci
✓ passed in 78s, signed by cat
kind
feat risk score 1.6 of 3, Jev's estimate
review
#15 Draw mermaid diagrams at build time, with Pele
ci attestation
forge-attestation 1
type ci
commit e7033c1310697bee8f81f25a583238f4be4bc6d2
tree d535de1d124b7463a913bb1585774bb19bcd54e7
script .forge/ci aa9f4eac26627c6559e68cd4b5e5e76afb8e65e8
result pass
exit 0
started 2026-10-19T03:17:10Z
duration 78s
runner (not shown here; refs/notes/ci has it)
system Darwin 25.5.0 arm64
env host
log sha256:6591ad79d13a69a079f3f8ac60fd2a8a9be8e29e15b1513ba6d880385883e768 262 lines
|pushed wip/i18n
|e99e6b9 running .forge/ci: greet.sh: say what it is
|  | sh: /bin/sh
|  | ok   greet
|e99e6b9 pass in 0s, signed
|pushed main
|remote: review #4: /dami/greet/reviews/4/
|pushed wip/i18n
|22b1fb6 running .forge/ci: wave at the world
|  | sh: /bin/sh
|  | FAIL greet : got 'hello, world o/', want 'hello, world'
|22b1fb6 fail in 0s, signed
|forge: 1 commit(s) did not pass
|remote: review #6: /dami/greet/reviews/6/
|pushed ana/wave
|ac576f3 running .forge/ci: update the test for the wave
|  | sh: /bin/sh
|  | ok   greet
|ac576f3 pass in 0s, signed
|remote: review #6: /dami/greet/reviews/6/
|pushed ana/wave
|warning: You appear to have cloned an empty repository.
|site home: deployed 944ecfc -> /sites/ana/dotfiles/home/
|created ana/notes
|remote: review #1: /ana/notes/reviews/1/
|pushed ana/todo
|landing #1 A todo list: ana/todo -> main
|039c011 running .forge/ci: web, server and Python versions of greet
|  | sh: /bin/sh
|  | ok   greet
|039c011 pass in 0s, signed
|pushed main
|4d2f3bf running .forge/ci: messages: notes for the later regions
|  | sh: /bin/sh
|  | ok   greet
|4d2f3bf pass in 0s, signed
|remote: review #7: /dami/greet/reviews/7/
|pushed dami/regions
|created dami/forge
|warning: You appear to have cloned an empty repository.
|site guide: mkdir -p guide/fonts && cp site/assets/fonts/*.woff2 guide/fonts/
|site guide: deployed 8bfb5e6 -> /sites/dami/forge/guide/
|(node:47230) ExperimentalWarning: stripTypeScriptTypes is an experimental feature and might change at any time
|(Use `node --trace-warnings ...` to show where the warning was created)
|built ana/dotfiles in 0s -> /var/folders/b4/mv8w4c8j0zj0_mldppxdbdw00000gn/T/forge-ci.MORAI6/wt/demo/root/.forge/www
|(node:47357) ExperimentalWarning: stripTypeScriptTypes is an experimental feature and might change at any time
|(Use `node --trace-warnings ...` to show where the warning was created)
|built ana/notes in 1s -> /var/folders/b4/mv8w4c8j0zj0_mldppxdbdw00000gn/T/forge-ci.MORAI6/wt/demo/root/.forge/www
|(node:47498) ExperimentalWarning: stripTypeScriptTypes is an experimental feature and might change at any time
|(Use `node --trace-warnings ...` to show where the warning was created)
|built dami/forge in 0s -> /var/folders/b4/mv8w4c8j0zj0_mldppxdbdw00000gn/T/forge-ci.MORAI6/wt/demo/root/.forge/www
|(node:47632) ExperimentalWarning: stripTypeScriptTypes is an experimental feature and might change at any time
|(Use `node --trace-warnings ...` to show where the warning was created)
|built dami/greet in 2s -> /var/folders/b4/mv8w4c8j0zj0_mldppxdbdw00000gn/T/forge-ci.MORAI6/wt/demo/root/.forge/www
|(node:48300) ExperimentalWarning: stripTypeScriptTypes is an experimental feature and might change at any time
|(Use `node --trace-warnings ...` to show where the warning was created)
|built - in 0s -> /var/folders/b4/mv8w4c8j0zj0_mldppxdbdw00000gn/T/forge-ci.MORAI6/wt/demo/root/.forge/www
|234 of 234 pages render the same without 11ty
|guide: 8 files, links ok
|ok

Signature: good, cat

4 files changed, +34 -8
MREADME.md14++++++++------
Mlib/diagrams.ts17++++++++++++++++-
Msite/assets/style.css8+++++++-
Mtest/scenarios/diagram-svg.sh3+++
M README.md +8 -6
M lib/diagrams.ts +16 -1
M site/assets/style.css +7 -1
M test/scenarios/diagram-svg.sh +3 -0