clippy move

This commit is contained in:
2024-03-04 11:20:10 +01:00
parent 1fc253421b
commit ac8badc60e
4 changed files with 25 additions and 14 deletions
+5 -1
View File
@@ -10,7 +10,8 @@
{% block window-title %}{% endblock %}
</div>
<div class="title-bar-controls">
<button aria-label="Help" onclick="resetWindow()"></button>
<button aria-label="Minimize" onclick="resetWindow()"></button>
<button aria-label="Restore" onclick="resetWindow()"></button>
<form action="{% url 'oidc_logout' %}" method="post">
{% csrf_token %}
<button aria-label="Close" onclick="hideWindow()"></button>
@@ -51,6 +52,8 @@
position.y += event.dy
event.target.parentElement.style.transform =
`translate(${position.x}px, ${position.y}px)`
document.getElementById("clippy").style.transform =
`translate(${position.x}px, ${position.y}px)`
},
}
})
@@ -64,6 +67,7 @@
function resetWindow() {
position.reset()
document.getElementById("main-window").style.transform = '';
document.getElementById("clippy").style.transform = '';
}
</script>