c7bd7fda9b
Plus some refactors of the templates and styling
62 lines
2.0 KiB
HTML
62 lines
2.0 KiB
HTML
<html>
|
|
<head>
|
|
{% load static %}
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<script src="{% static 'js/htmx.min.js' %}" defer></script>
|
|
<script src="https://unpkg.com/interactjs"></script>
|
|
<link rel="stylesheet" href="https://unpkg.com/98.css" >
|
|
|
|
<link href="{% static 'style.css'%}" rel="stylesheet" type="text/css" />
|
|
<script src="https://open.spotify.com/embed/iframe-api/v1" async></script>
|
|
|
|
</head>
|
|
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' style="background:#01817F;">
|
|
<div class="window">
|
|
<div class="title-bar">
|
|
<div class="title-bar-text">
|
|
{% block window-title %}{% endblock %}
|
|
</div>
|
|
<div class="title-bar-controls">
|
|
<button aria-label="Help"></button>
|
|
<button aria-label="Close"></button>
|
|
</div>
|
|
</div>
|
|
<div class="window-body">
|
|
<menu role="tablist" hx-boost="true">
|
|
<li role="tab" {% if request.path == '/vote/' %}aria-selected="true" {% endif %}>
|
|
<a href="{% url 'vote' %}">Stemmen</a>
|
|
</li>
|
|
<li role="tab" {% if request.path == '/track/' %}aria-selected="true" {% endif %}>
|
|
<a href="{% url 'nominate' %}">Nomineren</a>
|
|
</li>
|
|
<li role="tab" {% if request.path == '/' %}aria-selected="true" {% endif %}>
|
|
<a href="/">Statistieken</a>
|
|
</li>
|
|
</menu>
|
|
<div class="window" role="tabpanel">
|
|
<div class="window-body">
|
|
{% block main-content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% block clippy %}{% endblock %}
|
|
<script>
|
|
position = { x: 0, y: 0 }
|
|
|
|
interact('.title-bar').draggable({
|
|
listeners: {
|
|
move (event) {
|
|
position.x += event.dx
|
|
position.y += event.dy
|
|
|
|
event.target.parentElement.style.transform =
|
|
`translate(${position.x}px, ${position.y}px)`
|
|
},
|
|
}
|
|
})
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|