Add Q&A slide type
Participants submit questions, upvote them and the presenter discusses them one by one, most upvoted first. - Stages collect -> vote -> discuss, switched manually by the presenter (V key or stepper, going back is possible) - Configurable upvote budget per participant, freely distributable (several upvotes on one question are allowed), votes can be withdrawn - Participants see all questions while collecting to avoid duplicates; no counts before the discussion - While discussing, next/prev step through the questions before moving to the next slide - Migration: slides.stage, slides.focus_response_id, responses.parent_id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ea944b080f
commit
f0c6687100
21 files changed
+1327
-27
No files matched your search
@@ -27,6 +27,7 @@
|
||||
--c3: #f29a1f;
|
||||
--c4: #2f8fe0;
|
||||
--c5: #8e44c9;
|
||||
--qa: #1f6bb0; /* Q&A accent, AA contrast with white text */
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -39,6 +40,7 @@
|
||||
--border: #30334a;
|
||||
--primary: #7f75ff;
|
||||
--primary-soft: #2a2752;
|
||||
--qa: #7cc4ff;
|
||||
--shadow: none;
|
||||
}
|
||||
}
|
||||
@@ -146,6 +148,7 @@ h3 { font-size: 1.05rem; margin-top: 1.6em; }
|
||||
.badge--type-content { background: #e3eefb; color: #1f6bb0; }
|
||||
.badge--type-quiz { background: #f1e3fb; color: #7a2fb0; }
|
||||
.badge--type-youtube { background: #fde4e1; color: #b3261e; }
|
||||
.badge--type-qa { background: #dff1fb; color: #0b5f8a; }
|
||||
|
||||
.message { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; cursor: pointer; background: var(--surface-2); border-left: 4px solid var(--muted); }
|
||||
.message.success { border-color: var(--ok); }
|
||||
@@ -227,6 +230,7 @@ textarea { resize: vertical; }
|
||||
.type-card--content { border-top-color: var(--c4); }
|
||||
.type-card--quiz { border-top-color: var(--c5); }
|
||||
.type-card--youtube { border-top-color: #d93025; }
|
||||
.type-card--qa { border-top-color: #0b8bc9; }
|
||||
|
||||
/* ---------------------------------------------------------------- slide form: youtube */
|
||||
.youtube-status { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
|
||||
@@ -382,6 +386,46 @@ textarea { resize: vertical; }
|
||||
.answers { list-style: none; padding: 0; margin: 0; columns: 280px; column-gap: 12px; }
|
||||
.answer { break-inside: avoid; background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; word-break: break-word; }
|
||||
|
||||
/* Q&A (participants + presenter) */
|
||||
.qa-form__label { display: block; font-weight: 600; margin-bottom: 6px; }
|
||||
.qa-message { min-height: 1.4em; margin: 8px 0; font-size: .9rem; color: var(--ok); }
|
||||
.qa-message.is-error { color: var(--danger); }
|
||||
.qa-heading { font-size: 1rem; margin: 16px 0 8px; }
|
||||
.qa-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
|
||||
.qa-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
|
||||
.qa-item__text { flex: 1; min-width: 0; word-break: break-word; position: relative; }
|
||||
.qa-item__bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--qa); border-radius: 0 4px 4px 0; transition: width .6s ease; }
|
||||
.qa-item.is-mine { border-left: 4px solid var(--qa); }
|
||||
.qa-item.is-upvoted { box-shadow: inset 0 0 0 2px var(--qa); }
|
||||
.qa-item.is-done { opacity: .55; }
|
||||
.qa-item.is-current { box-shadow: inset 0 0 0 2px var(--c1); }
|
||||
.qa-votes { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--qa); position: relative; }
|
||||
.qa-own { font-size: .85rem; color: var(--muted); white-space: nowrap; }
|
||||
.qa-stepper { flex: none; display: inline-flex; align-items: center; gap: 6px; }
|
||||
.qa-stepper__count { min-width: 3.2em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
|
||||
.qa-stepper.is-active .qa-stepper__count { color: var(--qa); }
|
||||
.qa-upvote { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--qa); background: var(--surface); color: var(--qa); font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer; }
|
||||
.qa-upvote--up { background: var(--qa); color: var(--surface); }
|
||||
.qa-upvote:disabled { opacity: .45; cursor: not-allowed; }
|
||||
.qa-upvote:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
|
||||
.qa-budget { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
|
||||
.qa-budget strong { font-size: 1.4rem; color: var(--qa); }
|
||||
.qa-budget__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--qa); }
|
||||
.qa-budget__dot.is-used { background: transparent; box-shadow: inset 0 0 0 2px var(--border); }
|
||||
.qa-budget__dot:first-of-type { margin-left: 6px; }
|
||||
.qa-focus { padding: 16px 18px; margin: 0 0 16px; border-radius: 14px; background: var(--surface-2); border-left: 6px solid var(--c1); }
|
||||
.qa-focus__meta { display: flex; gap: 16px; justify-content: space-between; margin: 0 0 6px; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
|
||||
.qa-focus__text { margin: 0; font-size: 1.3rem; font-weight: 700; word-break: break-word; }
|
||||
.qa-focus__nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
|
||||
.qa-focus__nav:empty { display: none; }
|
||||
.qa-list--compact .qa-item { padding: 8px 12px; }
|
||||
.qa-summary { color: var(--muted); margin: 0 0 1em; }
|
||||
.qa-steps { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: none; }
|
||||
.qa-steps__step { display: inline-block; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: .85em; }
|
||||
button.qa-steps__step { cursor: pointer; }
|
||||
button.qa-steps__step:hover:not(:disabled) { color: var(--text); border-color: var(--text); }
|
||||
.qa-steps .is-current .qa-steps__step { background: var(--qa); border-color: var(--qa); color: var(--surface); font-weight: 700; cursor: default; }
|
||||
|
||||
/* ---------------------------------------------------------------- presenter */
|
||||
body.present {
|
||||
--bg: #0f1020;
|
||||
@@ -422,6 +466,16 @@ body.present {
|
||||
/* brighter green for contrast on the dark stage */
|
||||
.stage .quiz-summary strong, .stage .bar--correct .bar__label { color: #3ddc97; }
|
||||
.stage .bar--correct .bar__fill { background: #3ddc97; }
|
||||
.stage .qa-steps { font-size: .7em; }
|
||||
.stage .qa-steps__step { border-color: rgba(255, 255, 255, .25); }
|
||||
.stage .qa-item { background: rgba(255, 255, 255, .06); }
|
||||
.stage { --qa: #7cc4ff; }
|
||||
.stage .qa-steps .is-current .qa-steps__step { color: var(--bg); }
|
||||
.stage .qa-focus { background: rgba(255, 255, 255, .08); padding: 3vh 3vw; }
|
||||
.stage .qa-focus__meta { font-size: .7em; }
|
||||
.stage .qa-focus__text { font-size: clamp(1.8rem, 3.6vw, 3.2rem); line-height: 1.2; }
|
||||
.stage .qa-list--compact { font-size: .75em; }
|
||||
.stage--qa .stage__question { font-size: clamp(1.5rem, 3vw, 2.6rem); }
|
||||
|
||||
.stage__controls { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; opacity: .35; transition: opacity .2s; padding-top: 12px; }
|
||||
.stage__controls:hover, .stage__controls:focus-within { opacity: 1; }
|
||||
|
||||
Reference in new issue
Block a user