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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user