Basic features done
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<div class="vote-form" id="vote-form-{{.Story.ID}}">
|
||||
{{$userVote := .UserVote}}
|
||||
{{$roomID := .RoomID}}
|
||||
{{$storyID := .Story.ID}}
|
||||
{{range scaleToOptions .Scale}}
|
||||
<button type="button"
|
||||
hx-post="/rooms/{{$roomID}}/vote"
|
||||
hx-target="#vote-form-{{$storyID}}"
|
||||
hx-swap="outerHTML"
|
||||
hx-vals='{"story_id":"{{$storyID}}","value":"{{.}}"}'
|
||||
class="vote-option {{if eq . $userVote}}vote-selected{{end}}">{{.}}</button>
|
||||
{{end}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user