Voegt stijl toe
En wat voor een stijl. Damn.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{% 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>
|
||||
Reference in New Issue
Block a user