Two-window explainer moves to the links page, with an open button for the projector

This commit is contained in:
2026-08-17 01:47:45 +01:00
parent 389572d09e
commit cd693d1a7c
3 changed files with 19 additions and 13 deletions
+5 -3
View File
@@ -163,13 +163,15 @@ button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
} }
.center { text-align: center; } .center { text-align: center; }
/* home: the two windows a poll opens */ /* created poll: the two windows it opens */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 6px; } .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.stack { grid-template-columns: 1fr; margin-top: 12px; }
.duo .pane { display: grid; gap: 10px; background: var(--bg); border-radius: var(--r-field); padding: 14px; }
.duo .pane-head { display: flex; align-items: center; gap: 12px; }
.duo .pane .linkbox input { background: var(--surface); }
.duo p { margin: 0; display: grid; gap: 1px; min-width: 0; } .duo p { margin: 0; display: grid; gap: 1px; min-width: 0; }
.duo b { font: 700 .92rem var(--round); } .duo b { font: 700 .92rem var(--round); }
.duo span { font-size: .78rem; color: var(--ink-3); } .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 { margin-top: 14px; }
details.advanced summary { font-size: .82rem; color: var(--ink-3); cursor: pointer; width: fit-content; padding: 4px 0; } 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 summary:hover { color: var(--ink-2); }
+12 -10
View File
@@ -14,10 +14,6 @@
<section id="create" class="card"> <section id="create" class="card">
<h1>Nouveau scrutin</h1> <h1>Nouveau scrutin</h1>
<div class="duo">
<div><svg class="icon" viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h20"/><path d="M4 4v10h16V4"/><path d="M12 14v3"/><path d="M8.5 21l3.5-4 3.5 4"/></svg><p><b>Projecteur</b><span>Affiché à la salle</span></p></div>
<div><svg class="icon" viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 5h16v11H4z"/><path d="M2 19.5h20"/><path d="M8 9h8"/><path d="M8 12.5h5"/></svg><p><b>Administration</b><span>Sur votre écran</span></p></div>
</div>
<form id="form"> <form id="form">
<label for="title">Titre</label> <label for="title">Titre</label>
<input id="title" type="text" required maxlength="200" placeholder="Conseil d'administration"> <input id="title" type="text" required maxlength="200" placeholder="Conseil d'administration">
@@ -74,12 +70,18 @@
<section id="done" class="card" hidden> <section id="done" class="card" hidden>
<h1>Scrutin créé</h1> <h1>Scrutin créé</h1>
<div class="notice warn">Conservez le lien d'administration : il ne pourra pas être récupéré.</div> <div class="notice warn">Conservez le lien d'administration : il ne pourra pas être récupéré.</div>
<label class="with-icon"><svg class="icon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 5h16v11H4z"/><path d="M2 19.5h20"/><path d="M8 9h8"/><path d="M8 12.5h5"/></svg>Lien d'administration</label> <div class="duo stack">
<div class="linkbox"><input id="admin-link" type="text" readonly><button id="copy-admin" class="small" type="button">Copier</button></div> <div class="pane">
<label class="with-icon"><svg class="icon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h20"/><path d="M4 4v10h16V4"/><path d="M12 14v3"/><path d="M8.5 21l3.5-4 3.5 4"/></svg>Lien du projecteur</label> <div class="pane-head"><svg class="icon" viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 5h16v11H4z"/><path d="M2 19.5h20"/><path d="M8 9h8"/><path d="M8 12.5h5"/></svg><p><b>Administration</b><span>Sur votre écran</span></p></div>
<div class="linkbox"><input id="screen-link" type="text" readonly><button id="copy-screen" class="small" type="button">Copier</button></div> <div class="linkbox"><input id="admin-link" type="text" readonly aria-label="Lien d'administration"><button id="copy-admin" class="small" type="button">Copier</button></div>
<p class="hint">Pour l'ordinateur du vidéoprojecteur. Ne pas diffuser.</p> <a id="go-admin" class="btn primary block" href="#">Ouvrir l'administration</a>
<div class="actions"><a id="go-admin" class="btn primary block" href="#">Ouvrir l'administration</a></div> </div>
<div class="pane">
<div class="pane-head"><svg class="icon" viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h20"/><path d="M4 4v10h16V4"/><path d="M12 14v3"/><path d="M8.5 21l3.5-4 3.5 4"/></svg><p><b>Projecteur</b><span>Affiché à la salle, à ouvrir sur l'écran projeté</span></p></div>
<div class="linkbox"><input id="screen-link" type="text" readonly aria-label="Lien du projecteur"><button id="copy-screen" class="small" type="button">Copier</button></div>
<a id="go-screen" class="btn block" href="#" target="_blank" rel="noopener">Ouvrir le projecteur</a>
</div>
</div>
</section> </section>
</main> </main>
</body> </body>
+2
View File
@@ -26,7 +26,9 @@ $("#form").addEventListener("submit", async (e) => {
$("#admin-link").value = admin; $("#admin-link").value = admin;
$("#screen-link").value = screen; $("#screen-link").value = screen;
$("#go-admin").href = admin; $("#go-admin").href = admin;
$("#go-screen").href = screen;
$("#create").hidden = true; $("#create").hidden = true;
$("#try-link").hidden = true;
$("#done").hidden = false; $("#done").hidden = false;
} catch (err) { } catch (err) {
toast(err.code === "bad_password" ? "Mot de passe incorrect" : `Erreur : ${err.message}`, "bad"); toast(err.code === "bad_password" ? "Mot de passe incorrect" : `Erreur : ${err.message}`, "bad");