Template refactor, task update

Banter no longer fails if AI offline. Refactoring of templates.
This commit is contained in:
2024-02-18 23:33:09 +01:00
parent c7bd7fda9b
commit fcf31cb896
14 changed files with 90 additions and 46 deletions
+5 -14
View File
@@ -1,17 +1,10 @@
{% load static %}
<html>
<head>
{% load static %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="{% static 'js/htmx.min.js' %}" defer></script>
<script src="https://unpkg.com/interactjs"></script>
<link rel="stylesheet" href="https://unpkg.com/98.css" >
<link href="{% static 'style.css'%}" rel="stylesheet" type="text/css" />
<script src="https://open.spotify.com/embed/iframe-api/v1" async></script>
{% include "head.html" %}
</head>
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' style="background:#01817F;">
<div class="window">
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
<div class="window" id="main-window">
<div class="title-bar">
<div class="title-bar-text">
{% block window-title %}{% endblock %}
@@ -42,14 +35,12 @@
</div>
{% block clippy %}{% endblock %}
<script>
position = { x: 0, y: 0 }
position.get_pos(); // Gets position from localStorage
interact('.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)`
},