Camera app scan: the first scan only opens the page, joining takes the ring or a second scan read within 4 s of the qr leaving the screen (votes keep 12 s); organizers can turn it off; open vote options and turnout bar stay above the big qr; native scan noted under the check
This commit is contained in:
+11
-2
@@ -39,8 +39,17 @@ body.entry-big .s-main:not(.split) .s-steps { visibility: hidden; }
|
||||
body.entry-q-on { --dock-qr: clamp(160px, min(52vh, 32vw), 580px); }
|
||||
/* width 0 + min-width 100%: a long question wraps to the qr's width instead of widening the block */
|
||||
.entry-q { display: grid; gap: .6vh; padding-bottom: 1vh; margin-bottom: .4vh; border-bottom: 2px solid var(--bg); width: 0; min-width: 100%; }
|
||||
.entry-q b { font: 700 clamp(1rem, 1.7vw, 2rem) var(--round); color: var(--ink); line-height: 1.15; }
|
||||
.entry-q span { font: 600 clamp(.85rem, 1.2vw, 1.4rem) var(--round); color: var(--ink-2); }
|
||||
.entry-q > b { font: 700 clamp(1rem, 1.7vw, 2rem) var(--round); color: var(--ink); line-height: 1.15; }
|
||||
.entry-q > span { font: 600 clamp(.85rem, 1.2vw, 1.4rem) var(--round); color: var(--ink-2); }
|
||||
/* open vote above the big qr: its options and the turnout bar, smaller than in the question block */
|
||||
body.entry-q-on.entry-opts-on { --dock-qr: clamp(150px, min(48vh, 30vw), 540px); }
|
||||
.entry-opts { list-style: none; padding: 0; margin: .2vh 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6vh .5vw; }
|
||||
.entry-opts li { font: 600 clamp(.8rem, 1.15vw, 1.35rem) var(--round); background: var(--bg); border-radius: 12px; padding: .6vh .8vw; }
|
||||
/* .entry div is a grid: the count reads on one line, the bar stays a flex row */
|
||||
.entry-q .turnout { display: block; font: 600 clamp(.8rem, 1.1vw, 1.3rem) var(--round); color: var(--ink-2); }
|
||||
.entry-q .turnout .progress { display: flex; }
|
||||
.entry-q .turnout b { color: var(--ink); font-size: 1.35em; }
|
||||
.entry-q .turnout .progress { height: 10px; margin-top: .8vh; }
|
||||
/* the ring loop resizes the canvas bitmap every frame: its intrinsic size must not feed the layout,
|
||||
or safari widens the column, which grows the bitmap, which widens the column... */
|
||||
#qr { width: 100%; height: 100%; min-width: 0; min-height: 0; contain: size; image-rendering: pixelated; image-rendering: crisp-edges; object-fit: contain; }
|
||||
|
||||
+2
-1
@@ -60,13 +60,14 @@ dialog .actions button { flex: 1; }
|
||||
.celebrate svg { width: 132px; height: 132px; animation: cel-pop .5s cubic-bezier(.2, .9, .3, 1.25) both; }
|
||||
.celebrate .tick { stroke-dasharray: 1; stroke-dashoffset: 1; animation: cel-tick .45s .25s cubic-bezier(.3, .7, .2, 1) forwards; }
|
||||
.celebrate p { margin: 0; font: 700 1.3rem var(--round); animation: cel-in .4s .35s ease both; }
|
||||
.celebrate small { margin-top: -10px; font: 600 .95rem var(--round); color: var(--ink-2); animation: cel-in .4s .45s ease both; }
|
||||
.celebrate.out { animation: cel-out .4s ease forwards; }
|
||||
@keyframes cel-in { from { opacity: 0; } }
|
||||
@keyframes cel-out { to { opacity: 0; } }
|
||||
@keyframes cel-pop { from { transform: scale(.6) rotate(-40deg); opacity: 0; } }
|
||||
@keyframes cel-tick { to { stroke-dashoffset: 0; } }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.celebrate, .celebrate svg, .celebrate p { animation: none; }
|
||||
.celebrate, .celebrate svg, .celebrate p, .celebrate small { animation: none; }
|
||||
.celebrate .tick { animation: none; stroke-dashoffset: 0; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user