Starlette backend with sqlite, rotating HMAC QR tokens pushed to a key-protected projector page, multi-scan enrollment, optional one-time paper codes, anonymous ballots split from participation, live question push over websockets, e2e tests over HTTP and TLS.
73 lines
2.4 KiB
HTML
73 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="theme-color" content="#f5f3ee">
|
|
<title>RotatyVote · Vote</title>
|
|
<link rel="icon" href="/static/img/mark.svg" type="image/svg+xml">
|
|
<link rel="stylesheet" href="/static/css/app.css">
|
|
<link rel="stylesheet" href="/static/css/vote.css">
|
|
<script src="/static/vendor/qr-scanner.umd.min.js"></script>
|
|
<script type="module" src="/static/js/vote.js"></script>
|
|
</head>
|
|
<body class="voter">
|
|
<main class="wrap narrow">
|
|
<div class="topbar">
|
|
<span class="brand"><img src="/static/img/mark.svg" alt=""><span>rotaty<b>vote</b></span></span>
|
|
<span id="conn" class="conn" hidden></span>
|
|
</div>
|
|
<h1 id="title">…</h1>
|
|
|
|
<section id="v-loading"><p class="muted">Chargement…</p></section>
|
|
|
|
<section id="v-enroll" hidden>
|
|
<div class="card">
|
|
<div id="dots" class="dots" aria-live="polite"></div>
|
|
<div class="cam" id="cam-box" hidden>
|
|
<video id="video" playsinline muted></video>
|
|
</div>
|
|
<p id="scan-msg" class="scan-msg muted"></p>
|
|
<button id="start-cam" class="primary block" type="button">Activer la caméra</button>
|
|
</div>
|
|
<p class="hint center">Vote anonyme</p>
|
|
</section>
|
|
|
|
<section id="v-code" hidden>
|
|
<div class="card">
|
|
<p>Saisissez votre code papier.</p>
|
|
<form id="code-form">
|
|
<input id="code" type="text" inputmode="text" autocomplete="one-time-code" autocapitalize="characters"
|
|
maxlength="12" placeholder="XXXX-XXXX" aria-label="Code d'accès">
|
|
<div class="actions"><button class="primary block" type="submit">Valider</button></div>
|
|
</form>
|
|
<p id="code-msg" class="scan-msg"></p>
|
|
</div>
|
|
</section>
|
|
|
|
<section id="v-blocked" hidden>
|
|
<div class="notice bad" id="blocked-msg"></div>
|
|
</section>
|
|
|
|
<section id="v-vote" hidden>
|
|
<p class="enrolled-chip"><span class="badge open">Inscrit</span></p>
|
|
<div id="questions"></div>
|
|
<p id="waiting" class="waiting muted">En attente d'une question…</p>
|
|
</section>
|
|
</main>
|
|
|
|
<dialog id="confirm">
|
|
<form method="dialog">
|
|
<h2>Confirmer</h2>
|
|
<p id="confirm-q" class="muted"></p>
|
|
<ul id="confirm-choices"></ul>
|
|
<p class="hint">Définitif.</p>
|
|
<div class="actions">
|
|
<button value="cancel" type="submit">Modifier</button>
|
|
<button value="ok" class="go" type="submit">Voter</button>
|
|
</div>
|
|
</form>
|
|
</dialog>
|
|
</body>
|
|
</html>
|