widgets: Make poll options clickable.

This commit is contained in:
Karl Stolley
2025-06-10 16:40:08 -05:00
committed by Tim Abbott
parent 9dec5481eb
commit 5170a4ad28
2 changed files with 13 additions and 5 deletions

View File

@@ -156,7 +156,13 @@
font-weight: 400; font-weight: 400;
} }
& span.poll-option { .poll-option-label {
display: flex;
gap: 5px;
align-items: baseline;
}
.poll-option-text {
font-weight: 600; font-weight: 600;
/* Start with max-content, but allow options /* Start with max-content, but allow options
to shrink, so that voting names wrap comfortably. */ to shrink, so that voting names wrap comfortably. */

View File

@@ -1,9 +1,11 @@
{{#each options}} {{#each options}}
<li> <li>
<button class="poll-vote {{#if current_user_vote}}current-user-vote{{/if}}" data-key="{{ key }}"> <label class="poll-option-label">
{{ count }} <button class="poll-vote {{#if current_user_vote}}current-user-vote{{/if}}" data-key="{{ key }}">
</button> {{ count }}
<span class="poll-option">{{ option }}</span> </button>
<span class="poll-option-text">{{ option }}</span>
</label>
{{#if names}} {{#if names}}
<span class="poll-names">({{ names }})</span> <span class="poll-names">({{ names }})</span>
{{/if}} {{/if}}