diff --git a/README.md b/README.md index 29b09cf..84531ba 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,11 @@ Each site can carry its own banner and colours, set under **Sites → Edit**. **Banner.** Upload a PNG, JPEG or WebP up to 2 MB. A PNG with a transparent background is the one to use — it sits straight on the bar colour with nothing painted behind it, so it works whatever colour you pick. The admin preview shows it on a checkerboard so you can see the -transparency. When a banner is set it replaces the site name in the kiosk header; set the -on-screen height in pixels to suit the shape of your logo. SVG is deliberately not accepted: +transparency. When a banner is set it replaces the site name in the kiosk header. Set the on-screen height in +pixels to suit the shape of your logo, and choose whether it sits **left** or **centred** — the +header is a three-column layout, so a centred logo is centred on the page rather than centred in +whatever space the clock leaves over. The setting applies to the site name too, when no banner is +uploaded. SVG is deliberately not accepted: it can carry script, and this file is served to every kiosk. **Colours.** Three are settable: diff --git a/public/css/kiosk.css b/public/css/kiosk.css index f14dcfd..cb7b668 100644 --- a/public/css/kiosk.css +++ b/public/css/kiosk.css @@ -41,20 +41,27 @@ body { /* ------------------------------------------------------------- chrome */ .bar { - display: flex; - align-items: baseline; - justify-content: space-between; + /* Three tracks, so the banner can sit centred on the page rather than centred + in the space the clock happens to leave over. */ + display: grid; + grid-template-columns: 1fr auto 1fr; + align-items: center; gap: 16px; padding: 14px 22px; background: var(--deep); color: var(--on-brand); } +.bar .clock { grid-column: 3; justify-self: end; } +.bar.align-left .banner, +.bar.align-left .site { grid-column: 1; justify-self: start; } +.bar.align-center .banner, +.bar.align-center .site { grid-column: 2; justify-self: center; } /* An uploaded banner sits in the bar in place of the site name. Transparent PNGs are the point, so nothing is painted behind it. */ .banner { max-height: 64px; - max-width: min(70%, 460px); + max-width: min(60vw, 460px); width: auto; object-fit: contain; display: block; diff --git a/public/index.html b/public/index.html index 72c138d..714aaf2 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,7 @@
-Visitor sign in
diff --git a/public/js/admin.js b/public/js/admin.js index 176bda0..89a001b 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -681,7 +681,7 @@ async function loadSites() { ${s.badge.note ? `A PNG with a transparent background works best — it sits straight on the bar colour with nothing painted behind it. Up to 2 MB.
- ${field('Banner height on screen (px)', 'bannerHeight', site.branding.bannerHeight, 'number')} +