Voting update
Nu met 100% meer mogelijkheid tot stemmen. Top.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
{% load static %}
|
||||
<script src="{% static 'js/htmx.min.js' %}" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul hx-boost="true">
|
||||
<li><a href="{% url 'vote' %}">Stemmen</a></li>
|
||||
<li><a href="{% url 'nominate' %}">Nomineren</a></li>
|
||||
<li><a href="/">Statistieken</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h1>{% block page-name %}Muzak{% endblock %}</h1>
|
||||
</header>
|
||||
<main>
|
||||
{% block main-content %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,13 @@
|
||||
{% if user.is_authenticated %}
|
||||
<p>Current user: {{ user.email }}</p>
|
||||
<form action="{% url 'oidc_logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="logout">
|
||||
</form>
|
||||
{% else %}
|
||||
<a href="{% url 'oidc_authentication_init' %}">Login</a>
|
||||
{% endif %}
|
||||
{% extends "Base.html" %}
|
||||
|
||||
{% block main-content %}
|
||||
{% if user.is_authenticated %}
|
||||
<p>Current user: {{ user.email }}</p>
|
||||
<form action="{% url 'oidc_logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="logout">
|
||||
</form>
|
||||
{% else %}
|
||||
<a href="{% url 'oidc_authentication_init' %}">Login</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{% extends "Base.html" %}
|
||||
|
||||
{% block main-content %}
|
||||
<h2>Nominate</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="text" name="spotify_link" placeholder="Spotify-link">
|
||||
<input type="submit" value="OK">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<div id="vote-box" hx-boost="true" hx-target="#vote-box">
|
||||
<iframe src="https://open.spotify.com/embed/track/{{ id }}"
|
||||
class="play-sample" width="300" height="380" frameborder="0" allowtransparency="true"
|
||||
allow="encrypted-media"></iframe>
|
||||
<a href="{% url 'vote-track'%}">Ja</a> | <a href="{% url 'vote-track' %}">Nee</a>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
{% extends "Base.html" %}
|
||||
|
||||
{% block main-content %}
|
||||
{% for song in songs %}
|
||||
{{ song }}
|
||||
{% endfor %}
|
||||
|
||||
<div hx-get="{% url 'vote-track' %}" hx-trigger="load">
|
||||
etst
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user