latest changes
This commit is contained in:
@@ -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;
|
||||
|
||||
+30
-1
@@ -353,8 +353,37 @@ header {
|
||||
opacity: .65;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.tasks-result {
|
||||
.task-result {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
padding: 25px;
|
||||
}
|
||||
.htmx-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.htmx-request.htmx-indicator {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.request-failed {
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.request-failed:not([hidden]) {
|
||||
display: inline-flex;
|
||||
}
|
||||
Reference in New Issue
Block a user