963ab7f0bf
En wat voor een stijl. Damn.
32 lines
716 B
HTML
32 lines
716 B
HTML
{% load static %}
|
|
<div class="window popup">
|
|
<div class="title-bar">
|
|
<div class="title-bar-text">{{title}}</div>
|
|
</div>
|
|
<div class="window-body">
|
|
{{ body }}
|
|
{% if img %}
|
|
<br /><img src="{% static img %}" />
|
|
{% endif %}
|
|
</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>
|