some small things

This commit is contained in:
Simon Martens
2025-03-24 22:44:08 +01:00
parent 4bff7fb17a
commit 0ff2e98c88
36 changed files with 19005 additions and 43604 deletions

View File

@@ -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>

View File

@@ -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">

View File

@@ -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 }}