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;
}
& span.poll-option {
.poll-option-label {
display: flex;
gap: 5px;
align-items: baseline;
}
.poll-option-text {
font-weight: 600;
/* Start with max-content, but allow options
to shrink, so that voting names wrap comfortably. */

View File

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