Template refactors

En iets met de playlist-maker. URLs opnieuw ingedeeld.
This commit is contained in:
2024-03-18 12:48:33 +01:00
parent 8dca25f861
commit c44db12d30
8 changed files with 91 additions and 90 deletions
+12 -26
View File
@@ -1,31 +1,17 @@
{% load static %}
<div class="window popup">
<script>
function hidePopup() {
document.getElementById("info-window").classList.add("hide");
}
</script>
<div class="window popup" id="info-window">
<div class="title-bar">
<div class="title-bar-text">{{title}}</div>
<div class="title-bar-text">
{{title}}
<button aria-label="Close" onclick="hidePopup()"></button>
</div>
</div>
<div class="window-body">
{{ body }}
{% if img %}
<br /><img src="{% static img %}" />
{% endif %}
{{body}}
</div>
<div class="status-bar">
<p class="status-bar-field">{{title}}</p>
<p class="status-bar-field">CPU Usage: 14%</p>
</div>
</div>
<script>
position = { x: 0, y: 0 }
interact('.popup .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>
</div>