Admin: tabs, question composer dialog, settings autosave

Default answers Pour/Contre/Abstention/NPPPAV, svg icons instead of status
dots, no live/open status labels, inclusive wording across the UI and docs.
This commit is contained in:
2026-08-16 13:26:46 +01:00
parent 254a84e822
commit fca4a1194e
16 changed files with 351 additions and 226 deletions
+64
View File
@@ -0,0 +1,64 @@
.admin-wrap { max-width: 760px; }
.a-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.summary h1 { font-size: 2rem; margin-bottom: 14px; }
.summary-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.count-chip {
display: inline-flex; align-items: baseline; gap: 8px; background: var(--surface);
border-radius: 999px; padding: 8px 18px; color: var(--ink-2); font-weight: 600;
}
.count-chip b { font: 700 1.6rem/1 var(--round); color: var(--ink); letter-spacing: -.02em; }
/* the toggle reads as a switch: knob left when closed, right + green when open */
.enroll-toggle { gap: 10px; padding-left: 12px; }
.enroll-toggle::before {
content: ""; flex: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line);
box-shadow: inset 2px 0 0 2px var(--line), inset 16px 0 0 2px #fff; transition: box-shadow .2s, background .2s;
}
.enroll-toggle.on { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.enroll-toggle.on::before { background: var(--ok); box-shadow: inset 16px 0 0 2px var(--ok), inset 32px 0 0 2px #fff; }
#open-screen .icon { color: var(--ink-3); }
#open-screen.connected .icon { color: var(--ok); }
.tabs {
display: flex; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px;
margin: 26px 0 18px; width: fit-content; max-width: 100%; overflow-x: auto;
}
.tabs button { border: none; background: transparent; padding: 9px 18px; color: var(--ink-2); }
.tabs button:hover { background: var(--bg); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.bubble {
display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
border-radius: 99px; background: var(--mark); color: var(--ink); font-size: .75rem; font-weight: 700;
}
.new-q { margin-bottom: 14px; }
.empty { color: var(--ink-3); text-align: center; padding: 40px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.chip { background: var(--bg); border-radius: 999px; padding: 5px 12px; font-size: .9rem; }
.chip.ghost { background: transparent; border: 1.5px dashed var(--line); color: var(--ink-3); }
.q .progress { margin-top: 12px; }
.q .actions { margin-top: 14px; }
.codes-summary { margin: 10px 0; }
.share-list { padding: 6px 20px; }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.share-row + .share-row { border-top: 1.5px solid var(--bg); }
.share-row div { display: grid; }
.share-row .muted { font-size: .85rem; }
#composer { border: none; border-radius: 24px; padding: 24px; width: min(94vw, 560px); background: var(--surface); color: var(--ink); }
#composer::backdrop { background: rgba(28, 32, 54, .45); backdrop-filter: blur(2px); }
#composer[open] { animation: rise .2s ease-out; }
#composer h2 { font-size: 1.3rem; }
.spacer { flex: 1; }
@media (max-width: 560px) {
.summary-row > * { flex: 1 1 auto; }
#composer .actions button { flex: 1 1 100%; }
#composer .spacer { display: none; }
}
#q-opts { min-height: 132px; }
+2 -4
View File
@@ -88,10 +88,7 @@ button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2);
}
.badge.open { background: var(--ok-soft); color: var(--ok); }
.badge.open::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
.badge.public { background: var(--mark-soft); color: #7a5c00; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .badge.open::before { animation: none; } }
.notice { border-radius: var(--r-field); padding: 10px 14px; font-size: .9rem; margin: 10px 0; background: var(--bg); }
.notice.warn { background: var(--mark-soft); color: #5c4500; }
@@ -109,7 +106,8 @@ button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.q-text { font: 700 1.15rem/1.3 var(--round); margin: 10px 0; }
.q-opts { margin: 0 0 8px; padding-left: 20px; color: var(--ink-2); }
.q-meta { font-size: .82rem; color: var(--ink-3); margin: 4px 0; }
.focus-mark { font-size: .78rem; font-weight: 600; color: var(--ink); background: var(--mark); padding: 3px 10px; border-radius: 999px; }
.focus-mark { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--ink); background: var(--mark); padding: 3px 10px; border-radius: 999px; }
.icon { flex: none; display: block; }
.templates { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
+1 -1
View File
@@ -35,7 +35,7 @@ body.voter h1 { font-size: 1.6rem; margin-bottom: 18px; }
.choice.blank[aria-checked="true"] { background: var(--bg); border-color: var(--ink-3); color: var(--ink); }
.vq .go { margin-top: 10px; padding: 14px; font-size: 1.05rem; }
.voted { display: flex; gap: 10px; align-items: center; font: 600 1rem var(--round); margin: 0; color: var(--ink-2); }
.voted::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mark); color: var(--ink); font-weight: 800; }
.voted-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mark); color: var(--ink); }
.waiting { text-align: center; padding: 36px 0; color: var(--ink-3); }
dialog { border: none; border-radius: 24px; padding: 24px; width: min(92vw, 400px); background: var(--surface); color: var(--ink); }