latest changes

This commit is contained in:
Joren de Graaf
2026-08-13 16:59:18 +02:00
parent d76f982a03
commit cc158f15b8
4 changed files with 67 additions and 10 deletions
+10
View File
@@ -2,7 +2,17 @@ import './styles/app.scss';
import htmx from 'htmx.org';
window.htmx = htmx;
document.body.addEventListener('htmx:beforeRequest', function () {
document.getElementById('request-failed').hidden = true;
});
document.body.addEventListener('htmx:responseError', function () {
document.getElementById('request-failed').hidden = false;
});
document.body.addEventListener('htmx:sendError', function () {
document.getElementById('request-failed').hidden = false;
});
document.addEventListener('click', (event) => {
const button = event.target.closest('[data-weather-location]');
if (!button) return;