star vote

This commit is contained in:
2024-02-21 22:40:51 +01:00
parent 9a6fc5ce36
commit ad49248132
4 changed files with 56 additions and 0 deletions
+31
View File
@@ -54,6 +54,37 @@ Stemmen
>Helemaal niet mee eens</button>
</fieldset>
</div>
<div
id="vote-stars"
hx-vals='{"spotify_id": "{{ track.id }}"}'
style="margin-top:10px;"
>
<fieldset>
<legend>Hoe veel sterren geef jij dit nummer?</legend>
<div class="star-wrapper">
<a
hx-vals='{"vote": "-2"}'
hx-post="{% url 'vote' %}"
></a>
<a
hx-vals='{"vote": "-1"}'
hx-post="{% url 'vote' %}"
></a>
<a
hx-vals='{"vote": "0"}'
hx-post="{% url 'vote' %}"
></a>
<a
hx-vals='{"vote": "1"}'
hx-post="{% url 'vote' %}"
></a>
<a
hx-vals='{"vote": "2"}'
hx-post="{% url 'vote' %}"
></a>
</div>
</fieldset>
</div>
</div>
<script>
window.onSpotifyIframeApiReady = (IFrameAPI) => {