kiosk: chromium 72 mime + flex-gap fixes

Pi's onboard chromium is 72 (Jan 2019). Two issues:

1. Python 3.5's mimetypes doesn't know woff/woff2/ttf, so Tornado
   serves them as application/octet-stream which chromium 72 refuses
   to use as web fonts -> all FA6 icons render as empty boxes. Add
   scripts/deploy/patch_font_mime.py that monkey-patches bbctrl
   Web.py's StaticFileHandler with correct content types. Run
   automatically by deploy-hardware.sh (idempotent).

2. flex-gap landed in chromium 84. Add '> * + *' margin fallbacks
   for the flex containers that show up on Program tab (action-bar,
   action-btn, file-bar, file-btn) and tighten the kiosk-mode
   settings rail so all 14 items fit in 768px height.
This commit is contained in:
muehe
2026-05-01 11:16:28 +02:00
parent 68a92bb297
commit 50839718e2
3 changed files with 162 additions and 0 deletions

View File

@@ -2570,3 +2570,51 @@ html.kiosk-mode
.control-page .jog-head > * + *
margin-left 8px
// Settings rail must be scrollable in kiosk mode \u2014 the 14+
// item list overflows the 768px viewport at default heights.
.settings-shell
grid-template-columns 220px 1fr
gap 10px
.settings-rail
position static
align-self stretch
max-height 100%
overflow-y auto
.settings-rail .set-item
height 36px
font-size 0.85rem
padding 0 10px
.fa
width 14px
font-size 0.9rem
.settings-rail .set-section
margin 6px 4px 2px
font-size 0.62rem
.settings-rail .set-rail-foot
margin-top 4px
padding-top 6px
.sp-shutdown, .sp-save
height 32px
font-size 0.85rem
// Program tab flex-gap fallbacks for Chromium 72.
// Action bar (RUN/STOP/UPLOAD/.../DELETE) and the action buttons
// themselves (icon stacked over label).
.action-bar > * + *
margin-left 12px
.action-btn > * + *
margin-top 4px
// File bar (Create Folder / folder select / file select / sort).
.file-bar > * + *
margin-left 10px
.file-btn > * + *
margin-left 0.4rem