Public Access
Visitor sign in kiosk: multi-site, badge printing, WWCC expiry warnings, admin accounts with 2FA
This commit is contained in:
@@ -0,0 +1,402 @@
|
||||
:root {
|
||||
--paper: #e7ecf0;
|
||||
--card: #ffffff;
|
||||
--ink: #16202b;
|
||||
--muted: #5d6b7a;
|
||||
--rule: #c9d3dc;
|
||||
--deep: #0b4f4a;
|
||||
--deep-dark: #083a36;
|
||||
--on-brand: #ffffff;
|
||||
--exit: #2c4a6b;
|
||||
--exit-dark: #1f3650;
|
||||
--on-exit: #ffffff;
|
||||
--alert: #96162f;
|
||||
--focus: #0b4f4a;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
/* The rules below set display on elements that are toggled with the hidden
|
||||
attribute, and an author rule beats the browser's [hidden] { display: none }.
|
||||
Without this the captured still renders underneath the live camera feed. */
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
min-height: 100%;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font-family: "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
line-height: 1.45;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- chrome */
|
||||
|
||||
.bar {
|
||||
/* 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(60vw, 460px);
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
|
||||
.clock { margin: 0; font-variant-numeric: tabular-nums; font-size: 16px; opacity: 0.85; }
|
||||
|
||||
.foot {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 16px;
|
||||
min-height: 20px;
|
||||
padding: 14px 22px 20px;
|
||||
font-size: 12.5px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
|
||||
|
||||
#app {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
margin: 0 auto;
|
||||
padding: 28px 22px 8px;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ screens */
|
||||
|
||||
.screen { display: none; }
|
||||
.screen.on { display: block; animation: rise 180ms ease-out; }
|
||||
|
||||
@keyframes rise {
|
||||
from { opacity: 0; transform: translateY(6px); }
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.screen.on { animation: none; }
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
font-weight: 620;
|
||||
letter-spacing: -0.015em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
h1 { font-size: 30px; margin: 8px 0 26px; }
|
||||
h2 { font-size: 25px; margin: 4px 0 20px; }
|
||||
|
||||
.hint { margin: -12px 0 22px; color: var(--muted); font-size: 15px; max-width: 46ch; }
|
||||
|
||||
/* --------------------------------------------------------- home doors */
|
||||
|
||||
.welcome { max-width: 18ch; }
|
||||
|
||||
.doors { display: grid; gap: 14px; }
|
||||
|
||||
.door {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 26px 24px;
|
||||
border: none;
|
||||
border-left: 7px solid var(--deep-dark);
|
||||
border-radius: 3px;
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.door-out { background: var(--exit); border-left-color: var(--exit-dark); color: var(--on-exit); }
|
||||
.door:active { transform: translateY(1px); }
|
||||
|
||||
.door-title { display: block; font-size: 27px; font-weight: 650; letter-spacing: -0.01em; }
|
||||
.door-sub { display: block; margin-top: 4px; font-size: 15px; opacity: 0.82; }
|
||||
|
||||
.text-action {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 22px;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: transparent;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.text-action:hover { background: var(--card); }
|
||||
.text-action, .field input, .picker, .choice, .host-option { color: var(--ink); }
|
||||
|
||||
/* ------------------------------------------------------- step rail */
|
||||
|
||||
.rail {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
margin-bottom: 18px;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.rail i {
|
||||
display: block;
|
||||
width: 26px;
|
||||
height: 3px;
|
||||
background: var(--rule);
|
||||
border-radius: 2px;
|
||||
}
|
||||
.rail i.done { background: var(--deep); }
|
||||
.rail span { margin-left: 6px; }
|
||||
|
||||
/* ---------------------------------------------------------- fields */
|
||||
|
||||
.field { display: block; margin-bottom: 18px; }
|
||||
.field > span {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
font-size: 14.5px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.field input {
|
||||
width: 100%;
|
||||
padding: 15px 14px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 20px;
|
||||
}
|
||||
.field input:focus-visible,
|
||||
button:focus-visible,
|
||||
a:focus-visible {
|
||||
outline: 3px solid var(--focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.field-pin input {
|
||||
font-size: 30px;
|
||||
letter-spacing: 0.5em;
|
||||
text-align: center;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- choices */
|
||||
|
||||
.choices { display: grid; gap: 10px; margin-bottom: 20px; }
|
||||
.choice, .host-option {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 18px 16px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.choice[aria-pressed="true"] {
|
||||
border-color: var(--deep);
|
||||
box-shadow: inset 0 0 0 1px var(--deep);
|
||||
background: #f2f8f6;
|
||||
}
|
||||
.host-list {
|
||||
max-height: 46vh;
|
||||
overflow-y: auto;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin-bottom: 20px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.host-option small { display: block; color: var(--muted); font-size: 14px; }
|
||||
.host-empty {
|
||||
color: var(--muted);
|
||||
font-size: 15px;
|
||||
margin: -6px 0 18px;
|
||||
padding: 12px 14px;
|
||||
background: var(--card);
|
||||
border-left: 4px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------- camera */
|
||||
|
||||
.camera {
|
||||
position: relative;
|
||||
/* Square, matching the crop that is saved and the frame printed on the badge,
|
||||
so the visitor sees exactly what ends up on their pass. */
|
||||
aspect-ratio: 1 / 1;
|
||||
width: 100%;
|
||||
max-width: 380px;
|
||||
margin: 0 auto 18px;
|
||||
background: #0f1720;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.camera video, .camera img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
/* The live feed is mirrored because that is how people expect to see themselves.
|
||||
The captured still is not: it shows what will actually print. */
|
||||
.camera video { transform: scaleX(-1); }
|
||||
.camera-error {
|
||||
margin: -8px 0 18px;
|
||||
padding: 14px;
|
||||
border-left: 4px solid var(--alert);
|
||||
background: #fff;
|
||||
color: var(--ink);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------- review */
|
||||
|
||||
.review {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(120px, 34%) 1fr;
|
||||
gap: 10px 16px;
|
||||
margin: 0 0 24px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--rule);
|
||||
font-size: 16.5px;
|
||||
}
|
||||
.review dt { color: var(--muted); }
|
||||
.review dd { margin: 0; }
|
||||
.review img { width: 78px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; display: block; }
|
||||
|
||||
/* ------------------------------------------------------------- done */
|
||||
|
||||
.screen-done .mark {
|
||||
display: inline-block;
|
||||
margin: 8px 0 14px;
|
||||
padding: 7px 14px;
|
||||
border-radius: 2px;
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
#screen-done-out .mark { background: var(--exit); color: var(--on-exit); }
|
||||
|
||||
/* ------------------------------------------------------------ buttons */
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 26px;
|
||||
}
|
||||
.nav button {
|
||||
flex: 1 1 auto;
|
||||
min-height: 62px;
|
||||
padding: 16px 22px;
|
||||
border-radius: 3px;
|
||||
font: inherit;
|
||||
font-size: 19px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.nav .primary {
|
||||
border: 1px solid var(--deep);
|
||||
background: var(--deep);
|
||||
color: var(--on-brand);
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav .ghost {
|
||||
flex: 0 1 auto;
|
||||
border: 1px solid var(--rule);
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
}
|
||||
.nav button[disabled] { opacity: 0.55; cursor: progress; }
|
||||
|
||||
/* ------------------------------------------------------------- alert */
|
||||
|
||||
.alert {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 22px;
|
||||
transform: translateX(-50%);
|
||||
width: min(560px, calc(100% - 32px));
|
||||
margin: 0;
|
||||
padding: 16px 18px;
|
||||
border-left: 5px solid var(--alert);
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
box-shadow: 0 10px 28px rgba(22, 32, 43, 0.18);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 420px) {
|
||||
h1 { font-size: 26px; }
|
||||
h2 { font-size: 22px; }
|
||||
.door-title { font-size: 23px; }
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- site + badge bits */
|
||||
|
||||
.foot-link {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
color: var(--muted);
|
||||
font: inherit;
|
||||
font-size: 12.5px;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#badge-frame {
|
||||
position: fixed;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------- host dropdown */
|
||||
|
||||
.picker {
|
||||
width: 100%;
|
||||
padding: 15px 14px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 3px;
|
||||
background: var(--card);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
font-size: 20px;
|
||||
/* Tall enough to be a comfortable touch target on a tablet. */
|
||||
min-height: 58px;
|
||||
}
|
||||
.picker:disabled { color: var(--muted); }
|
||||
|
||||
/* An optional field says so quietly, without shouting for attention. */
|
||||
.field > span em { font-style: normal; opacity: 0.75; }
|
||||
Reference in New Issue
Block a user