From 389572d09e9b1af13a75fa7b0cbdceed91132a34 Mon Sep 17 00:00:00 2001 From: Showdown76py Date: Mon, 17 Aug 2026 01:46:18 +0100 Subject: [PATCH] Home: two-window explainer, code settings tucked away; projector: light entrance and exit motion --- static/css/app.css | 12 +++++++ static/css/screen.css | 25 +++++++++++++++ static/index.html | 50 ++++++++++++++++------------- static/js/index.js | 8 ----- static/js/screen.js | 73 ++++++++++++++++++++++++++++++++----------- 5 files changed, 119 insertions(+), 49 deletions(-) diff --git a/static/css/app.css b/static/css/app.css index 2fe69e4..560b517 100644 --- a/static/css/app.css +++ b/static/css/app.css @@ -162,3 +162,15 @@ button:disabled { opacity: .35; cursor: not-allowed; transform: none; } .code-cell { break-inside: avoid; } } .center { text-align: center; } + +/* home: the two windows a poll opens */ +.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 6px; } +.duo > div { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: var(--r-field); padding: 12px 14px; } +.duo p { margin: 0; display: grid; gap: 1px; min-width: 0; } +.duo b { font: 700 .92rem var(--round); } +.duo span { font-size: .78rem; color: var(--ink-3); } +label.with-icon { display: flex; align-items: center; gap: 8px; } +details.advanced { margin-top: 14px; } +details.advanced summary { font-size: .82rem; color: var(--ink-3); cursor: pointer; width: fit-content; padding: 4px 0; } +details.advanced summary:hover { color: var(--ink-2); } +details.advanced[open] summary { color: var(--ink-2); } diff --git a/static/css/screen.css b/static/css/screen.css index b45af5e..74e8b74 100644 --- a/static/css/screen.css +++ b/static/css/screen.css @@ -88,3 +88,28 @@ body.screen { .s-main.split .s-steps .entry { grid-column: 1; grid-row: auto; } } .qr-wrap.ring .tick { display: none; } + +/* light motion: blocks rise in, fade out, the question lands piece by piece, result bars grow */ +@keyframes s-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } } +@keyframes s-out { to { opacity: 0; transform: translateY(-8px); } } +@keyframes s-grow { from { transform: scaleX(0); } } +@keyframes s-bump { 40% { transform: scale(1.18); } } +.s-main:not(.split) > section { grid-area: 1 / 1; } +.s-main > section:not([hidden]), .entry:not([hidden]) { animation: s-in .5s cubic-bezier(.2, .7, .2, 1) both; } +.s-main > section.leaving, .entry.leaving { animation: s-out .22s ease both; } +#focus.enter .q-text { animation: s-in .5s cubic-bezier(.2, .7, .2, 1) both; } +#focus.enter .opts li, #focus.enter .bar-row { animation: s-in .45s cubic-bezier(.2, .7, .2, 1) both; } +#focus.enter :is(.opts li, .bar-row):nth-child(1) { animation-delay: .08s; } +#focus.enter :is(.opts li, .bar-row):nth-child(2) { animation-delay: .14s; } +#focus.enter :is(.opts li, .bar-row):nth-child(3) { animation-delay: .2s; } +#focus.enter :is(.opts li, .bar-row):nth-child(4) { animation-delay: .26s; } +#focus.enter :is(.opts li, .bar-row):nth-child(n+5) { animation-delay: .32s; } +#focus.enter .turnout, #focus.enter .results-foot, #focus.enter .status { animation: s-in .45s .3s cubic-bezier(.2, .7, .2, 1) both; } +#focus.enter .bar-fill { transform-origin: left; animation: s-grow .9s .25s cubic-bezier(.2, .7, .2, 1) both; } +.turnout .progress > div { transition: width .5s cubic-bezier(.2, .7, .2, 1); } +#voters { display: inline-block; } +#voters.bump { animation: s-bump .35s ease; } +@media (prefers-reduced-motion: reduce) { + .s-main > section, .entry, #focus.enter *, #voters.bump { animation: none !important; } + .turnout .progress > div { transition: none; } +} diff --git a/static/index.html b/static/index.html index 0d083bd..ecb9ec5 100644 --- a/static/index.html +++ b/static/index.html @@ -14,28 +14,13 @@

Nouveau scrutin

+
+

ProjecteurAffiché à la salle

+

AdministrationSur votre écran

+
- - -
-
- - -
-
- - -
-
-

+
@@ -55,6 +40,27 @@
+
+ Réglages du code +
+
+ + +
+
+ + +
+
+
+