Commit e795575
Fix TRMNL device: flatten merge vars + per-layout markup
Two device-side bugs reported on the physical TRMNL:
1. "-- next departure" / "-- spaces": TRMNL webhook markup can only reach
TOP-LEVEL merge variables, so nested {{ status.time_str }} rendered blank
while top-level {{ route_name }} worked. ferry_merge_variables() now also
emits flat keys (has_status, dir_line, dir_short, time_str, spaces, delay)
and every layout reads those. delay is nil (not "") when absent, since an
empty string is truthy in Liquid.
2. Smaller layouts cropped: TRMNL renders each layout at its own size and crops
oversized content, so one responsive Shared template (CSS media queries) got
clipped. Each view tab now carries self-contained markup sized for its own
viewport (Full 800x480, Half-H 800x240, Half-V 400x480, Quadrant 400x240),
and the Shared tab is just a stub. The single responsive template is kept as
a documented alternative.
Page instructions and assets/trmnl-markup.liquid updated to match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f2e1ded commit e795575
2 files changed
Lines changed: 459 additions & 201 deletions
0 commit comments