mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-29 09:15:33 +00:00
some small things
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{- $date := Today -}}
|
||||
<footer class="container-normal pb-1.5 text-base text-gray-800">
|
||||
<footer class="container-normal pb-1.5 text-base text-gray-800 self-end justify-self-end">
|
||||
<div class="mt-12 pt-3 flex flex-row justify-between">
|
||||
<div>
|
||||
<i class="ri-creative-commons-line"></i>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -22,19 +22,7 @@
|
||||
|
||||
|
||||
<script type="module" src="/assets/scripts.js"></script>
|
||||
<link href="/assets/css/remixicon.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" type="text/css" href="/assets/style.css" />
|
||||
|
||||
<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>
|
||||
</head>
|
||||
|
||||
<body class="w-full text-lg" hx-ext="response-targets" hx-boost="true">
|
||||
@@ -45,7 +33,7 @@
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
<main class="">
|
||||
<main class="grow">
|
||||
{{ block "body" . }}
|
||||
<!-- Default app body... -->
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user