Screen: bigger entry qr, upright layout without overlap, center logo matches the mark

This commit is contained in:
2026-11-16 22:07:56 +01:00
parent 01ea45a29a
commit 0dbb3f08bd
2 changed files with 16 additions and 8 deletions
+10 -2
View File
@@ -17,8 +17,8 @@ body.screen {
} }
.qr-wrap.ring { background: transparent; padding: 0; } .qr-wrap.ring { background: transparent; padding: 0; }
.entry { display: flex; align-items: center; gap: 1.2vw; margin-top: 3vh; background: var(--surface); border-radius: 18px; padding: 1.2vh 1.2vw; width: fit-content; } .entry { display: flex; align-items: center; gap: 1.2vw; margin-top: 3vh; background: var(--surface); border-radius: 18px; padding: 1.2vh 1.2vw; width: fit-content; }
.entry canvas { width: clamp(70px, 7vw, 130px); height: auto; aspect-ratio: 1; image-rendering: pixelated; } .entry canvas { width: clamp(120px, min(15vw, 22vh), 280px); height: auto; aspect-ratio: 1; image-rendering: pixelated; flex: none; }
.entry div { display: grid; gap: .3vh; font-size: clamp(.8rem, 1.1vw, 1.2rem); color: var(--ink-2); } .entry div { display: grid; gap: .3vh; font-size: clamp(.8rem, 1.1vw, 1.2rem); color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.entry b { color: var(--ink); font-weight: 700; } .entry b { color: var(--ink); font-weight: 700; }
#qr { width: 100%; height: 100%; min-height: 0; image-rendering: pixelated; image-rendering: crisp-edges; object-fit: contain; } #qr { width: 100%; height: 100%; min-height: 0; image-rendering: pixelated; image-rendering: crisp-edges; object-fit: contain; }
.tick { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 0 1vh; } .tick { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 0 1vh; }
@@ -68,5 +68,13 @@ body.screen {
@media (max-aspect-ratio: 1/1) { @media (max-aspect-ratio: 1/1) {
.s-enroll, .s-main.split { grid-template-columns: 1fr; } .s-enroll, .s-main.split { grid-template-columns: 1fr; }
.qr-wrap { max-height: 50vh; justify-self: center; } .qr-wrap { max-height: 50vh; justify-self: center; }
/* upright screen: the ring takes what the text leaves, the entry qr sits next to the steps */
.s-main:not(.split) .s-enroll { grid-template-rows: minmax(0, 1fr) auto; gap: 3vh; height: 100%; }
.s-main:not(.split) .qr-wrap { height: 100%; width: auto; max-width: 100%; max-height: none; }
.s-steps { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 4vw; align-items: center; }
.s-steps > * { grid-column: 1; }
.s-steps .entry { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; gap: .8vh; margin: 0; padding: 1.2vh; text-align: center; }
.s-steps .entry div { font-size: clamp(.7rem, 2.2vw, 1.1rem); overflow-wrap: normal; white-space: nowrap; }
.s-steps .entry canvas { width: clamp(110px, min(30vw, 17vh), 300px); }
} }
.qr-wrap.ring .tick { display: none; } .qr-wrap.ring .tick { display: none; }
+6 -6
View File
@@ -154,14 +154,14 @@ const sectorAngle = (theta, j, n) => theta + ((j + 0.5) * 2 * Math.PI) / n;
const INK = "#1c2036"; const INK = "#1c2036";
function logo(ctx, cx, cy, r) { function logo(ctx, cx, cy, r) {
// the rotaty mark in light tones on the dark disc // same geometry as static/img/mark.svg: r 11, stroke 5, 6 dashes of 4.52 every 11.52, first one yellow
const n = 6, rr = r * 0.52, step = (2 * Math.PI) / n; const u = (r * 0.62) / 13.5, rr = 11 * u, step = (2 * Math.PI) / 6, dash = 4.52 / 11, start = 3.5 / 11;
ctx.lineCap = "round"; ctx.lineCap = "round";
ctx.lineWidth = r * 0.17; ctx.lineWidth = 5 * u;
for (let j = 0; j < n; j++) { for (let j = 0; j < 6; j++) {
const a = -Math.PI / 2 + j * step; const a = -Math.PI / 2 + start + j * step;
ctx.strokeStyle = j === 0 ? "#ffcc00" : "#ffffff"; ctx.strokeStyle = j === 0 ? "#ffcc00" : "#ffffff";
ctx.beginPath(); ctx.arc(cx, cy, rr, a + step * 0.2, a + step * 0.8); ctx.stroke(); ctx.beginPath(); ctx.arc(cx, cy, rr, a, a + dash); ctx.stroke();
} }
} }