mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-30 09:45:32 +00:00
some small things
This commit is contained in:
@@ -10,6 +10,18 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- HTMX Error Handling -->
|
||||
<script type="module">
|
||||
document.body.addEventListener("htmx:responseError", function (event) {
|
||||
const config = event.detail.requestConfig;
|
||||
if (config.boosted) {
|
||||
document.body.innerHTML = event.detail.xhr.responseText;
|
||||
const newUrl = event.detail.xhr.responseURL || config.url;
|
||||
window.history.pushState(null, "", newUrl);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ if .isDev }}
|
||||
<!-- Reload script for development -->
|
||||
<script type="module">
|
||||
|
||||
Reference in New Issue
Block a user