From 0dbb3f08bd39dcf70bce051d6205df6c59ef6080 Mon Sep 17 00:00:00 2001 From: Showdown76py Date: Mon, 16 Nov 2026 22:07:56 +0100 Subject: [PATCH] Screen: bigger entry qr, upright layout without overlap, center logo matches the mark --- static/css/screen.css | 12 ++++++++++-- static/js/ringcode.js | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/static/css/screen.css b/static/css/screen.css index 8615e37..b6996d6 100644 --- a/static/css/screen.css +++ b/static/css/screen.css @@ -17,8 +17,8 @@ body.screen { } .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 canvas { width: clamp(70px, 7vw, 130px); height: auto; aspect-ratio: 1; image-rendering: pixelated; } -.entry div { display: grid; gap: .3vh; font-size: clamp(.8rem, 1.1vw, 1.2rem); color: var(--ink-2); } +.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); min-width: 0; overflow-wrap: anywhere; } .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; } .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) { .s-enroll, .s-main.split { grid-template-columns: 1fr; } .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; } diff --git a/static/js/ringcode.js b/static/js/ringcode.js index 0cf522d..59c2097 100644 --- a/static/js/ringcode.js +++ b/static/js/ringcode.js @@ -154,14 +154,14 @@ const sectorAngle = (theta, j, n) => theta + ((j + 0.5) * 2 * Math.PI) / n; const INK = "#1c2036"; function logo(ctx, cx, cy, r) { - // the rotaty mark in light tones on the dark disc - const n = 6, rr = r * 0.52, step = (2 * Math.PI) / n; + // same geometry as static/img/mark.svg: r 11, stroke 5, 6 dashes of 4.52 every 11.52, first one yellow + 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.lineWidth = r * 0.17; - for (let j = 0; j < n; j++) { - const a = -Math.PI / 2 + j * step; + ctx.lineWidth = 5 * u; + for (let j = 0; j < 6; j++) { + const a = -Math.PI / 2 + start + j * step; 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(); } }