Template refactors
En iets met de playlist-maker. URLs opnieuw ingedeeld.
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user